Below is the list of changes that have just been committed into a local
5.1 repository of lthalmann. When lthalmann does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2398 06/05/15 22:02:40 lars@stripped +114 -0
Merge mysql.com:/users/lthalmann/bk/mysql-5.0-rpl
into mysql.com:/users/lthalmann/bk/mysql-5.1-new-rpl
support-files/mysql.spec.sh
1.141 06/05/15 21:58:58 lars@stripped +1 -2
Manual merge
sql/sql_table.cc
1.334 06/05/15 21:58:58 lars@stripped +105 -0
Manual merge
sql/sp_head.cc
1.219 06/05/15 21:58:58 lars@stripped +24 -5
Manual merge
sql/mysql_priv.h
1.401 06/05/15 21:58:58 lars@stripped +6 -0
Manual merge
sql/item_func.cc
1.293 06/05/15 21:58:58 lars@stripped +1 -1
Manual merge
server-tools/instance-manager/options.cc
1.33 06/05/15 21:58:58 lars@stripped +28 -0
Manual merge
mysql-test/t/information_schema.test
1.78 06/05/15 21:58:58 lars@stripped +18 -20
Manual merge
mysql-test/r/rpl_stm_until.result
1.25 06/05/15 21:58:57 lars@stripped +0 -4
Manual merge
mysql-test/r/ps_6bdb.result
1.45 06/05/15 21:58:57 lars@stripped +1 -2
Manual merge
mysql-test/r/ps_5merge.result
1.43 06/05/15 21:58:57 lars@stripped +2 -4
Manual merge
mysql-test/r/ps_4heap.result
1.42 06/05/15 21:58:57 lars@stripped +1 -2
Manual merge
mysql-test/r/ps_3innodb.result
1.46 06/05/15 21:58:57 lars@stripped +2 -3
Manual merge
mysql-test/r/ps_2myisam.result
1.43 06/05/15 21:58:57 lars@stripped +1 -2
Manual merge
mysql-test/r/information_schema.result
1.119 06/05/15 21:58:57 lars@stripped +9 -9
Manual merge
mysql-test/r/case.result
1.28 06/05/15 21:58:57 lars@stripped +5 -9
Manual merge
zlib/Makefile.am
1.12 06/05/15 16:07:50 lars@stripped +0 -0
Auto merged
zlib/Makefile.am
1.11 06/05/15 16:07:50 lars@stripped +0 -0
Change mode to -rw-rw-r--
strings/decimal.c
1.70 06/05/15 16:07:49 lars@stripped +0 -0
Auto merged
strings/decimal.c
1.69 06/05/15 16:07:49 lars@stripped +0 -0
Change mode to -rw-rw-r--
storage/myisammrg/myrg_rnext_same.c
1.7 06/05/15 16:07:44 lars@stripped +0 -0
Auto merged
storage/myisammrg/myrg_rnext_same.c
1.6 06/05/15 16:07:44 lars@stripped +0 -0
Change mode to -rw-rw-r--
storage/myisammrg/myrg_range.c
1.6 06/05/15 16:07:43 lars@stripped +0 -0
Auto merged
storage/myisammrg/myrg_range.c
1.5 06/05/15 16:07:43 lars@stripped +0 -0
Change mode to -rw-rw-r--
storage/myisam/ftbench/README
1.5 06/05/15 16:07:42 lars@stripped +0 -0
Auto merged
storage/myisam/ftbench/README
1.4 06/05/15 16:07:42 lars@stripped +0 -0
Change mode to -rw-rw-r--
storage/myisam/ftbench/Ereport.pl
1.6 06/05/15 16:07:41 lars@stripped +0 -0
Auto merged
storage/myisam/ftbench/Ereport.pl
1.5 06/05/15 16:07:41 lars@stripped +0 -0
Change mode to -rwxrwxr--
storage/myisam/ftbench/Ecreate.pl
1.4 06/05/15 16:07:40 lars@stripped +0 -0
Auto merged
storage/myisam/ftbench/Ecreate.pl
1.3 06/05/15 16:07:40 lars@stripped +0 -0
Change mode to -rwxrwxr--
storage/myisam/ftbench/Ecompare.pl
1.5 06/05/15 16:07:32 lars@stripped +0 -0
Auto merged
storage/myisam/ftbench/Ecompare.pl
1.4 06/05/15 16:07:32 lars@stripped +0 -0
Change mode to -rwxrwxr--
storage/bdb/dist/s_dir
1.5 06/05/15 16:07:29 lars@stripped +0 -0
Auto merged
storage/bdb/dist/s_dir
1.4 06/05/15 16:07:29 lars@stripped +0 -0
Change mode to -rw-rw-r--
sql/share/errmsg.txt
1.99 06/05/15 16:07:28 lars@stripped +0 -0
Auto merged
sql/sql_yacc.yy
1.477 06/05/15 16:07:27 lars@stripped +0 -0
Auto merged
sql/sql_show.cc
1.335 06/05/15 16:07:26 lars@stripped +0 -0
Auto merged
sql/sql_parse.cc
1.547 06/05/15 16:07:25 lars@stripped +0 -0
Auto merged
sql/sql_handler.cc
1.84 06/05/15 16:07:24 lars@stripped +0 -0
Auto merged
sql/sql_insert.cc
1.199 06/05/15 16:07:24 lars@stripped +0 -0
Auto merged
sql/sql_handler.cc
1.83 06/05/15 16:07:24 lars@stripped +0 -0
Change mode to -rw-rw-r--
sql/sql_bitmap.h
1.16 06/05/15 16:07:22 lars@stripped +0 -0
Auto merged
sql/sql_bitmap.h
1.15 06/05/15 16:07:22 lars@stripped +0 -0
Change mode to -rw-rw-r--
sql/sql_base.cc
1.322 06/05/15 16:07:17 lars@stripped +0 -0
Auto merged
sql/item_timefunc.cc
1.115 06/05/15 16:07:16 lars@stripped +0 -0
Auto merged
sql/item_subselect.cc
1.123 06/05/15 16:07:16 lars@stripped +0 -0
Auto merged
sql/item_strfunc.cc
1.270 06/05/15 16:07:16 lars@stripped +0 -0
Auto merged
sql/item_func.h
1.140 06/05/15 16:07:15 lars@stripped +0 -0
Auto merged
sql/item.h
1.200 06/05/15 16:07:15 lars@stripped +0 -0
Auto merged
mysys/my_mmap.c
1.10 06/05/15 16:07:14 lars@stripped +0 -0
Auto merged
sql/item.cc
1.189 06/05/15 16:07:14 lars@stripped +0 -0
Auto merged
sql/field_conv.cc
1.59 06/05/15 16:07:14 lars@stripped +0 -0
Auto merged
server-tools/instance-manager/options.h
1.16 06/05/15 16:07:14 lars@stripped +0 -0
Auto merged
mysys/my_mmap.c
1.9 06/05/15 16:07:14 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysys/mf_tempdir.c
1.9 06/05/15 16:07:13 lars@stripped +0 -0
Auto merged
mysys/mf_tempdir.c
1.8 06/05/15 16:07:13 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/view.test
1.146 06/05/15 16:07:12 lars@stripped +0 -0
Auto merged
mysql-test/t/variables.test
1.59 06/05/15 16:07:11 lars@stripped +0 -0
Auto merged
mysql-test/t/trigger.test
1.47 06/05/15 16:07:11 lars@stripped +0 -0
Auto merged
mysql-test/t/trigger-grant.test
1.10 06/05/15 16:07:11 lars@stripped +0 -0
Auto merged
mysql-test/t/sp.test
1.189 06/05/15 16:07:11 lars@stripped +0 -0
Auto merged
mysql-test/t/rpl_temporary.test
1.21 06/05/15 16:07:11 lars@stripped +0 -0
Auto merged
mysql-test/t/rpl_rewrt_db.test
1.9 06/05/15 16:07:10 lars@stripped +0 -0
Auto merged
mysql-test/t/rpl_stm_until.test
1.24 06/05/15 16:07:10 lars@stripped +0 -0
Auto merged
mysql-test/t/rpl_rewrt_db.test
1.8 06/05/15 16:07:10 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/rpl_rewrt_db-slave.opt
1.6 06/05/15 16:07:09 lars@stripped +0 -0
Auto merged
mysql-test/t/rpl_rewrt_db-slave.opt
1.5 06/05/15 16:07:09 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/rpl_insert_ignore.test
1.6 06/05/15 16:07:08 lars@stripped +0 -0
Auto merged
mysql-test/t/rpl_insert_ignore.test
1.5 06/05/15 16:07:08 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/rpl_commit_after_flush.test
1.10 06/05/15 16:07:07 lars@stripped +0 -0
Auto merged
mysql-test/t/rpl_commit_after_flush.test
1.9 06/05/15 16:07:07 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/mysqltest.test
1.49 06/05/15 16:07:06 lars@stripped +0 -0
Auto merged
mysql-test/t/mysqltest.test
1.48 06/05/15 16:07:06 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/handler.test
1.30 06/05/15 16:07:05 lars@stripped +0 -0
Auto merged
mysql-test/t/mysql.test
1.12 06/05/15 16:07:05 lars@stripped +0 -0
Auto merged
mysql-test/t/handler.test
1.29 06/05/15 16:07:05 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/grant2.test
1.38 06/05/15 16:07:04 lars@stripped +0 -0
Auto merged
mysql-test/t/grant2.test
1.37 06/05/15 16:07:04 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/create_select_tmp.test
1.13 06/05/15 16:07:03 lars@stripped +0 -0
Auto merged
mysql-test/t/create_select_tmp.test
1.12 06/05/15 16:07:02 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt
1.5 06/05/15 16:07:02 lars@stripped +0 -0
Auto merged
mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt
1.4 06/05/15 16:07:01 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/t/binlog_row_binlog-master.opt
1.4 06/05/15 16:07:00 lars@stripped +0 -0
Auto merged
mysql-test/t/binlog_row_binlog-master.opt
1.3 06/05/15 16:07:00 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/view_grant.result
1.18 06/05/15 16:06:59 lars@stripped +0 -0
Auto merged
mysql-test/r/view_grant.result
1.17 06/05/15 16:06:59 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/view.result
1.159 06/05/15 16:06:58 lars@stripped +0 -0
Auto merged
mysql-test/r/variables.result
1.84 06/05/15 16:06:58 lars@stripped +0 -0
Auto merged
mysql-test/r/type_newdecimal.result
1.41 06/05/15 16:06:57 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/type_float.result
1.48 06/05/15 16:06:57 lars@stripped +0 -0
Auto merged
mysql-test/r/type_bit_innodb.result
1.9 06/05/15 16:06:56 lars@stripped +0 -0
Auto merged
mysql-test/r/type_bit_innodb.result
1.8 06/05/15 16:06:56 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/trigger.result
1.43 06/05/15 16:06:56 lars@stripped +0 -0
Auto merged
mysql-test/r/trigger-grant.result
1.8 06/05/15 16:06:55 lars@stripped +0 -0
Auto merged
mysql-test/r/trigger-grant.result
1.7 06/05/15 16:06:55 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/trigger-compat.result
1.6 06/05/15 16:06:54 lars@stripped +0 -0
Auto merged
mysql-test/r/trigger-compat.result
1.5 06/05/15 16:06:54 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/timezone_grant.result
1.7 06/05/15 16:06:53 lars@stripped +0 -0
Auto merged
mysql-test/r/timezone_grant.result
1.6 06/05/15 16:06:52 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/subselect.result
1.145 06/05/15 16:06:52 lars@stripped +0 -0
Auto merged
mysql-test/r/sp_trans.result
1.11 06/05/15 16:06:51 lars@stripped +0 -0
Auto merged
mysql-test/r/sp_trans.result
1.10 06/05/15 16:06:51 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/sp-vars.result
1.5 06/05/15 16:06:50 lars@stripped +0 -0
Auto merged
mysql-test/r/sp.result
1.205 06/05/15 16:06:50 lars@stripped +0 -0
Auto merged
mysql-test/r/sp-vars.result
1.4 06/05/15 16:06:50 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/sp-code.result
1.9 06/05/15 16:06:49 lars@stripped +0 -0
Auto merged
mysql-test/r/sp-error.result
1.109 06/05/15 16:06:49 lars@stripped +0 -0
Auto merged
mysql-test/r/sp-code.result
1.8 06/05/15 16:06:49 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/rpl_view.result
1.8 06/05/15 16:06:48 lars@stripped +0 -0
Auto merged
mysql-test/r/select.result
1.124 06/05/15 16:06:48 lars@stripped +0 -0
Auto merged
mysql-test/r/rpl_view.result
1.7 06/05/15 16:06:48 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/rpl_trigger.result
1.8 06/05/15 16:06:47 lars@stripped +0 -0
Auto merged
mysql-test/r/rpl_trigger.result
1.7 06/05/15 16:06:47 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/rpl_temporary.result
1.26 06/05/15 16:06:46 lars@stripped +0 -0
Auto merged
mysql-test/r/rpl_slave_status.result
1.8 06/05/15 16:06:46 lars@stripped +0 -0
Auto merged
mysql-test/r/rpl_multi_update3.result
1.8 06/05/15 16:06:45 lars@stripped +0 -0
Auto merged
mysql-test/r/rpl_slave_status.result
1.7 06/05/15 16:06:45 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/rpl_multi_update3.result
1.7 06/05/15 16:06:45 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/rpl_drop_db.result
1.7 06/05/15 16:06:44 lars@stripped +0 -0
Auto merged
mysql-test/r/rpl_drop_db.result
1.6 06/05/15 16:06:44 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/query_cache_notembedded.result
1.7 06/05/15 16:06:43 lars@stripped +0 -0
Auto merged
mysql-test/r/rpl_create_database.result
1.10 06/05/15 16:06:43 lars@stripped +0 -0
Auto merged
mysql-test/r/query_cache_notembedded.result
1.6 06/05/15 16:06:43 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/ps_7ndb.result
1.42 06/05/15 16:06:41 lars@stripped +0 -0
Auto merged
mysql-test/r/ndb_update.result
1.8 06/05/15 16:06:40 lars@stripped +0 -0
Auto merged
mysql-test/r/ndb_update.result
1.7 06/05/15 16:06:40 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/ndb_gis.result
1.11 06/05/15 16:06:39 lars@stripped +0 -0
Auto merged
mysql-test/r/ndb_gis.result
1.10 06/05/15 16:06:39 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/ndb_database.result
1.4 06/05/15 16:06:38 lars@stripped +0 -0
Auto merged
mysql-test/r/ndb_database.result
1.3 06/05/15 16:06:38 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/ndb_condition_pushdown.result
1.22 06/05/15 16:06:37 lars@stripped +0 -0
Auto merged
mysql-test/r/ndb_condition_pushdown.result
1.21 06/05/15 16:06:37 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/ndb_bitfield.result
1.16 06/05/15 16:06:36 lars@stripped +0 -0
Auto merged
mysql-test/r/ndb_bitfield.result
1.15 06/05/15 16:06:36 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/mysqldump-max.result
1.5 06/05/15 16:06:35 lars@stripped +0 -0
Auto merged
mysql-test/r/mysqldump-max.result
1.4 06/05/15 16:06:35 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/join_outer.result
1.48 06/05/15 16:06:34 lars@stripped +0 -0
Auto merged
mysql-test/r/insert_update.result
1.20 06/05/15 16:06:34 lars@stripped +0 -0
Auto merged
mysql-test/r/innodb_gis.result
1.6 06/05/15 16:06:33 lars@stripped +0 -0
Auto merged
mysql-test/r/innodb_gis.result
1.5 06/05/15 16:06:33 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/im_utils.result
1.5 06/05/15 16:06:32 lars@stripped +0 -0
Auto merged
mysql-test/r/im_utils.result
1.4 06/05/15 16:06:32 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/im_life_cycle.result
1.7 06/05/15 16:06:31 lars@stripped +0 -0
Auto merged
mysql-test/r/im_life_cycle.result
1.6 06/05/15 16:06:31 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/grant2.result
1.31 06/05/15 16:06:30 lars@stripped +0 -0
Auto merged
mysql-test/r/func_time.result
1.51 06/05/15 16:06:30 lars@stripped +0 -0
Auto merged
mysql-test/r/func_str.result
1.114 06/05/15 16:06:30 lars@stripped +0 -0
Auto merged
mysql-test/r/binlog_stm_ctype_ucs.result
1.7 06/05/15 16:06:29 lars@stripped +0 -0
Auto merged
mysql-test/r/binlog_stm_blackhole.result
1.13 06/05/15 16:06:29 lars@stripped +0 -0
Auto merged
mysql-test/r/binlog_stm_ctype_ucs.result
1.6 06/05/15 16:06:29 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/binlog_stm_blackhole.result
1.12 06/05/15 16:06:29 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/binlog_stm_binlog.result
1.10 06/05/15 16:06:28 lars@stripped +0 -0
Auto merged
mysql-test/r/binlog_stm_binlog.result
1.9 06/05/15 16:06:28 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/bdb_gis.result
1.7 06/05/15 16:06:27 lars@stripped +0 -0
Auto merged
mysql-test/r/bdb_gis.result
1.6 06/05/15 16:06:27 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/r/archive_gis.result
1.6 06/05/15 16:06:26 lars@stripped +0 -0
Auto merged
mysql-test/r/archive_gis.result
1.5 06/05/15 16:06:26 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/extra/rpl_tests/rpl_multi_query.test
1.11 06/05/15 16:06:25 lars@stripped +0 -0
Auto merged
mysql-test/lib/mtr_process.pl
1.33 06/05/15 16:06:25 lars@stripped +0 -0
Auto merged
mysql-test/extra/rpl_tests/rpl_multi_query.test
1.10 06/05/15 16:06:25 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/extra/rpl_tests/rpl_ddl.test
1.11 06/05/15 16:06:24 lars@stripped +0 -0
Auto merged
mysql-test/extra/rpl_tests/rpl_ddl.test
1.10 06/05/15 16:06:24 lars@stripped +0 -0
Change mode to -rw-rw-r--
mysql-test/extra/binlog_tests/binlog.test
1.9 06/05/15 16:06:24 lars@stripped +0 -0
Auto merged
mysql-test/extra/binlog_tests/binlog.test
1.8 06/05/15 16:06:23 lars@stripped +0 -0
Change mode to -rw-rw-r--
BitKeeper/deleted/.del-mysql_prepare_privilege_tables_for_5.sql~76ea3c82bdbbead4
1.4 06/05/15 16:06:22 lars@stripped +0 -0
Auto merged
mysql-test/mysql-test-run.pl
1.114 06/05/15 16:06:22 lars@stripped +0 -0
Auto merged
client/mysql.cc
1.208 06/05/15 16:06:22 lars@stripped +0 -0
Auto merged
BitKeeper/deleted/.del-mysql_prepare_privilege_tables_for_5.sql~76ea3c82bdbbead4
1.3 06/05/15 16:06:22 lars@stripped +0 -0
Change mode to -rw-rw-r--
BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17
1.8 06/05/15 16:06:20 lars@stripped +0 -0
Auto merged
BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17
1.7 06/05/15 16:06:20 lars@stripped +0 -0
Change mode to -rw-rw-r--
configure.in
1.351 06/05/15 16:05:22 lars@stripped +0 -0
Auto merged
storage/myisammrg/myrg_rnext_same.c
1.4.1.2 06/05/15 16:05:21 lars@stripped +0 -0
Merge rename: myisammrg/myrg_rnext_same.c -> storage/myisammrg/myrg_rnext_same.c
storage/myisammrg/myrg_range.c
1.3.1.3 06/05/15 16:05:21 lars@stripped +0 -0
Merge rename: myisammrg/myrg_range.c -> storage/myisammrg/myrg_range.c
storage/myisam/ftbench/README
1.2.1.2 06/05/15 16:05:21 lars@stripped +0 -0
Merge rename: myisam/ftbench/README -> storage/myisam/ftbench/README
storage/myisam/ftbench/Ereport.pl
1.3.1.2 06/05/15 16:05:21 lars@stripped +0 -0
Merge rename: myisam/ftbench/Ereport.pl -> storage/myisam/ftbench/Ereport.pl
storage/myisam/ftbench/Ecreate.pl
1.1.1.2 06/05/15 16:05:21 lars@stripped +0 -0
Merge rename: myisam/ftbench/Ecreate.pl -> storage/myisam/ftbench/Ecreate.pl
mysql-test/r/binlog_stm_binlog.result
1.4.2.2 06/05/15 16:05:21 lars@stripped +0 -0
Merge rename: mysql-test/r/binlog.result -> mysql-test/r/binlog_stm_binlog.result
storage/myisam/ftbench/Ecompare.pl
1.2.1.2 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: myisam/ftbench/Ecompare.pl -> storage/myisam/ftbench/Ecompare.pl
storage/bdb/dist/s_dir
1.1.1.2 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: bdb/dist/s_dir -> storage/bdb/dist/s_dir
mysql-test/t/rpl_stm_until.test
1.21.3.2 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: mysql-test/t/rpl_until.test -> mysql-test/t/rpl_stm_until.test
mysql-test/t/rpl_rewrt_db.test
1.4.3.3 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: mysql-test/t/rpl_rewrite_db.test -> mysql-test/t/rpl_rewrt_db.test
mysql-test/t/rpl_rewrt_db-slave.opt
1.2.1.2 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: mysql-test/t/rpl_rewrite_db-slave.opt -> mysql-test/t/rpl_rewrt_db-slave.opt
mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt
1.2.1.2 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: mysql-test/t/mix_innodb_myisam_binlog-master.opt -> mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt
mysql-test/extra/rpl_tests/rpl_multi_query.test
1.7.1.3 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: mysql-test/t/rpl_multi_query.test -> mysql-test/extra/rpl_tests/rpl_multi_query.test
mysql-test/extra/rpl_tests/rpl_ddl.test
1.7.1.3 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: mysql-test/t/rpl_ddl.test -> mysql-test/extra/rpl_tests/rpl_ddl.test
mysql-test/extra/binlog_tests/binlog.test
1.4.2.2 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: mysql-test/t/binlog.test -> mysql-test/extra/binlog_tests/binlog.test
BitKeeper/deleted/.del-mysql_prepare_privilege_tables_for_5.sql~76ea3c82bdbbead4
1.1.1.2 06/05/15 16:05:20 lars@stripped +0 -0
Merge rename: scripts/mysql_prepare_privilege_tables_for_5.sql -> BitKeeper/deleted/.del-mysql_prepare_privilege_tables_for_5.sql~76ea3c82bdbbead4
mysql-test/t/binlog_row_binlog-master.opt
1.1.1.2 06/05/15 16:05:19 lars@stripped +0 -0
Merge rename: mysql-test/t/binlog-master.opt -> mysql-test/t/binlog_row_binlog-master.opt
mysql-test/r/rpl_stm_until.result
1.23.1.2 06/05/15 16:05:19 lars@stripped +0 -0
Merge rename: mysql-test/r/rpl_until.result -> mysql-test/r/rpl_stm_until.result
mysql-test/r/binlog_stm_ctype_ucs.result
1.2.2.3 06/05/15 16:05:19 lars@stripped +0 -0
Merge rename: mysql-test/r/ctype_cp932_binlog.result -> mysql-test/r/binlog_stm_ctype_ucs.result
mysql-test/r/binlog_stm_blackhole.result
1.5.3.3 06/05/15 16:05:19 lars@stripped +0 -0
Merge rename: mysql-test/r/blackhole.result -> mysql-test/r/binlog_stm_blackhole.result
BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17
1.4.2.3 06/05/15 16:05:19 lars@stripped +0 -0
Merge rename: mysql-test/r/ctype_ucs_binlog.result -> BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: lars
# Host: dl145k.mysql.com
# Root: /users/lthalmann/bk/mysql-5.1-new-rpl/RESYNC
--- 1.207/client/mysql.cc 2006-05-12 08:41:59 +02:00
+++ 1.208/client/mysql.cc 2006-05-15 16:06:22 +02:00
@@ -448,6 +448,14 @@
MYF(MY_WME));
if (histfile)
sprintf(histfile,"%s/.mysql_history",getenv("HOME"));
+ char link_name[FN_REFLEN];
+ if (my_readlink(link_name, histfile, 0) == 0 &&
+ strncmp(link_name, "/dev/null", 10) == 0)
+ {
+ /* The .mysql_history file is a symlink to /dev/null, don't use it */
+ my_free(histfile, MYF(MY_ALLOW_ZERO_PTR));
+ histfile= 0;
+ }
}
if (histfile)
{
@@ -484,7 +492,7 @@
{
mysql_close(&mysql);
#ifdef HAVE_READLINE
- if (!status.batch && !quick && !opt_html && !opt_xml)
+ if (!status.batch && !quick && !opt_html && !opt_xml && histfile)
{
/* write-history */
if (verbose)
@@ -2339,7 +2347,7 @@
uint extra_padding;
/* If this column may have a null value, use "NULL" for empty. */
- if (! not_null_flag[off] && (lengths[off] == 0))
+ if (! not_null_flag[off] && (cur[off] == NULL))
{
buffer= "NULL";
data_length= 4;
--- 1.58/sql/field_conv.cc 2006-03-14 16:46:18 +01:00
+++ 1.59/sql/field_conv.cc 2006-05-15 16:07:14 +02:00
@@ -641,7 +641,8 @@
void field_conv(Field *to,Field *from)
{
- if (to->real_type() == from->real_type())
+ if (to->real_type() == from->real_type() &&
+ !(to->type() == FIELD_TYPE_BLOB && to->table->copy_blobs))
{
if (to->pack_length() == from->pack_length() &&
!(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) &&
--- 1.188/sql/item.cc 2006-04-30 22:13:54 +02:00
+++ 1.189/sql/item.cc 2006-05-15 16:07:14 +02:00
@@ -961,6 +961,12 @@
}
+bool Item_splocal::set_value(THD *thd, sp_rcontext *ctx, Item *it)
+{
+ return ctx->set_variable(thd, get_var_idx(), it);
+}
+
+
/*****************************************************************************
Item_case_expr methods
*****************************************************************************/
@@ -1890,7 +1896,6 @@
name= (char*) str_arg;
decimals= (uint8) decimal_value.frac;
fixed= 1;
- unsigned_flag= !decimal_value.sign();
max_length= my_decimal_precision_to_length(decimal_value.intg + decimals,
decimals, unsigned_flag);
}
@@ -1900,7 +1905,6 @@
int2my_decimal(E_DEC_FATAL_ERROR, val, unsig, &decimal_value);
decimals= (uint8) decimal_value.frac;
fixed= 1;
- unsigned_flag= !decimal_value.sign();
max_length= my_decimal_precision_to_length(decimal_value.intg + decimals,
decimals, unsigned_flag);
}
@@ -1911,7 +1915,6 @@
double2my_decimal(E_DEC_FATAL_ERROR, val, &decimal_value);
decimals= (uint8) decimal_value.frac;
fixed= 1;
- unsigned_flag= !decimal_value.sign();
max_length= my_decimal_precision_to_length(decimal_value.intg + decimals,
decimals, unsigned_flag);
}
@@ -1924,7 +1927,6 @@
name= (char*) str;
decimals= (uint8) decimal_par;
max_length= length;
- unsigned_flag= !decimal_value.sign();
fixed= 1;
}
@@ -1934,7 +1936,6 @@
my_decimal2decimal(value_par, &decimal_value);
decimals= (uint8) decimal_value.frac;
fixed= 1;
- unsigned_flag= !decimal_value.sign();
max_length= my_decimal_precision_to_length(decimal_value.intg + decimals,
decimals, unsigned_flag);
}
@@ -1946,7 +1947,6 @@
&decimal_value, precision, scale);
decimals= (uint8) decimal_value.frac;
fixed= 1;
- unsigned_flag= !decimal_value.sign();
max_length= my_decimal_precision_to_length(precision, decimals,
unsigned_flag);
}
@@ -5413,6 +5413,25 @@
}
+void Item_trigger_field::set_required_privilege(const bool rw)
+{
+ /*
+ Require SELECT and UPDATE privilege if this field will be read and
+ set, and only UPDATE privilege for setting the field.
+ */
+ want_privilege= (rw ? SELECT_ACL | UPDATE_ACL : UPDATE_ACL);
+}
+
+
+bool Item_trigger_field::set_value(THD *thd, sp_rcontext */*ctx*/, Item *it)
+{
+ Item *item= sp_prepare_func_item(thd, &it);
+
+ return (!item || (!fixed && fix_fields(thd, 0)) ||
+ (item->save_in_field(field, 0) < 0));
+}
+
+
bool Item_trigger_field::fix_fields(THD *thd, Item **items)
{
/*
@@ -5435,8 +5454,7 @@
if (table_grants)
{
- table_grants->want_privilege=
- access_type == AT_READ ? SELECT_ACL : UPDATE_ACL;
+ table_grants->want_privilege= want_privilege;
if (check_grant_column(thd, table_grants, triggers->table->s->db.str,
triggers->table->s->table_name.str, field_name,
@@ -5468,6 +5486,7 @@
void Item_trigger_field::cleanup()
{
+ want_privilege= original_privilege;
/*
Since special nature of Item_trigger_field we should not do most of
things from Item_field::cleanup() or Item_ident::cleanup() here.
--- 1.199/sql/item.h 2006-04-30 22:13:54 +02:00
+++ 1.200/sql/item.h 2006-05-15 16:07:15 +02:00
@@ -401,6 +401,42 @@
/*************************************************************************/
+class sp_rcontext;
+
+
+class Settable_routine_parameter
+{
+public:
+ /*
+ Set required privileges for accessing the parameter.
+
+ SYNOPSIS
+ set_required_privilege()
+ rw if 'rw' is true then we are going to read and set the
+ parameter, so SELECT and UPDATE privileges might be
+ required, otherwise we only reading it and SELECT
+ privilege might be required.
+ */
+ virtual void set_required_privilege(bool rw) {};
+
+ /*
+ Set parameter value.
+
+ SYNOPSIS
+ set_value()
+ thd thread handle
+ ctx context to which parameter belongs (if it is local
+ variable).
+ it item which represents new value
+
+ RETURN
+ FALSE if parameter value has been set,
+ TRUE if error has occured.
+ */
+ virtual bool set_value(THD *thd, sp_rcontext *ctx, Item *it)= 0;
+};
+
+
typedef bool (Item::*Item_processor)(byte *arg);
typedef Item* (Item::*Item_transformer) (byte *arg);
typedef void (*Cond_traverser) (const Item *item, void *arg);
@@ -784,6 +820,15 @@
}
virtual bool is_splocal() { return 0; } /* Needed for error checking */
+
+ /*
+ Return Settable_routine_parameter interface of the Item. Return 0
+ if this Item is not Settable_routine_parameter.
+ */
+ virtual Settable_routine_parameter *get_settable_routine_parameter()
+ {
+ return 0;
+ }
};
@@ -882,7 +927,8 @@
runtime.
*****************************************************************************/
-class Item_splocal :public Item_sp_variable
+class Item_splocal :public Item_sp_variable,
+ private Settable_routine_parameter
{
uint m_var_idx;
@@ -920,6 +966,15 @@
inline enum Type type() const;
inline Item_result result_type() const;
+
+private:
+ bool set_value(THD *thd, sp_rcontext *ctx, Item *it);
+
+public:
+ Settable_routine_parameter *get_settable_routine_parameter()
+ {
+ return this;
+ }
};
/*****************************************************************************
@@ -2146,14 +2201,13 @@
two Field instances representing either OLD or NEW version of this
field.
*/
-class Item_trigger_field : public Item_field
+class Item_trigger_field : public Item_field,
+ private Settable_routine_parameter
{
public:
/* Is this item represents row from NEW or OLD row ? */
enum row_version_type {OLD_ROW, NEW_ROW};
row_version_type row_version;
- /* Is this item used for reading or updating the value? */
- enum access_types { AT_READ = 0x1, AT_UPDATE = 0x2 };
/* Next in list of all Item_trigger_field's in trigger */
Item_trigger_field *next_trg_field;
/* Index of the field in the TABLE::field array */
@@ -2164,11 +2218,11 @@
Item_trigger_field(Name_resolution_context *context_arg,
row_version_type row_ver_arg,
const char *field_name_arg,
- access_types access_type_arg)
+ ulong priv, const bool ro)
:Item_field(context_arg,
(const char *)NULL, (const char *)NULL, field_name_arg),
- row_version(row_ver_arg), field_idx((uint)-1),
- access_type(access_type_arg), table_grants(NULL)
+ row_version(row_ver_arg), field_idx((uint)-1), original_privilege(priv),
+ want_privilege(priv), table_grants(NULL), read_only (ro)
{}
void setup_field(THD *thd, TABLE *table, GRANT_INFO *table_grant_info);
enum Type type() const { return TRIGGER_FIELD_ITEM; }
@@ -2179,8 +2233,39 @@
void cleanup();
private:
- access_types access_type;
+ void set_required_privilege(const bool rw);
+ bool set_value(THD *thd, sp_rcontext *ctx, Item *it);
+
+public:
+ Settable_routine_parameter *get_settable_routine_parameter()
+ {
+ return (read_only ? 0 : this);
+ }
+
+ bool set_value(THD *thd, Item *it)
+ {
+ return set_value(thd, NULL, it);
+ }
+
+private:
+ /*
+ 'want_privilege' holds privileges required to perform operation on
+ this trigger field (SELECT_ACL if we are going to read it and
+ UPDATE_ACL if we are going to update it). It is initialized at
+ parse time but can be updated later if this trigger field is used
+ as OUT or INOUT parameter of stored routine (in this case
+ set_required_privilege() is called to appropriately update
+ want_privilege and cleanup() is responsible for restoring of
+ original want_privilege once parameter's value is updated).
+ */
+ ulong original_privilege;
+ ulong want_privilege;
GRANT_INFO *table_grants;
+ /*
+ Trigger field is read-only unless it belongs to the NEW row in a
+ BEFORE INSERT of BEFORE UPDATE trigger.
+ */
+ bool read_only;
};
--- 1.292/sql/item_func.cc 2006-05-12 08:42:00 +02:00
+++ 1.293/sql/item_func.cc 2006-05-15 21:58:58 +02:00
@@ -4122,6 +4122,18 @@
}
+bool Item_func_get_user_var::set_value(THD *thd,
+ sp_rcontext */*ctx*/, Item *it)
+{
+ Item_func_set_user_var *suv= new Item_func_set_user_var(get_name(), it);
+ /*
+ Item_func_set_user_var is not fixed after construction, call
+ fix_fields().
+ */
+ return (!suv || suv->fix_fields(thd, &it) || suv->check() || suv->update());
+}
+
+
bool Item_user_var_as_out_param::fix_fields(THD *thd, Item **ref)
{
DBUG_ASSERT(fixed == 0);
@@ -4757,6 +4769,7 @@
dummy_table->s->table_cache_key.str = empty_name;
dummy_table->s->table_name.str= empty_name;
dummy_table->s->db.str= empty_name;
+ dummy_table->copy_blobs= TRUE;
}
if (!(field= m_sp->create_result_field(max_length, name, dummy_table)))
my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
--- 1.139/sql/item_func.h 2006-05-04 14:34:26 +02:00
+++ 1.140/sql/item_func.h 2006-05-15 16:07:15 +02:00
@@ -1179,7 +1179,8 @@
};
-class Item_func_get_user_var :public Item_func
+class Item_func_get_user_var :public Item_func,
+ private Settable_routine_parameter
{
user_var_entry *var_entry;
@@ -1206,6 +1207,15 @@
table_map used_tables() const
{ return const_item() ? 0 : RAND_TABLE_BIT; }
bool eq(const Item *item, bool binary_cmp) const;
+
+private:
+ bool set_value(THD *thd, sp_rcontext *ctx, Item *it);
+
+public:
+ Settable_routine_parameter *get_settable_routine_parameter()
+ {
+ return this;
+ }
};
--- 1.269/sql/item_strfunc.cc 2006-04-25 19:00:08 +02:00
+++ 1.270/sql/item_strfunc.cc 2006-05-15 16:07:16 +02:00
@@ -2579,7 +2579,7 @@
(void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
- if (!my_stat(path, &stat_info, MYF(MY_WME)))
+ if (!my_stat(path, &stat_info, MYF(0)))
goto err;
if (!(stat_info.st_mode & S_IROTH))
--- 1.114/sql/item_timefunc.cc 2006-05-10 21:44:05 +02:00
+++ 1.115/sql/item_timefunc.cc 2006-05-15 16:07:16 +02:00
@@ -870,9 +870,9 @@
{
DBUG_ASSERT(fixed == 1);
const char *month_name;
- uint month=(uint) Item_func_month::val_int();
+ uint month= (uint) val_int();
- if (!month) // This is also true for NULL
+ if (null_value || !month)
{
null_value=1;
return (String*) 0;
@@ -2021,8 +2021,13 @@
Item_date_add_interval *other= (Item_date_add_interval*) item;
if ((int_type != other->int_type) ||
- (!args[0]->eq(other->args[0], binary_cmp)) ||
- (get_interval_value(args[1], int_type, &val, &interval)))
+ (!args[0]->eq(other->args[0], binary_cmp)))
+ return FALSE;
+
+ if (!args[1]->const_item() || !other->args[1]->const_item())
+ return (args[1]->eq(other->args[1], binary_cmp));
+
+ if (get_interval_value(args[1], int_type, &val, &interval))
return FALSE;
val= other->value;
--- 1.400/sql/mysql_priv.h 2006-05-12 08:42:01 +02:00
+++ 1.401/sql/mysql_priv.h 2006-05-15 21:58:58 +02:00
@@ -868,6 +868,7 @@
List<Item> *items,
MYSQL_LOCK **lock,
TABLEOP_HOOKS *hooks);
+
bool mysql_alter_table(THD *thd, char *new_db, char *new_name,
HA_CREATE_INFO *create_info,
TABLE_LIST *table_list,
@@ -1649,10 +1650,11 @@
MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count,
uint flags, bool *need_reopen);
-/* mysql_lock_tables() flags bits */
+/* mysql_lock_tables() and open_table() flags bits */
#define MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK 0x0001
#define MYSQL_LOCK_IGNORE_FLUSH 0x0002
#define MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN 0x0004
+#define MYSQL_OPEN_IGNORE_LOCKED_TABLES 0x0008
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock);
void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock);
--- 1.321/sql/sql_base.cc 2006-05-05 19:08:37 +02:00
+++ 1.322/sql/sql_base.cc 2006-05-15 16:07:17 +02:00
@@ -1791,6 +1791,8 @@
MYSQL_LOCK_IGNORE_FLUSH - Open table even if
someone has done a flush or namelock on it.
No version number checking is done.
+ MYSQL_OPEN_IGNORE_LOCKED_TABLES - Open table
+ ignoring set of locked tables and prelocked mode.
IMPLEMENTATION
Uses a cache of open tables to find a table not in use.
@@ -1850,7 +1852,8 @@
}
}
- if (thd->locked_tables || thd->prelocked_mode)
+ if (!(flags & MYSQL_OPEN_IGNORE_LOCKED_TABLES) &&
+ (thd->locked_tables || thd->prelocked_mode))
{ // Using table locks
TABLE *best_table= 0;
int best_distance= INT_MIN;
--- 1.198/sql/sql_insert.cc 2006-04-18 01:40:08 +02:00
+++ 1.199/sql/sql_insert.cc 2006-05-15 16:07:24 +02:00
@@ -2518,6 +2518,153 @@
CREATE TABLE (SELECT) ...
***************************************************************************/
+/*
+ Create table from lists of fields and items (or open existing table
+ with same name).
+
+ SYNOPSIS
+ create_table_from_items()
+ thd in Thread object
+ create_info in Create information (like MAX_ROWS, ENGINE or
+ temporary table flag)
+ create_table in Pointer to TABLE_LIST object providing database
+ and name for table to be created or to be open
+ extra_fields in/out Initial list of fields for table to be created
+ keys in List of keys for table to be created
+ items in List of items which should be used to produce rest
+ of fields for the table (corresponding fields will
+ be added to the end of 'extra_fields' list)
+ lock out Pointer to the MYSQL_LOCK object for table created
+ (open) will be returned in this parameter. Since
+ this table is not included in THD::lock caller is
+ responsible for explicitly unlocking this table.
+
+ NOTES
+ If 'create_info->options' bitmask has HA_LEX_CREATE_IF_NOT_EXISTS
+ flag and table with name provided already exists then this function will
+ simply open existing table.
+ Also note that create, open and lock sequence in this function is not
+ atomic and thus contains gap for deadlock and can cause other troubles.
+ Since this function contains some logic specific to CREATE TABLE ... SELECT
+ it should be changed before it can be used in other contexts.
+
+ RETURN VALUES
+ non-zero Pointer to TABLE object for table created or opened
+ 0 Error
+*/
+
+static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
+ TABLE_LIST *create_table,
+ List<create_field> *extra_fields,
+ List<Key> *keys, List<Item> *items,
+ MYSQL_LOCK **lock)
+{
+ TABLE tmp_table; // Used during 'create_field()'
+ TABLE *table= 0;
+ uint select_field_count= items->elements;
+ /* Add selected items to field list */
+ List_iterator_fast<Item> it(*items);
+ Item *item;
+ Field *tmp_field;
+ bool not_used;
+ DBUG_ENTER("create_table_from_items");
+
+ tmp_table.alias= 0;
+ tmp_table.timestamp_field= 0;
+ tmp_table.s= &tmp_table.share_not_to_be_used;
+ tmp_table.s->db_create_options=0;
+ tmp_table.s->blob_ptr_size= portable_sizeof_char_ptr;
+ tmp_table.s->db_low_byte_first= test(create_info->db_type == DB_TYPE_MYISAM ||
+ create_info->db_type == DB_TYPE_HEAP);
+ tmp_table.null_row=tmp_table.maybe_null=0;
+
+ while ((item=it++))
+ {
+ create_field *cr_field;
+ Field *field;
+ if (item->type() == Item::FUNC_ITEM)
+ field=item->tmp_table_field(&tmp_table);
+ else
+ field=create_tmp_field(thd, &tmp_table, item, item->type(),
+ (Item ***) 0, &tmp_field, 0, 0, 0, 0, 0);
+ if (!field ||
+ !(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ?
+ ((Item_field *)item)->field :
+ (Field*) 0))))
+ DBUG_RETURN(0);
+ if (item->maybe_null)
+ cr_field->flags &= ~NOT_NULL_FLAG;
+ extra_fields->push_back(cr_field);
+ }
+ /*
+ create and lock table
+
+ We don't log the statement, it will be logged later.
+
+ If this is a HEAP table, the automatic DELETE FROM which is written to the
+ binlog when a HEAP table is opened for the first time since startup, must
+ not be written: 1) it would be wrong (imagine we're in CREATE SELECT: we
+ don't want to delete from it) 2) it would be written before the CREATE
+ TABLE, which is a wrong order. So we keep binary logging disabled when we
+ open_table().
+ NOTE: By locking table which we just have created (or for which we just have
+ have found that it already exists) separately from other tables used by the
+ statement we create potential window for deadlock.
+ TODO: create and open should be done atomic !
+ */
+ {
+ tmp_disable_binlog(thd);
+ if (!mysql_create_table(thd, create_table->db, create_table->table_name,
+ create_info, *extra_fields, *keys, 0,
+ select_field_count))
+ {
+ /*
+ If we are here in prelocked mode we either create temporary table
+ or prelocked mode is caused by the SELECT part of this statement.
+ */
+ DBUG_ASSERT(!thd->prelocked_mode ||
+ create_info->options & HA_LEX_CREATE_TMP_TABLE ||
+ thd->lex->requires_prelocking());
+
+ /*
+ NOTE: We don't want to ignore set of locked tables here if we are
+ under explicit LOCK TABLES since it will open gap for deadlock
+ too wide (and also is not backward compatible).
+ */
+ if (! (table= open_table(thd, create_table, thd->mem_root, (bool*) 0,
+ (MYSQL_LOCK_IGNORE_FLUSH |
+ ((thd->prelocked_mode == PRELOCKED) ?
+ MYSQL_OPEN_IGNORE_LOCKED_TABLES:0)))))
+ quick_rm_table(create_info->db_type, create_table->db,
+ table_case_name(create_info, create_table->table_name));
+ }
+ reenable_binlog(thd);
+ if (!table) // open failed
+ DBUG_RETURN(0);
+ }
+
+ /*
+ FIXME: What happens if trigger manages to be created while we are
+ obtaining this lock ? May be it is sensible just to disable
+ trigger execution in this case ? Or will MYSQL_LOCK_IGNORE_FLUSH
+ save us from that ?
+ */
+ table->reginfo.lock_type=TL_WRITE;
+ if (! ((*lock)= mysql_lock_tables(thd, &table, 1,
+ MYSQL_LOCK_IGNORE_FLUSH, ¬_used)))
+ {
+ VOID(pthread_mutex_lock(&LOCK_open));
+ hash_delete(&open_cache,(byte*) table);
+ VOID(pthread_mutex_unlock(&LOCK_open));
+ quick_rm_table(create_info->db_type, create_table->db,
+ table_case_name(create_info, create_table->table_name));
+ DBUG_RETURN(0);
+ }
+ table->file->extra(HA_EXTRA_WRITE_CACHE);
+ DBUG_RETURN(table);
+}
+
+
int
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
{
--- 1.546/sql/sql_parse.cc 2006-05-12 18:22:22 +02:00
+++ 1.547/sql/sql_parse.cc 2006-05-15 16:07:25 +02:00
@@ -5890,6 +5890,7 @@
}
else
{
+ DBUG_ASSERT(thd->net.report_error);
DBUG_PRINT("info",("Command aborted. Fatal_error: %d",
thd->is_fatal_error));
query_cache_abort(&thd->net);
@@ -7422,7 +7423,7 @@
lex->create_info.merge_list.first))
goto err;
if (grant_option && want_priv != CREATE_TMP_ACL &&
- check_grant(thd, want_priv, create_table, 0, UINT_MAX, 0))
+ check_grant(thd, want_priv, create_table, 0, 1, 0))
goto err;
if (select_lex->item_list.elements)
--- 1.334/sql/sql_show.cc 2006-05-12 18:22:23 +02:00
+++ 1.335/sql/sql_show.cc 2006-05-15 16:07:26 +02:00
@@ -2932,7 +2932,7 @@
field->real_type() == MYSQL_TYPE_STRING) // For binary type
{
uint32 octet_max_length= field->max_length();
- if (octet_max_length != (uint32) 4294967295U)
+ if (is_blob && octet_max_length != (uint32) 4294967295U)
octet_max_length /= field->charset()->mbmaxlen;
longlong char_max_len= is_blob ?
(longlong) octet_max_length / field->charset()->mbminlen :
@@ -3169,17 +3169,18 @@
const char *wild, bool full_access, const char *sp_user)
{
String tmp_string;
+ String sp_db, sp_name, definer;
TIME time;
LEX *lex= thd->lex;
CHARSET_INFO *cs= system_charset_info;
- const char *sp_db, *sp_name, *definer;
- sp_db= get_field(thd->mem_root, proc_table->field[0]);
- sp_name= get_field(thd->mem_root, proc_table->field[1]);
- definer= get_field(thd->mem_root, proc_table->field[11]);
+ get_field(thd->mem_root, proc_table->field[0], &sp_db);
+ get_field(thd->mem_root, proc_table->field[1], &sp_name);
+ get_field(thd->mem_root, proc_table->field[11], &definer);
if (!full_access)
- full_access= !strcmp(sp_user, definer);
- if (!full_access && check_some_routine_access(thd, sp_db, sp_name,
- proc_table->field[2]->val_int() == TYPE_ENUM_PROCEDURE))
+ full_access= !strcmp(sp_user, definer.ptr());
+ if (!full_access && check_some_routine_access(thd, sp_db.ptr(), sp_name.ptr(),
+ proc_table->field[2]->val_int() ==
+ TYPE_ENUM_PROCEDURE))
return 0;
if (lex->orig_sql_command == SQLCOM_SHOW_STATUS_PROC &&
@@ -3189,13 +3190,13 @@
lex->orig_sql_command == SQLCOM_END)
{
restore_record(table, s->default_values);
- if (!wild || !wild[0] || !wild_compare(sp_name, wild, 0))
+ if (!wild || !wild[0] || !wild_compare(sp_name.ptr(), wild, 0))
{
int enum_idx= proc_table->field[5]->val_int();
- table->field[3]->store(sp_name, strlen(sp_name), cs);
+ table->field[3]->store(sp_name.ptr(), sp_name.length(), cs);
get_field(thd->mem_root, proc_table->field[3], &tmp_string);
table->field[0]->store(tmp_string.ptr(), tmp_string.length(), cs);
- table->field[2]->store(sp_db, strlen(sp_db), cs);
+ table->field[2]->store(sp_db.ptr(), sp_db.length(), cs);
get_field(thd->mem_root, proc_table->field[2], &tmp_string);
table->field[4]->store(tmp_string.ptr(), tmp_string.length(), cs);
if (proc_table->field[2]->val_int() == TYPE_ENUM_FUNCTION)
@@ -3227,7 +3228,7 @@
table->field[17]->store(tmp_string.ptr(), tmp_string.length(), cs);
get_field(thd->mem_root, proc_table->field[15], &tmp_string);
table->field[18]->store(tmp_string.ptr(), tmp_string.length(), cs);
- table->field[19]->store(definer, strlen(definer), cs);
+ table->field[19]->store(definer.ptr(), definer.length(), cs);
return schema_table_store_record(thd, table);
}
}
--- 1.476/sql/sql_yacc.yy 2006-05-08 22:05:48 +02:00
+++ 1.477/sql/sql_yacc.yy 2006-05-15 16:07:27 +02:00
@@ -475,6 +475,7 @@
%token NUMERIC_SYM
%token NVARCHAR_SYM
%token OFFSET_SYM
+%token OJ_SYM
%token OLD_PASSWORD
%token ON
%token ONE_SHOT_SYM
@@ -6943,11 +6944,14 @@
}
expr '}'
{
+ LEX *lex= Lex;
YYERROR_UNLESS($3 && $7);
add_join_on($7,$10);
Lex->pop_context();
$7->outer_join|=JOIN_TYPE_LEFT;
$$=$7;
+ if (!($$= lex->current_select->nest_last_join(lex->thd)))
+ YYABORT;
}
| select_derived_init get_select_lex select_derived2
{
@@ -7492,7 +7496,11 @@
if (lex->result)
((select_dumpvar *)lex->result)->var_list.push_back( new my_var($2,0,0,(enum_field_types)0));
else
- YYABORT;
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(lex->describe);
}
| ident_or_text
{
@@ -7504,10 +7512,8 @@
my_error(ER_SP_UNDECLARED_VAR, MYF(0), $1.str);
YYABORT;
}
- if (! lex->result)
- YYABORT;
- else
- {
+ if (lex->result)
+ {
my_var *var;
((select_dumpvar *)lex->result)->
var_list.push_back(var= new my_var($1,1,t->offset,t->type));
@@ -7515,6 +7521,14 @@
if (var)
var->sp= lex->sphead;
#endif
+ }
+ else
+ {
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(lex->describe);
}
}
;
@@ -9010,12 +9024,18 @@
YYABORT;
}
+ DBUG_ASSERT(!new_row ||
+ (lex->trg_chistics.event == TRG_EVENT_INSERT ||
+ lex->trg_chistics.event == TRG_EVENT_UPDATE));
+ const bool read_only=
+ !(new_row && lex->trg_chistics.action_time == TRG_ACTION_BEFORE);
if (!(trg_fld= new Item_trigger_field(Lex->current_context(),
new_row ?
Item_trigger_field::NEW_ROW:
Item_trigger_field::OLD_ROW,
$3.str,
- Item_trigger_field::AT_READ)))
+ SELECT_ACL,
+ read_only)))
YYABORT;
/*
@@ -9696,11 +9716,13 @@
it= new Item_null();
}
+ DBUG_ASSERT(lex->trg_chistics.action_time == TRG_ACTION_BEFORE &&
+ (lex->trg_chistics.event == TRG_EVENT_INSERT ||
+ lex->trg_chistics.event == TRG_EVENT_UPDATE));
if (!(trg_fld= new Item_trigger_field(Lex->current_context(),
Item_trigger_field::NEW_ROW,
$2.base_name.str,
- Item_trigger_field::AT_UPDATE)
- ) ||
+ UPDATE_ACL, FALSE)) ||
!(sp_fld= new sp_instr_set_trigger_field(lex->sphead->
instructions(),
lex->spcont,
--- 1.140/support-files/mysql.spec.sh 2006-05-04 21:55:02 +02:00
+++ 1.141/support-files/mysql.spec.sh 2006-05-15 21:58:58 +02:00
@@ -218,7 +218,6 @@
--with-mysqld-user=%{mysqld_user} \
--with-unix-socket-path=/var/lib/mysql/mysql.sock \
--prefix=/ \
- --with-extra-charsets=complex \
%if %{YASSL_BUILD}
--with-yassl \
%endif
@@ -281,6 +280,7 @@
CXXFLAGS=`echo "${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti} -g" | sed -e 's/-O[0-9]*//g'` \
BuildMySQL "--enable-shared \
--with-debug \
+ --with-extra-charsets=all \
--with-innodb \
--with-ndbcluster \
--with-archive-storage-engine \
@@ -683,6 +683,12 @@
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Wed May 10 2006 Kent Boortz <kent@stripped>
+
+- Use character set "all" for the "max", to make Cluster nodes
+ independent on the character set directory, and the problem that
+ two RPM sub packages both wants to install this directory.
+
* Mon May 01 2006 Kent Boortz <kent@stripped>
- Use "./libtool --mode=execute" instead of searching for the
--- 1.98/sql/share/errmsg.txt 2006-05-04 18:39:43 +02:00
+++ 1.99/sql/share/errmsg.txt 2006-05-15 16:07:28 +02:00
@@ -5472,7 +5472,7 @@
eng "Duplicate handler declared in the same block"
ger "Doppelter Handler im selben Block deklariert"
ER_SP_NOT_VAR_ARG 42000
- eng "OUT or INOUT argument %d for routine %s is not a variable"
+ eng "OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger"
ER_SP_NO_RETSET 0A000
eng "Not allowed to return a result set from a %s"
--- 1.6/mysql-test/r/trigger-grant.result 2006-03-09 19:00:42 +01:00
+++ 1.8/mysql-test/r/trigger-grant.result 2006-05-15 16:06:55 +02:00
@@ -364,3 +364,87 @@
Hello, world!
DROP USER mysqltest_u1@localhost;
DROP DATABASE mysqltest_db1;
+DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%';
+DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%';
+DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%';
+DELETE FROM mysql.columns_priv WHERE User LIKE 'mysqltest_%';
+FLUSH PRIVILEGES;
+DROP DATABASE IF EXISTS mysqltest_db1;
+CREATE DATABASE mysqltest_db1;
+USE mysqltest_db1;
+CREATE TABLE t1 (i1 INT);
+CREATE TABLE t2 (i1 INT);
+CREATE USER mysqltest_dfn@localhost;
+CREATE USER mysqltest_inv@localhost;
+GRANT EXECUTE, CREATE ROUTINE, SUPER ON *.* TO mysqltest_dfn@localhost;
+GRANT INSERT ON mysqltest_db1.* TO mysqltest_inv@localhost;
+CREATE PROCEDURE p1(OUT i INT) DETERMINISTIC NO SQL SET i = 3;
+CREATE PROCEDURE p2(INOUT i INT) DETERMINISTIC NO SQL SET i = i * 5;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+CALL p2(NEW.i1);
+INSERT INTO t1 VALUES (7);
+ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1'
+INSERT INTO t2 VALUES (11);
+ERROR 42000: SELECT,UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2'
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+GRANT SELECT ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+CALL p2(NEW.i1);
+INSERT INTO t1 VALUES (13);
+ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1'
+INSERT INTO t2 VALUES (17);
+ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2'
+REVOKE SELECT ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+GRANT UPDATE ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+CALL p2(NEW.i1);
+INSERT INTO t1 VALUES (19);
+INSERT INTO t2 VALUES (23);
+ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2'
+REVOKE UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+GRANT SELECT, UPDATE ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+CALL p2(NEW.i1);
+INSERT INTO t1 VALUES (29);
+INSERT INTO t2 VALUES (31);
+REVOKE SELECT, UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+DROP PROCEDURE p2;
+DROP PROCEDURE p1;
+GRANT UPDATE ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+CREATE PROCEDURE p1(OUT i INT) DETERMINISTIC NO SQL SET i = 37;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+CALL p1(NEW.i1);
+INSERT INTO t1 VALUES (41);
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1(IN i INT) DETERMINISTIC NO SQL SET @v1 = i + 43;
+INSERT INTO t1 VALUES (47);
+ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1'
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1(INOUT i INT) DETERMINISTIC NO SQL SET i = i + 51;
+INSERT INTO t1 VALUES (53);
+ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1'
+DROP PROCEDURE p1;
+REVOKE UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+DROP TRIGGER t1_bi;
+DROP USER mysqltest_inv@localhost;
+DROP USER mysqltest_dfn@localhost;
+DROP TABLE t2;
+DROP TABLE t1;
+DROP DATABASE mysqltest_db1;
+USE test;
+End of 5.0 tests.
--- 1.9/mysql-test/t/trigger-grant.test 2006-03-09 19:00:42 +01:00
+++ 1.10/mysql-test/t/trigger-grant.test 2006-05-15 16:07:11 +02:00
@@ -690,3 +690,176 @@
DROP USER mysqltest_u1@localhost;
DROP DATABASE mysqltest_db1;
+
+
+#
+# Test for bug #14635 Accept NEW.x as INOUT parameters to stored
+# procedures from within triggers
+#
+# We require UPDATE privilege when NEW.x passed as OUT parameter, and
+# SELECT and UPDATE when NEW.x passed as INOUT parameter.
+#
+DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%';
+DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%';
+DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%';
+DELETE FROM mysql.columns_priv WHERE User LIKE 'mysqltest_%';
+FLUSH PRIVILEGES;
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest_db1;
+--enable_warnings
+
+CREATE DATABASE mysqltest_db1;
+USE mysqltest_db1;
+
+CREATE TABLE t1 (i1 INT);
+CREATE TABLE t2 (i1 INT);
+
+CREATE USER mysqltest_dfn@localhost;
+CREATE USER mysqltest_inv@localhost;
+
+GRANT EXECUTE, CREATE ROUTINE, SUPER ON *.* TO mysqltest_dfn@localhost;
+GRANT INSERT ON mysqltest_db1.* TO mysqltest_inv@localhost;
+
+connect (definer,localhost,mysqltest_dfn,,mysqltest_db1);
+connect (invoker,localhost,mysqltest_inv,,mysqltest_db1);
+
+connection definer;
+CREATE PROCEDURE p1(OUT i INT) DETERMINISTIC NO SQL SET i = 3;
+CREATE PROCEDURE p2(INOUT i INT) DETERMINISTIC NO SQL SET i = i * 5;
+
+# Check that having no privilege won't work.
+connection definer;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+ CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+ CALL p2(NEW.i1);
+
+connection invoker;
+--error ER_COLUMNACCESS_DENIED_ERROR
+INSERT INTO t1 VALUES (7);
+--error ER_COLUMNACCESS_DENIED_ERROR
+INSERT INTO t2 VALUES (11);
+
+connection definer;
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+
+# Check that having only SELECT privilege is not enough.
+connection default;
+GRANT SELECT ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+
+connection definer;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+ CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+ CALL p2(NEW.i1);
+
+connection invoker;
+--error ER_COLUMNACCESS_DENIED_ERROR
+INSERT INTO t1 VALUES (13);
+--error ER_COLUMNACCESS_DENIED_ERROR
+INSERT INTO t2 VALUES (17);
+
+connection default;
+REVOKE SELECT ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+
+connection definer;
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+
+# Check that having only UPDATE privilege is enough for OUT parameter,
+# but not for INOUT parameter.
+connection default;
+GRANT UPDATE ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+
+connection definer;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+ CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+ CALL p2(NEW.i1);
+
+connection invoker;
+INSERT INTO t1 VALUES (19);
+--error ER_COLUMNACCESS_DENIED_ERROR
+INSERT INTO t2 VALUES (23);
+
+connection default;
+REVOKE UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+
+connection definer;
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+
+# Check that having SELECT and UPDATE privileges is enough.
+connection default;
+GRANT SELECT, UPDATE ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+
+connection definer;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+ CALL p1(NEW.i1);
+CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW
+ CALL p2(NEW.i1);
+
+connection invoker;
+INSERT INTO t1 VALUES (29);
+INSERT INTO t2 VALUES (31);
+
+connection default;
+REVOKE SELECT, UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+
+connection definer;
+DROP TRIGGER t2_bi;
+DROP TRIGGER t1_bi;
+
+connection default;
+DROP PROCEDURE p2;
+DROP PROCEDURE p1;
+
+# Check that late procedure redefining won't open a security hole.
+connection default;
+GRANT UPDATE ON mysqltest_db1.* TO mysqltest_dfn@localhost;
+
+connection definer;
+CREATE PROCEDURE p1(OUT i INT) DETERMINISTIC NO SQL SET i = 37;
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
+ CALL p1(NEW.i1);
+
+connection invoker;
+INSERT INTO t1 VALUES (41);
+
+connection definer;
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1(IN i INT) DETERMINISTIC NO SQL SET @v1 = i + 43;
+
+connection invoker;
+--error ER_COLUMNACCESS_DENIED_ERROR
+INSERT INTO t1 VALUES (47);
+
+connection definer;
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1(INOUT i INT) DETERMINISTIC NO SQL SET i = i + 51;
+
+connection invoker;
+--error ER_COLUMNACCESS_DENIED_ERROR
+INSERT INTO t1 VALUES (53);
+
+connection default;
+DROP PROCEDURE p1;
+REVOKE UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost;
+
+connection definer;
+DROP TRIGGER t1_bi;
+
+# Cleanup.
+disconnect definer;
+disconnect invoker;
+connection default;
+DROP USER mysqltest_inv@localhost;
+DROP USER mysqltest_dfn@localhost;
+DROP TABLE t2;
+DROP TABLE t1;
+DROP DATABASE mysqltest_db1;
+USE test;
+
+--echo End of 5.0 tests.
--- 1.144/mysql-test/r/subselect.result 2006-05-13 20:39:04 +02:00
+++ 1.145/mysql-test/r/subselect.result 2006-05-15 16:06:52 +02:00
@@ -3169,3 +3169,11 @@
insert into t2 values (2, 1), (1, 0);
delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;
+CREATE TABLE t1 (a INT);
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
+ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1);
+ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
+ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery'
+DROP TABLE t1;
--- 1.158/mysql-test/r/view.result 2006-04-26 16:28:24 +02:00
+++ 1.159/mysql-test/r/view.result 2006-05-15 16:06:58 +02:00
@@ -706,7 +706,7 @@
create view v2 as select a from t2 where a in (select a from v1);
show create view v2;
View Create View
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a` from `t2` where `a` in (select `v1`.`a` AS `a` from `v1`)
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a` from `t2` where `t2`.`a` in (select `v1`.`a` AS `a` from `v1`)
drop view v2, v1;
drop table t1, t2;
CREATE VIEW `v 1` AS select 5 AS `5`;
@@ -2649,3 +2649,14 @@
2006-01-01 03:00:00
drop view v1, v2;
drop table t1;
+CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, d datetime);
+CREATE VIEW v1 AS
+SELECT id, date(d) + INTERVAL TIME_TO_SEC(d) SECOND AS t, COUNT(*)
+FROM t1 GROUP BY id, t;
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`id` AS `id`,(cast(`t1`.`d` as date) + interval time_to_sec(`t1`.`d`) second) AS `t`,count(0) AS `COUNT(*)` from `t1` group by `t1`.`id`,(cast(`t1`.`d` as date) + interval time_to_sec(`t1`.`d`) second)
+SELECT * FROM v1;
+id t COUNT(*)
+DROP VIEW v1;
+DROP TABLE t1;
--- 1.145/mysql-test/t/view.test 2006-04-25 16:09:27 +02:00
+++ 1.146/mysql-test/t/view.test 2006-05-15 16:07:12 +02:00
@@ -2517,3 +2517,19 @@
select * from v2;
drop view v1, v2;
drop table t1;
+
+#
+# Bug #19490: usage of view specified by a query with GROUP BY
+# an expression containing non-constant interval
+
+CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, d datetime);
+
+CREATE VIEW v1 AS
+SELECT id, date(d) + INTERVAL TIME_TO_SEC(d) SECOND AS t, COUNT(*)
+ FROM t1 GROUP BY id, t;
+
+SHOW CREATE VIEW v1;
+SELECT * FROM v1;
+
+DROP VIEW v1;
+DROP TABLE t1;
--- 1.122/sql/item_subselect.cc 2006-04-30 22:13:54 +02:00
+++ 1.123/sql/item_subselect.cc 2006-05-15 16:07:16 +02:00
@@ -1354,6 +1354,17 @@
}
+bool Item_in_subselect::fix_fields(THD *thd, Item **ref)
+{
+ bool result = 0;
+
+ if(thd->lex->view_prepare_mode && left_expr && !left_expr->fixed)
+ result = left_expr->fix_fields(thd, &left_expr);
+
+ return result || Item_subselect::fix_fields(thd, ref);
+}
+
+
Item_subselect::trans_res
Item_allany_subselect::select_transformer(JOIN *join)
{
--- 1.5.3.2/mysql-test/r/blackhole.result 2006-05-12 18:40:13 +02:00
+++ 1.13/mysql-test/r/binlog_stm_blackhole.result 2006-05-15 16:06:29 +02:00
@@ -110,22 +110,46 @@
master-bin.000001 # Query 1 # use `test`; drop table t1,t2
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole
master-bin.000001 # Query 1 # use `test`; delete from t1 where a=10
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; update t1 set a=11 where a=15
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; insert ignore into t1 values(1)
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; replace into t1 values(100)
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; create table t2 (a varchar(200)) engine=blackhole
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t2 ;file_id=1
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; alter table t1 add b int
master-bin.000001 # Query 1 # use `test`; alter table t1 drop b
master-bin.000001 # Query 1 # use `test`; create table t3 like t1
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
+master-bin.000001 # Query 1 # use `test`; COMMIT
drop table t1,t2,t3;
+reset master;
+create table t1 (a int) engine=blackhole;
+set autocommit=0;
+start transaction;
+insert into t1 values(1);
+commit;
+start transaction;
+insert into t1 values(2);
+rollback;
+set autocommit=1;
+show binlog events;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole
+master-bin.000001 # Query 1 # use `test`; BEGIN
+master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
+master-bin.000001 # Query 1 # use `test`; COMMIT
drop table if exists t1;
-Warnings:
-Note 1051 Unknown table 't1'
create table t1 (c char(20)) engine=MyISAM;
insert into t1 values ("Monty"),("WAX"),("Walrus");
alter table t1 engine=blackhole;
--- 1.23.1.1/mysql-test/r/rpl_until.result 2006-05-11 16:28:54 +02:00
+++ 1.25/mysql-test/r/rpl_stm_until.result 2006-05-15 21:58:57 +02:00
@@ -12,17 +12,7 @@
insert into t2 values (1),(2);
insert into t2 values (3),(4);
drop table t2;
-show binlog events;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 219 Query 1 319 use `test`; insert into t1 values (1),(2),(3),(4)
-master-bin.000001 319 Query 1 395 use `test`; drop table t1
-master-bin.000001 395 Query 1 516 use `test`; create table t2(n int not null auto_increment primary key)
-master-bin.000001 516 Query 1 608 use `test`; insert into t2 values (1),(2)
-master-bin.000001 608 Query 1 700 use `test`; insert into t2 values (3),(4)
-master-bin.000001 700 Query 1 776 use `test`; drop table t2
-start slave until master_log_file='master-bin.000001', master_log_pos=319;
+start slave until master_log_file='master-bin.000001', master_log_pos=323;
select * from t1;
n
1
--- 1.42/mysql-test/r/trigger.result 2006-05-10 21:35:00 +02:00
+++ 1.43/mysql-test/r/trigger.result 2006-05-15 16:06:56 +02:00
@@ -998,3 +998,95 @@
conn_id trigger_conn_id
DROP TRIGGER t1_bi;
DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (i1 INT);
+SET @save_sql_mode=@@sql_mode;
+SET SQL_MODE='';
+CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW
+SET @x = 5/0;
+SET SQL_MODE='traditional';
+CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW
+SET @x = 5/0;
+SET @x=1;
+INSERT INTO t1 VALUES (@x);
+SELECT @x;
+@x
+NULL
+SET @x=2;
+UPDATE t1 SET i1 = @x;
+ERROR 22012: Division by 0
+SELECT @x;
+@x
+2
+SET SQL_MODE='';
+SET @x=3;
+INSERT INTO t1 VALUES (@x);
+SELECT @x;
+@x
+NULL
+SET @x=4;
+UPDATE t1 SET i1 = @x;
+ERROR 22012: Division by 0
+SELECT @x;
+@x
+4
+SET @@sql_mode=@save_sql_mode;
+DROP TRIGGER t1_ai;
+DROP TRIGGER t1_au;
+DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+CREATE TABLE t1 (i1 INT);
+INSERT INTO t1 VALUES (3);
+CREATE PROCEDURE p1(OUT i1 INT) DETERMINISTIC NO SQL SET i1 = 5;
+CREATE PROCEDURE p2(INOUT i1 INT) DETERMINISTIC NO SQL SET i1 = i1 * 7;
+CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
+BEGIN
+CALL p1(NEW.i1);
+CALL p2(NEW.i1);
+END//
+UPDATE t1 SET i1 = 11 WHERE i1 = 3;
+DROP TRIGGER t1_bu;
+DROP PROCEDURE p2;
+DROP PROCEDURE p1;
+INSERT INTO t1 VALUES (13);
+CREATE PROCEDURE p1(OUT i1 INT) DETERMINISTIC NO SQL SET @a = 17;
+CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
+CALL p1(OLD.i1);
+UPDATE t1 SET i1 = 19 WHERE i1 = 13;
+ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
+DROP TRIGGER t1_bu;
+DROP PROCEDURE p1;
+INSERT INTO t1 VALUES (23);
+CREATE PROCEDURE p1(INOUT i1 INT) DETERMINISTIC NO SQL SET @a = i1 * 29;
+CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
+CALL p1(OLD.i1);
+UPDATE t1 SET i1 = 31 WHERE i1 = 23;
+ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
+DROP TRIGGER t1_bu;
+DROP PROCEDURE p1;
+INSERT INTO t1 VALUES (37);
+CREATE PROCEDURE p1(OUT i1 INT) DETERMINISTIC NO SQL SET @a = 41;
+CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW
+CALL p1(NEW.i1);
+UPDATE t1 SET i1 = 43 WHERE i1 = 37;
+ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
+DROP TRIGGER t1_au;
+DROP PROCEDURE p1;
+INSERT INTO t1 VALUES (47);
+CREATE PROCEDURE p1(INOUT i1 INT) DETERMINISTIC NO SQL SET @a = i1 * 49;
+CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW
+CALL p1(NEW.i1);
+UPDATE t1 SET i1 = 51 WHERE i1 = 47;
+ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
+DROP TRIGGER t1_au;
+DROP PROCEDURE p1;
+SELECT * FROM t1;
+i1
+35
+13
+23
+43
+51
+DROP TABLE t1;
--- 1.21.3.1/mysql-test/t/rpl_until.test 2006-05-11 16:42:41 +02:00
+++ 1.24/mysql-test/t/rpl_stm_until.test 2006-05-15 16:07:10 +02:00
@@ -1,4 +1,7 @@
-source include/master-slave.inc;
+-- source include/have_binlog_format_statement.inc
+-- source include/master-slave.inc
+
+# Test is dependent on binlog positions
# prepare version for substitutions
let $VERSION=`select version()`;
@@ -19,12 +22,10 @@
insert into t2 values (1),(2);
insert into t2 values (3),(4);
drop table t2;
---replace_result $VERSION VERSION
-show binlog events;
# try to replicate all queries until drop of t1
connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=319;
+start slave until master_log_file='master-bin.000001', master_log_pos=323;
sleep 2;
wait_for_slave_to_stop;
# here table should be still not deleted
@@ -43,7 +44,7 @@
--replace_column 1 # 9 # 11 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
-# try replicate all until second insert to t2;
+# try replicate all up to and not including the second insert to t2;
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
sleep 2;
wait_for_slave_to_stop;
--- 1.46/mysql-test/t/trigger.test 2006-05-10 21:35:00 +02:00
+++ 1.47/mysql-test/t/trigger.test 2006-05-15 16:07:11 +02:00
@@ -1165,4 +1165,126 @@
DROP TRIGGER t1_bi;
DROP TABLE t1;
+
+#
+# Bug#6951: Triggers/Traditional: SET @ result wrong
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (i1 INT);
+
+SET @save_sql_mode=@@sql_mode;
+
+SET SQL_MODE='';
+
+CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW
+ SET @x = 5/0;
+
+SET SQL_MODE='traditional';
+
+CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW
+ SET @x = 5/0;
+
+SET @x=1;
+INSERT INTO t1 VALUES (@x);
+SELECT @x;
+
+SET @x=2;
+--error 1365
+UPDATE t1 SET i1 = @x;
+SELECT @x;
+
+SET SQL_MODE='';
+
+SET @x=3;
+INSERT INTO t1 VALUES (@x);
+SELECT @x;
+
+SET @x=4;
+--error 1365
+UPDATE t1 SET i1 = @x;
+SELECT @x;
+
+SET @@sql_mode=@save_sql_mode;
+
+DROP TRIGGER t1_ai;
+DROP TRIGGER t1_au;
+DROP TABLE t1;
+
+
+#
+# Test for bug #14635 Accept NEW.x as INOUT parameters to stored
+# procedures from within triggers
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+--enable_warnings
+
+CREATE TABLE t1 (i1 INT);
+
+# Check that NEW.x pseudo variable is accepted as INOUT and OUT
+# parameter to stored routine.
+INSERT INTO t1 VALUES (3);
+CREATE PROCEDURE p1(OUT i1 INT) DETERMINISTIC NO SQL SET i1 = 5;
+CREATE PROCEDURE p2(INOUT i1 INT) DETERMINISTIC NO SQL SET i1 = i1 * 7;
+delimiter //;
+CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
+BEGIN
+ CALL p1(NEW.i1);
+ CALL p2(NEW.i1);
+END//
+delimiter ;//
+UPDATE t1 SET i1 = 11 WHERE i1 = 3;
+DROP TRIGGER t1_bu;
+DROP PROCEDURE p2;
+DROP PROCEDURE p1;
+
+# Check that OLD.x pseudo variable is not accepted as INOUT and OUT
+# parameter to stored routine.
+INSERT INTO t1 VALUES (13);
+CREATE PROCEDURE p1(OUT i1 INT) DETERMINISTIC NO SQL SET @a = 17;
+CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
+ CALL p1(OLD.i1);
+--error ER_SP_NOT_VAR_ARG
+UPDATE t1 SET i1 = 19 WHERE i1 = 13;
+DROP TRIGGER t1_bu;
+DROP PROCEDURE p1;
+
+INSERT INTO t1 VALUES (23);
+CREATE PROCEDURE p1(INOUT i1 INT) DETERMINISTIC NO SQL SET @a = i1 * 29;
+CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
+ CALL p1(OLD.i1);
+--error ER_SP_NOT_VAR_ARG
+UPDATE t1 SET i1 = 31 WHERE i1 = 23;
+DROP TRIGGER t1_bu;
+DROP PROCEDURE p1;
+
+# Check that NEW.x pseudo variable is read-only in the AFTER TRIGGER.
+INSERT INTO t1 VALUES (37);
+CREATE PROCEDURE p1(OUT i1 INT) DETERMINISTIC NO SQL SET @a = 41;
+CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW
+ CALL p1(NEW.i1);
+--error ER_SP_NOT_VAR_ARG
+UPDATE t1 SET i1 = 43 WHERE i1 = 37;
+DROP TRIGGER t1_au;
+DROP PROCEDURE p1;
+
+INSERT INTO t1 VALUES (47);
+CREATE PROCEDURE p1(INOUT i1 INT) DETERMINISTIC NO SQL SET @a = i1 * 49;
+CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW
+ CALL p1(NEW.i1);
+--error ER_SP_NOT_VAR_ARG
+UPDATE t1 SET i1 = 51 WHERE i1 = 47;
+DROP TRIGGER t1_au;
+DROP PROCEDURE p1;
+
+# Post requisite.
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
# End of 5.0 tests
--- 1.118/mysql-test/r/information_schema.result 2006-05-12 08:42:00 +02:00
+++ 1.119/mysql-test/r/information_schema.result 2006-05-15 21:58:57 +02:00
@@ -1145,3 +1145,20 @@
user db
user3148 test
drop user user3148@localhost;
+create table t1(f1 char(1) not null, f2 char(9) not null)
+default character set utf8;
+select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
+information_schema.columns where table_schema='test' and table_name = 't1';
+CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH
+1 3
+9 27
+drop table t1;
+use mysql;
+INSERT INTO `proc` VALUES ('test','','PROCEDURE','','SQL','CONTAINS_SQL',
+'NO','DEFINER','','','BEGIN\r\n \r\nEND','root@%','2006-03-02 18:40:03',
+'2006-03-02 18:40:03','','');
+select routine_name from information_schema.routines;
+routine_name
+
+delete from proc where name='';
+use test;
--- 1.77/mysql-test/t/information_schema.test 2006-05-12 08:42:00 +02:00
+++ 1.78/mysql-test/t/information_schema.test 2006-05-15 21:58:58 +02:00
@@ -827,3 +827,21 @@
drop user user3148@localhost;
+# Bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
+#
+create table t1(f1 char(1) not null, f2 char(9) not null)
+default character set utf8;
+select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
+information_schema.columns where table_schema='test' and table_name = 't1';
+drop table t1;
+
+#
+# Bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
+#
+use mysql;
+INSERT INTO `proc` VALUES ('test','','PROCEDURE','','SQL','CONTAINS_SQL',
+'NO','DEFINER','','','BEGIN\r\n \r\nEND','root@%','2006-03-02 18:40:03',
+'2006-03-02 18:40:03','','');
+select routine_name from information_schema.routines;
+delete from proc where name='';
+use test;
--- 1.42/mysql-test/r/ps_2myisam.result 2006-02-22 10:09:50 +01:00
+++ 1.43/mysql-test/r/ps_2myisam.result 2006-05-15 21:58:57 +02:00
@@ -1777,7 +1777,7 @@
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
- `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
+ `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
@@ -1807,7 +1807,7 @@
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 3 3 N 33 1 63
+def test t5 t5 const02 const02 246 4 3 N 1 1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
--- 1.45/mysql-test/r/ps_3innodb.result 2006-02-22 10:09:50 +01:00
+++ 1.46/mysql-test/r/ps_3innodb.result 2006-05-15 21:58:57 +02:00
@@ -1760,11 +1760,11 @@
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
- `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
+ `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
- `const04` varchar(3) NOT NULL DEFAULT '',
+ `const04` varchar(3) NOT NULL default '',
`param04` longtext,
`const05` varbinary(3) NOT NULL DEFAULT '',
`param05` longblob,
@@ -1790,7 +1790,7 @@
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 3 3 N 33 1 63
+def test t5 t5 const02 const02 246 4 3 N 1 1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
--- 1.41/mysql-test/r/ps_4heap.result 2006-02-22 10:09:50 +01:00
+++ 1.42/mysql-test/r/ps_4heap.result 2006-05-15 21:58:57 +02:00
@@ -1761,7 +1761,7 @@
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
- `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
+ `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
@@ -1791,7 +1791,7 @@
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 3 3 N 33 1 63
+def test t5 t5 const02 const02 246 4 3 N 1 1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
--- 1.42/mysql-test/r/ps_5merge.result 2006-02-22 10:09:51 +01:00
+++ 1.43/mysql-test/r/ps_5merge.result 2006-05-15 21:58:57 +02:00
@@ -1697,7 +1697,7 @@
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
- `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
+ `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
@@ -1727,7 +1727,7 @@
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 3 3 N 33 1 63
+def test t5 t5 const02 const02 246 4 3 N 1 1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
@@ -4711,7 +4711,7 @@
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
- `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
+ `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
@@ -4741,7 +4741,7 @@
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 3 3 N 33 1 63
+def test t5 t5 const02 const02 246 4 3 N 1 1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
--- 1.44/mysql-test/r/ps_6bdb.result 2006-02-22 10:09:51 +01:00
+++ 1.45/mysql-test/r/ps_6bdb.result 2006-05-15 21:58:57 +02:00
@@ -1760,7 +1760,7 @@
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
- `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
+ `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
@@ -1790,7 +1790,7 @@
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 3 3 N 33 1 63
+def test t5 t5 const02 const02 246 4 3 N 1 1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
--- 1.7.1.2/mysql-test/t/rpl_multi_query.test 2006-05-12 18:40:33 +02:00
+++ 1.11/mysql-test/extra/rpl_tests/rpl_multi_query.test 2006-05-15 16:06:25 +02:00
@@ -3,10 +3,10 @@
# CLIENT_MULTI_STATEMENTS) will be binlogged ONE-query-per-event (not
# one binlog event containing all queries)
+
# PS doesn't support multi-statements
--disable_ps_protocol
-
-source include/master-slave.inc;
+-- source include/master-slave.inc
--disable_warnings
drop database if exists mysqltest;
--enable_warnings
@@ -24,9 +24,7 @@
select * from mysqltest.t1;
connection master;
--replace_column 2 # 5 #
-show binlog events from 98;
+--replace_regex /table_id: [0-9]+/table_id: #/
+show binlog events from 102;
drop database mysqltest;
sync_slave_with_master;
-
-# End of 4.1 tests
-#
--- 1.4.3.2/mysql-test/t/rpl_rewrite_db.test 2006-05-12 18:40:34 +02:00
+++ 1.9/mysql-test/t/rpl_rewrt_db.test 2006-05-15 16:07:10 +02:00
@@ -1,4 +1,7 @@
-source include/master-slave.inc;
+# TBF - difference in row level logging
+-- source include/have_binlog_format_statement.inc
+-- source include/master-slave.inc
+
--disable_warnings
drop database if exists mysqltest1;
--enable_warnings
--- 1.2.2.2/mysql-test/r/ctype_cp932_binlog.result 2006-05-12 18:40:14 +02:00
+++ 1.7/mysql-test/r/binlog_stm_ctype_ucs.result 2006-05-15 16:06:29 +02:00
@@ -1,46 +1,24 @@
-drop table if exists t1;
-set names cp932;
-set character_set_database = cp932;
-RESET MASTER;
-CREATE TABLE t1(f1 blob);
-PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
-SET @var1= x'8300';
-EXECUTE stmt1 USING @var1;
-SHOW BINLOG EVENTS FROM 98;
+SET TIMESTAMP=10000;
+create table t2 (c char(30)) charset=ucs2;
+set @v=convert('abc' using ucs2);
+reset master;
+insert into t2 values (@v);
+show binlog events from 102;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 98 Query 1 185 use `test`; CREATE TABLE t1(f1 blob)
-master-bin.000001 185 User var 1 224 @`var1`=_binary 0x8300 COLLATE binary
-master-bin.000001 224 Query 1 317 use `test`; INSERT INTO t1 VALUES(@'var1')
-SELECT HEX(f1) FROM t1;
-HEX(f1)
-8300
-DROP table t1;
-CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
-s2 CHAR(50) CHARACTER SET cp932,
-d DECIMAL(10,2))|
-CREATE PROCEDURE bug18293 (IN ins1 CHAR(50),
-IN ins2 CHAR(50) CHARACTER SET cp932,
-IN ind DECIMAL(10,2))
-BEGIN
-INSERT INTO t4 VALUES (ins1, ins2, ind);
-END|
-CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)|
-SELECT HEX(s1),HEX(s2),d FROM t4|
-HEX(s1) HEX(s2) d
-466F6F2773206120426172 ED40ED41ED42 47.93
-DROP PROCEDURE bug18293|
-DROP TABLE t4|
-SHOW BINLOG EVENTS FROM 393|
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 393 Query 1 556 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
-s2 CHAR(50) CHARACTER SET cp932,
-d DECIMAL(10,2))
-master-bin.000001 556 Query 1 801 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE bug18293 (IN ins1 CHAR(50),
-IN ins2 CHAR(50) CHARACTER SET cp932,
-IN ind DECIMAL(10,2))
-BEGIN
-INSERT INTO t4 VALUES (ins1, ins2, ind);
-END
-master-bin.000001 801 Query 1 1006 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1'Foo\'s a Bar'), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
-master-bin.000001 1006 Query 1 1092 use `test`; DROP PROCEDURE bug18293
-master-bin.000001 1092 Query 1 1168 use `test`; DROP TABLE t4
+master-bin.000001 102 User var 1 142 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
+master-bin.000001 142 Query 1 231 use `test`; insert into t2 values (@v)
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+ROLLBACK;
+SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`;
+use test;
+SET TIMESTAMP=10000;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
+SET @@session.sql_mode=0;
+/*!\C latin1 */;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
+insert into t2 values (@v);
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+drop table t2;
--- 1.32/mysql-test/lib/mtr_process.pl 2006-05-01 09:14:28 +02:00
+++ 1.33/mysql-test/lib/mtr_process.pl 2006-05-15 16:06:25 +02:00
@@ -20,6 +20,7 @@
sub mtr_exit ($);
sub sleep_until_file_created ($$$);
sub mtr_kill_processes ($);
+sub mtr_kill_process ($$$$);
# static in C
sub spawn_impl ($$$$$$$$);
@@ -872,6 +873,25 @@
mtr_debug("Sleep 2 second waiting for processes to die");
sleep(2);
}
+ }
+}
+
+
+sub mtr_kill_process ($$$$) {
+ my $pid= shift;
+ my $signal= shift;
+ my $retries= shift;
+ my $timeout= shift;
+
+ while (1)
+ {
+ kill($signal, $pid);
+
+ last unless kill (0, $pid) and $retries--;
+
+ mtr_debug("Sleep $timeout second waiting for processes to die");
+
+ sleep($timeout);
}
}
--- 1.113/mysql-test/mysql-test-run.pl 2006-05-12 08:42:00 +02:00
+++ 1.114/mysql-test/mysql-test-run.pl 2006-05-15 16:06:22 +02:00
@@ -929,6 +929,7 @@
path_err => "$opt_vardir/log/im.err",
path_log => "$opt_vardir/log/im.log",
path_pid => "$opt_vardir/run/im.pid",
+ path_angel_pid => "$opt_vardir/run/im.angel.pid",
path_sock => "$sockdir/im.sock",
port => $im_port,
start_timeout => $master->[0]->{'start_timeout'},
@@ -1220,6 +1221,7 @@
$ENV{'NDB_STATUS_OK'}= "YES";
$ENV{'IM_PATH_PID'}= $instance_manager->{path_pid};
+ $ENV{'IM_PATH_ANGEL_PID'}= $instance_manager->{path_angel_pid};
$ENV{'IM_PORT'}= $instance_manager->{port};
$ENV{'IM_MYSQLD1_SOCK'}= $instance_manager->{instances}->[0]->{path_sock};
@@ -1999,6 +2001,7 @@
[manager]
pid-file = $instance_manager->{path_pid}
+angel-pid-file = $instance_manager->{path_angel_pid}
socket = $instance_manager->{path_sock}
port = $instance_manager->{port}
password-file = $instance_manager->{password_file}
@@ -2023,7 +2026,7 @@
language = $path_language
character-sets-dir = $path_charsetsdir
basedir = $path_my_basedir
-server_id =$server_id
+server_id = $server_id
skip-stack-trace
skip-innodb
skip-bdb
@@ -3061,6 +3064,18 @@
sub im_stop($) {
my $instance_manager = shift;
+ # Obtain mysqld-process pids before we start stopping IM (it can delete pid
+ # files).
+
+ my @mysqld_pids = ();
+ my $instances = $instance_manager->{'instances'};
+
+ push(@mysqld_pids, mtr_get_pid_from_file($instances->[0]->{'path_pid'}))
+ if -r $instances->[0]->{'path_pid'};
+
+ push(@mysqld_pids, mtr_get_pid_from_file($instances->[1]->{'path_pid'}))
+ if -r $instances->[1]->{'path_pid'};
+
# Re-read pid from the file, since during tests Instance Manager could have
# been restarted, so its pid could have been changed.
@@ -3068,34 +3083,79 @@
mtr_get_pid_from_file($instance_manager->{'path_pid'})
if -f $instance_manager->{'path_pid'};
+ if (-f $instance_manager->{'path_angel_pid'})
+ {
+ $instance_manager->{'angel_pid'} =
+ mtr_get_pid_from_file($instance_manager->{'path_angel_pid'})
+ }
+ else
+ {
+ $instance_manager->{'angel_pid'} = undef;
+ }
+
# Inspired from mtr_stop_mysqld_servers().
start_reap_all();
- # Create list of pids. We should stop Instance Manager and all started
- # mysqld-instances. Some of them may be nonguarded, so IM will not stop them
- # on shutdown.
+ # Try graceful shutdown.
- my @pids = ( $instance_manager->{'pid'} );
- my $instances = $instance_manager->{'instances'};
+ mtr_kill_process($instance_manager->{'pid'}, 'TERM', 10, 1);
- if ( -r $instances->[0]->{'path_pid'} )
+ # Check that all processes died.
+
+ my $clean_shutdown= 0;
+
+ while (1)
{
- push(@pids, mtr_get_pid_from_file($instances->[0]->{'path_pid'}));
+ last if kill (0, $instance_manager->{'pid'});
+
+ last if (defined $instance_manager->{'angel_pid'}) &&
+ kill (0, $instance_manager->{'angel_pid'});
+
+ foreach my $pid (@mysqld_pids)
+ {
+ last if kill (0, $pid);
+ }
+
+ $clean_shutdown= 1;
+ last;
}
- if ( -r $instances->[1]->{'path_pid'} )
+ # Kill leftovers (the order is important).
+
+ unless ($clean_shutdown)
{
- push(@pids, mtr_get_pid_from_file($instances->[1]->{'path_pid'}));
- }
+ mtr_kill_process($instance_manager->{'angel_pid'}, 'KILL', 10, 1)
+ if defined $instance_manager->{'angel_pid'};
+
+ mtr_kill_process($instance_manager->{'pid'}, 'KILL', 10, 1);
- # Kill processes.
+ # Shutdown managed mysqld-processes. Some of them may be nonguarded, so IM
+ # will not stop them on shutdown. So, we should firstly try to end them
+ # legally.
+
+ mtr_kill_processes(\@mysqld_pids);
+
+ # Complain in error log so that a warning will be shown.
+
+ my $errlog= "$opt_vardir/log/mysql-test-run.pl.err";
+
+ open (ERRLOG, ">>$errlog") ||
+ mtr_error("Can not open error log ($errlog)");
+
+ my $ts= localtime();
+ print ERRLOG
+ "Warning: [$ts] Instance Manager did not shutdown gracefully.\n";
+
+ close ERRLOG;
+ }
- mtr_kill_processes(\@pids);
+ # That's all.
stop_reap_all();
$instance_manager->{'pid'} = undef;
+ $instance_manager->{'angel_pid'} = undef;
}
--- 1.41/mysql-test/r/ps_7ndb.result 2005-12-20 14:33:39 +01:00
+++ 1.42/mysql-test/r/ps_7ndb.result 2006-05-15 16:06:41 +02:00
@@ -1760,7 +1760,7 @@
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
- `const02` decimal(2,1) unsigned NOT NULL default '0.0',
+ `const02` decimal(2,1) NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
@@ -1790,7 +1790,7 @@
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 3 3 N 33 1 63
+def test t5 t5 const02 const02 246 4 3 N 1 1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
--- 1.32/server-tools/instance-manager/options.cc 2006-04-12 22:01:23 +02:00
+++ 1.33/server-tools/instance-manager/options.cc 2006-05-15 21:58:58 +02:00
@@ -44,6 +44,7 @@
const char *default_password_file_name= QUOTE(DEFAULT_PASSWORD_FILE_NAME);
const char *default_log_file_name= QUOTE(DEFAULT_LOG_FILE_NAME);
const char *Options::config_file= QUOTE(DEFAULT_CONFIG_FILE);
+const char *Options::angel_pid_file_name= NULL;
#endif
const char *Options::log_file_name= default_log_file_name;
const char *Options::pid_file_name= QUOTE(DEFAULT_PID_FILE_NAME);
@@ -61,6 +62,9 @@
const char *Options::default_dbug_option= "d:t:i:O,im.trace";
#endif
+static const char * const ANGEL_PID_FILE_SUFFIX= ".angel.pid";
+static const int ANGEL_PID_FILE_SUFFIX_LEN= strlen(ANGEL_PID_FILE_SUFFIX);
+
/*
List of options, accepted by the instance manager.
List must be closed with empty option.
@@ -75,6 +79,7 @@
#ifndef __WIN__
OPT_RUN_AS_SERVICE,
OPT_USER,
+ OPT_ANGEL_PID_FILE,
#else
OPT_INSTALL_SERVICE,
OPT_REMOVE_SERVICE,
@@ -101,6 +106,42 @@
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ { "log", OPT_LOG, "Path to log file. Used only with --run-as-service.",
+ (gptr *) &Options::log_file_name, (gptr *) &Options::log_file_name,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+
+ { "pid-file", OPT_PID_FILE, "Pid file to use.",
+ (gptr *) &Options::pid_file_name, (gptr *) &Options::pid_file_name,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+
+ { "socket", OPT_SOCKET, "Socket file to use for connection.",
+ (gptr *) &Options::socket_file_name, (gptr *) &Options::socket_file_name,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+
+ { "passwd", 'P', "Prepare entry for passwd file and exit.", 0, 0, 0,
+ GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
+
+ { "bind-address", OPT_BIND_ADDRESS, "Bind address to use for connection.",
+ (gptr *) &Options::bind_address, (gptr *) &Options::bind_address,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+
+ { "port", OPT_PORT, "Port number to use for connections",
+ (gptr *) &Options::port_number, (gptr *) &Options::port_number,
+ 0, GET_UINT, REQUIRED_ARG, DEFAULT_PORT, 0, 0, 0, 0, 0 },
+
+ { "password-file", OPT_PASSWORD_FILE, "Look for Instance Manager users"
+ " and passwords here.",
+ (gptr *) &Options::password_file_name,
+ (gptr *) &Options::password_file_name,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+
+#ifndef __WIN__
+ { "angel-pid-file", OPT_ANGEL_PID_FILE, "Pid file for angel process.",
+ (gptr *) &Options::angel_pid_file_name,
+ (gptr *) &Options::angel_pid_file_name,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+#endif
+
{ "default-mysqld-path", OPT_MYSQLD_PATH, "Where to look for MySQL"
" Server binary.",
(gptr *) &Options::default_mysqld_path,
@@ -312,6 +353,46 @@
get_one_option)) != 0)
goto err;
+#ifndef __WIN__
+ if (Options::run_as_service)
+ {
+ if (Options::angel_pid_file_name == NULL)
+ {
+ /*
+ Calculate angel pid file on the IM pid file basis: replace the
+ extension (everything after the last dot) of the pid file basename to
+ '.angel.pid'.
+ */
+
+ char *angel_pid_file_name;
+ char *base_name_ptr;
+ char *ext_ptr;
+
+ angel_pid_file_name= (char *) malloc(strlen(Options::pid_file_name) +
+ ANGEL_PID_FILE_SUFFIX_LEN);
+
+ strcpy(angel_pid_file_name, Options::pid_file_name);
+
+ base_name_ptr= strrchr(angel_pid_file_name, '/');
+
+ if (!base_name_ptr)
+ base_name_ptr= angel_pid_file_name + 1;
+
+ ext_ptr= strrchr(base_name_ptr, '.');
+ if (ext_ptr)
+ *ext_ptr= 0;
+
+ strcat(angel_pid_file_name, ANGEL_PID_FILE_SUFFIX);
+
+ Options::angel_pid_file_name= angel_pid_file_name;
+ }
+ else
+ {
+ Options::angel_pid_file_name= strdup(Options::angel_pid_file_name);
+ }
+ }
+#endif
+
return 0;
err:
@@ -323,6 +404,11 @@
/* free_defaults returns nothing */
if (Options::saved_argv != NULL)
free_defaults(Options::saved_argv);
+
+#ifndef __WIN__
+ if (Options::run_as_service)
+ free((void *) Options::angel_pid_file_name);
+#endif
}
#ifdef __WIN__
--- 1.15/server-tools/instance-manager/options.h 2006-04-12 20:14:52 +02:00
+++ 1.16/server-tools/instance-manager/options.h 2006-05-15 16:07:14 +02:00
@@ -35,6 +35,7 @@
#else
static char run_as_service; /* handle_options doesn't support bool */
static const char *user;
+ static const char *angel_pid_file_name;
#endif
static bool is_forced_default_file;
static const char *log_file_name;
--- 1.7.1.2/mysql-test/t/rpl_ddl.test 2006-05-12 18:40:32 +02:00
+++ 1.11/mysql-test/extra/rpl_tests/rpl_ddl.test 2006-05-15 16:06:24 +02:00
@@ -28,9 +28,6 @@
# eval SELECT CONCAT('######## ','$my_stmt',' ########') as "";
#
---source include/have_innodb.inc
---source include/master-slave.inc
-
###############################################################
# Some preparations
###############################################################
@@ -54,28 +51,28 @@
#
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
-CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB";
+eval CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=$engine_type;
INSERT INTO mysqltest1.t1 SET f1= 0;
-CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB";
+eval CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=$engine_type;
CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
-CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB";
+eval CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=$engine_type;
INSERT INTO mysqltest1.t7 SET f1= 0;
-CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB";
-CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB";
+eval CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=$engine_type;
+eval CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=$engine_type;
CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT);
#
@@ -207,10 +204,10 @@
SELECT '-------- switch to master -------' as "";
--enable_query_log
-let $my_stmt= CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB";
+let $my_stmt= CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE=;
let $my_master_commit= true;
let $my_slave_commit= true;
---source include/rpl_stmt_seq.inc
+--source include/rpl_stmt_seq2.inc
# Note: Since this test is executed with a skip-innodb slave, the
# slave incorrectly commits the insert. One can *not* have InnoDB on
@@ -218,6 +215,9 @@
# after a CREATE TEMPORARY TABLE should work correctly on the slave.
# For this to work properly the handler on the slave must be able to
# handle transactions (e.g. InnoDB or NDB).
+let $engine='';
+let $eng_type='';
+
let $my_stmt= CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT);
let $my_master_commit= false;
let $my_slave_commit= true;
@@ -507,4 +507,5 @@
DROP DATABASE IF EXISTS mysqltest3;
--enable_warnings
+-- source include/master-slave-end.inc
--- 1.27/mysql-test/r/case.result 2006-04-25 19:00:08 +02:00
+++ 1.28/mysql-test/r/case.result 2006-05-15 21:58:57 +02:00
@@ -103,11 +103,11 @@
`c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
`c3` varbinary(1) NOT NULL DEFAULT '',
`c4` varbinary(1) NOT NULL DEFAULT '',
- `c5` varbinary(3) NOT NULL DEFAULT '',
- `c6` varbinary(3) NOT NULL DEFAULT '',
+ `c5` varbinary(4) NOT NULL DEFAULT '',
+ `c6` varbinary(4) NOT NULL DEFAULT '',
`c7` decimal(2,1) NOT NULL DEFAULT '0.0',
`c8` decimal(2,1) NOT NULL DEFAULT '0.0',
- `c9` decimal(2,1) DEFAULT NULL,
+ `c9` decimal(2,1) default NULL,
`c10` double NOT NULL DEFAULT '0',
`c11` double NOT NULL DEFAULT '0',
`c12` varbinary(5) NOT NULL DEFAULT ''
@@ -152,11 +152,11 @@
Table Create Table
t1 CREATE TABLE `t1` (
`COALESCE(1)` int(1) NOT NULL DEFAULT '0',
- `COALESCE(1.0)` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
+ `COALESCE(1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
`COALESCE('a')` varchar(1) NOT NULL DEFAULT '',
`COALESCE(1,1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
`COALESCE(1,'1')` varbinary(1) NOT NULL DEFAULT '',
- `COALESCE(1.1,'1')` varbinary(3) NOT NULL DEFAULT '',
+ `COALESCE(1.1,'1')` varbinary(4) NOT NULL DEFAULT '',
`COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
--- 1.50/mysql-test/r/func_time.result 2006-04-12 22:14:52 +02:00
+++ 1.51/mysql-test/r/func_time.result 2006-05-15 16:06:30 +02:00
@@ -732,6 +732,25 @@
count(*)
3
DROP TABLE t1;
+select last_day('2005-00-00');
+last_day('2005-00-00')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-00-00'
+select last_day('2005-00-01');
+last_day('2005-00-01')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-00-01'
+select last_day('2005-01-00');
+last_day('2005-01-00')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-01-00'
+select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
+monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
+monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
+NULL NULL January NULL
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
id select_type table type possible_keys key key_len ref rows Extra
--- 1.47/mysql-test/r/join_outer.result 2006-03-24 21:46:26 +01:00
+++ 1.48/mysql-test/r/join_outer.result 2006-05-15 16:06:34 +02:00
@@ -1154,3 +1154,25 @@
1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
DROP TABLE t1,t2;
+DROP VIEW IF EXISTS v1,v2;
+DROP TABLE IF EXISTS t1,t2;
+CREATE TABLE t1 (a int);
+CREATE table t2 (b int);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (1), (1), (3);
+INSERT INTO t2 VALUES (2), (3);
+CREATE VIEW v1 AS SELECT a FROM t1 JOIN t2 ON t1.a=t2.b;
+CREATE VIEW v2 AS SELECT b FROM t2 JOIN t1 ON t2.b=t1.a;
+SELECT v1.a, v2. b
+FROM v1 LEFT OUTER JOIN v2 ON (v1.a=v2.b) AND (v1.a >= 3)
+GROUP BY v1.a;
+a b
+2 NULL
+3 3
+SELECT v1.a, v2. b
+FROM { OJ v1 LEFT OUTER JOIN v2 ON (v1.a=v2.b) AND (v1.a >= 3) }
+GROUP BY v1.a;
+a b
+2 NULL
+3 3
+DROP VIEW v1,v2;
+DROP TABLE t1,t2;
--- 1.123/mysql-test/r/select.result 2006-05-13 20:39:04 +02:00
+++ 1.124/mysql-test/r/select.result 2006-05-15 16:06:48 +02:00
@@ -3427,3 +3427,22 @@
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 3 Using where
1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10
drop table t1, t2;
+CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
+INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
+(3,1), (5,1), (8,9), (2,2), (0,9);
+CREATE TABLE t2 (c int, d int, f int, INDEX(c,f));
+INSERT INTO t2 VALUES
+(1,0,0), (1,0,1), (2,0,0), (2,0,1), (3,0,0), (4,0,1),
+(5,0,0), (5,0,1), (6,0,0), (0,0,1), (7,0,0), (7,0,1),
+(0,0,0), (0,0,1), (8,0,0), (8,0,1), (9,0,0), (9,0,1);
+EXPLAIN
+SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using where
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
+EXPLAIN
+SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using where
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
+DROP TABLE t1, t2;
--- 1.47/mysql-test/r/type_float.result 2006-02-22 10:09:52 +01:00
+++ 1.48/mysql-test/r/type_float.result 2006-05-15 16:06:57 +02:00
@@ -245,22 +245,22 @@
Level Code Message
desc t1;
Field Type Null Key Default Extra
-x decimal(21,2) unsigned NO 0.00
+x decimal(21,2) NO 0.00
drop table t1;
create table t1 select 0.0 x;
desc t1;
Field Type Null Key Default Extra
-x decimal(2,1) unsigned NO 0.0
+x decimal(2,1) NO 0.0
create table t2 select 105213674794682365.00 y;
desc t2;
Field Type Null Key Default Extra
-y decimal(20,2) unsigned NO 0.00
+y decimal(20,2) NO 0.00
create table t3 select x+y a from t1,t2;
show warnings;
Level Code Message
desc t3;
Field Type Null Key Default Extra
-a decimal(21,2) unsigned NO 0.00
+a decimal(21,2) NO 0.00
drop table t1,t2,t3;
create table t1 (s1 float(0,2));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1').
--- 1.83/mysql-test/r/variables.result 2006-04-30 18:34:08 +02:00
+++ 1.84/mysql-test/r/variables.result 2006-05-15 16:06:58 +02:00
@@ -1,4 +1,31 @@
drop table if exists t1,t2;
+set @my_binlog_cache_size =@@global.binlog_cache_size;
+set @my_connect_timeout =@@global.connect_timeout;
+set @my_delayed_insert_timeout =@@global.delayed_insert_timeout;
+set @my_delayed_queue_size =@@global.delayed_queue_size;
+set @my_flush =@@global.flush;
+set @my_flush_time =@@global.flush_time;
+set @my_key_buffer_size =@@global.key_buffer_size;
+set @my_max_binlog_cache_size =@@global.max_binlog_cache_size;
+set @my_max_binlog_size =@@global.max_binlog_size;
+set @my_max_connect_errors =@@global.max_connect_errors;
+set @my_max_delayed_threads =@@global.max_delayed_threads;
+set @my_max_heap_table_size =@@global.max_heap_table_size;
+set @my_max_insert_delayed_threads=@@global.max_insert_delayed_threads;
+set @my_max_join_size =@@global.max_join_size;
+set @my_max_user_connections =@@global.max_user_connections;
+set @my_max_write_lock_count =@@global.max_write_lock_count;
+set @my_myisam_data_pointer_size =@@global.myisam_data_pointer_size;
+set @my_net_buffer_length =@@global.net_buffer_length;
+set @my_net_write_timeout =@@global.net_write_timeout;
+set @my_net_read_timeout =@@global.net_read_timeout;
+set @my_query_cache_limit =@@global.query_cache_limit;
+set @my_query_cache_type =@@global.query_cache_type;
+set @my_rpl_recovery_rank =@@global.rpl_recovery_rank;
+set @my_server_id =@@global.server_id;
+set @my_slow_launch_time =@@global.slow_launch_time;
+set @my_storage_engine =@@global.storage_engine;
+set @my_thread_cache_size =@@global.thread_cache_size;
set @`test`=1;
select @test, @`test`, @TEST, @`TEST`, @"teSt";
@test @`test` @TEST @`TEST` @"teSt"
@@ -612,4 +639,31 @@
@@version_compile_os;
@@version @@version_comment @@version_compile_machine @@version_compile_os
# # # #
+set global binlog_cache_size =@my_binlog_cache_size;
+set global connect_timeout =@my_connect_timeout;
+set global delayed_insert_timeout =@my_delayed_insert_timeout;
+set global delayed_queue_size =@my_delayed_queue_size;
+set global flush =@my_flush;
+set global flush_time =@my_flush_time;
+set global key_buffer_size =@my_key_buffer_size;
+set global max_binlog_cache_size =default;
+set global max_binlog_size =@my_max_binlog_size;
+set global max_connect_errors =@my_max_connect_errors;
+set global max_delayed_threads =@my_max_delayed_threads;
+set global max_heap_table_size =@my_max_heap_table_size;
+set global max_insert_delayed_threads=@my_max_insert_delayed_threads;
+set global max_join_size =@my_max_join_size;
+set global max_user_connections =@my_max_user_connections;
+set global max_write_lock_count =@my_max_write_lock_count;
+set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
+set global net_buffer_length =@my_net_buffer_length;
+set global net_write_timeout =@my_net_write_timeout;
+set global net_read_timeout =@my_net_read_timeout;
+set global query_cache_limit =@my_query_cache_limit;
+set global query_cache_type =@my_query_cache_type;
+set global rpl_recovery_rank =@my_rpl_recovery_rank;
+set global server_id =@my_server_id;
+set global slow_launch_time =@my_slow_launch_time;
+set global storage_engine =@my_storage_engine;
+set global thread_cache_size =@my_thread_cache_size;
End of 5.0 tests
--- 1.58/mysql-test/t/variables.test 2006-04-30 18:34:08 +02:00
+++ 1.59/mysql-test/t/variables.test 2006-05-15 16:07:11 +02:00
@@ -5,6 +5,37 @@
drop table if exists t1,t2;
--enable_warnings
+#
+# Bug #19263: variables.test doesn't clean up after itself (I/II -- save)
+#
+set @my_binlog_cache_size =@@global.binlog_cache_size;
+set @my_connect_timeout =@@global.connect_timeout;
+set @my_delayed_insert_timeout =@@global.delayed_insert_timeout;
+set @my_delayed_queue_size =@@global.delayed_queue_size;
+set @my_flush =@@global.flush;
+set @my_flush_time =@@global.flush_time;
+set @my_key_buffer_size =@@global.key_buffer_size;
+set @my_max_binlog_cache_size =@@global.max_binlog_cache_size;
+set @my_max_binlog_size =@@global.max_binlog_size;
+set @my_max_connect_errors =@@global.max_connect_errors;
+set @my_max_delayed_threads =@@global.max_delayed_threads;
+set @my_max_heap_table_size =@@global.max_heap_table_size;
+set @my_max_insert_delayed_threads=@@global.max_insert_delayed_threads;
+set @my_max_join_size =@@global.max_join_size;
+set @my_max_user_connections =@@global.max_user_connections;
+set @my_max_write_lock_count =@@global.max_write_lock_count;
+set @my_myisam_data_pointer_size =@@global.myisam_data_pointer_size;
+set @my_net_buffer_length =@@global.net_buffer_length;
+set @my_net_write_timeout =@@global.net_write_timeout;
+set @my_net_read_timeout =@@global.net_read_timeout;
+set @my_query_cache_limit =@@global.query_cache_limit;
+set @my_query_cache_type =@@global.query_cache_type;
+set @my_rpl_recovery_rank =@@global.rpl_recovery_rank;
+set @my_server_id =@@global.server_id;
+set @my_slow_launch_time =@@global.slow_launch_time;
+set @my_storage_engine =@@global.storage_engine;
+set @my_thread_cache_size =@@global.thread_cache_size;
+
# case insensitivity tests (new in 5.0)
set @`test`=1;
select @test, @`test`, @TEST, @`TEST`, @"teSt";
@@ -507,5 +538,36 @@
--replace_column 1 # 2 # 3 # 4 #
select @@version, @@version_comment, @@version_compile_machine,
@@version_compile_os;
+
+#
+# Bug #19263: variables.test doesn't clean up after itself (II/II -- restore)
+#
+set global binlog_cache_size =@my_binlog_cache_size;
+set global connect_timeout =@my_connect_timeout;
+set global delayed_insert_timeout =@my_delayed_insert_timeout;
+set global delayed_queue_size =@my_delayed_queue_size;
+set global flush =@my_flush;
+set global flush_time =@my_flush_time;
+set global key_buffer_size =@my_key_buffer_size;
+set global max_binlog_cache_size =default; #@my_max_binlog_cache_size;
+set global max_binlog_size =@my_max_binlog_size;
+set global max_connect_errors =@my_max_connect_errors;
+set global max_delayed_threads =@my_max_delayed_threads;
+set global max_heap_table_size =@my_max_heap_table_size;
+set global max_insert_delayed_threads=@my_max_insert_delayed_threads;
+set global max_join_size =@my_max_join_size;
+set global max_user_connections =@my_max_user_connections;
+set global max_write_lock_count =@my_max_write_lock_count;
+set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
+set global net_buffer_length =@my_net_buffer_length;
+set global net_write_timeout =@my_net_write_timeout;
+set global net_read_timeout =@my_net_read_timeout;
+set global query_cache_limit =@my_query_cache_limit;
+set global query_cache_type =@my_query_cache_type;
+set global rpl_recovery_rank =@my_rpl_recovery_rank;
+set global server_id =@my_server_id;
+set global slow_launch_time =@my_slow_launch_time;
+set global storage_engine =@my_storage_engine;
+set global thread_cache_size =@my_thread_cache_size;
--echo End of 5.0 tests
--- 1.113/mysql-test/r/func_str.result 2006-04-24 22:17:44 +02:00
+++ 1.114/mysql-test/r/func_str.result 2006-05-15 16:06:30 +02:00
@@ -1017,6 +1017,13 @@
1000000
1
drop table t1;
+select load_file("lkjlkj");
+load_file("lkjlkj")
+NULL
+select ifnull(load_file("lkjlkj"),"it's null");
+ifnull(load_file("lkjlkj"),"it's null")
+it's null
+End of 4.1 tests
create table t1 (d decimal default null);
insert into t1 values (null);
select format(d, 2) from t1;
--- 1.11/mysql-test/t/mysql.test 2006-04-24 22:17:44 +02:00
+++ 1.12/mysql-test/t/mysql.test 2006-05-15 16:07:05 +02:00
@@ -72,3 +72,11 @@
#
--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int not null, k int); insert into t1 values (null, 1, null); select * from t1; describe t1; drop table t1;"
+#
+# Bug#19564: mysql displays NULL instead of space
+#
+--exec $MYSQL -t test -e "create table b19564 (i int, s1 char(1)); insert into b19564 values (1, 'x'); insert into b19564 values (2, NULL); insert into b19564 values (3, ' '); select * from b19564 order by i; drop table b19564;"
+
+--echo End of 5.0 tests
+
+
--- 1.108/mysql-test/r/sp-error.result 2006-03-30 17:07:56 +02:00
+++ 1.109/mysql-test/r/sp-error.result 2006-05-15 16:06:49 +02:00
@@ -282,9 +282,9 @@
@tmp_x @tmp_y @tmp_z
42 45 87
call p(42, 43, @tmp_z)|
-ERROR 42000: OUT or INOUT argument 2 for routine test.p is not a variable
+ERROR 42000: OUT or INOUT argument 2 for routine test.p is not a variable or NEW pseudo-variable in BEFORE trigger
call p(42, @tmp_y, 43)|
-ERROR 42000: OUT or INOUT argument 3 for routine test.p is not a variable
+ERROR 42000: OUT or INOUT argument 3 for routine test.p is not a variable or NEW pseudo-variable in BEFORE trigger
drop procedure p|
create procedure p() begin end|
lock table t1 read|
--- 1.204/mysql-test/r/sp.result 2006-04-25 16:09:26 +02:00
+++ 1.205/mysql-test/r/sp.result 2006-05-15 16:06:50 +02:00
@@ -4914,4 +4914,60 @@
select routine_name,routine_schema from information_schema.routines where
routine_schema like 'bug18344%'|
routine_name routine_schema
+drop function if exists bug12472|
+create function bug12472() returns int return (select count(*) from t1)|
+create table t3 as select bug12472() as i|
+show create table t3|
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select * from t3|
+i
+0
+drop table t3|
+create view v1 as select bug12472() as j|
+create table t3 as select * from v1|
+show create table t3|
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `j` bigint(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select * from t3|
+j
+0
+drop table t3|
+drop view v1|
+drop function bug12472|
+DROP FUNCTION IF EXISTS bug18589_f1|
+DROP PROCEDURE IF EXISTS bug18589_p1|
+DROP PROCEDURE IF EXISTS bug18589_p2|
+CREATE FUNCTION bug18589_f1(arg TEXT) RETURNS TEXT
+BEGIN
+RETURN CONCAT(arg, "");
+END|
+CREATE PROCEDURE bug18589_p1(arg TEXT, OUT ret TEXT)
+BEGIN
+SET ret = CONCAT(arg, "");
+END|
+CREATE PROCEDURE bug18589_p2(arg TEXT)
+BEGIN
+DECLARE v TEXT;
+CALL bug18589_p1(arg, v);
+SELECT v;
+END|
+SELECT bug18589_f1(REPEAT("a", 767))|
+bug18589_f1(REPEAT("a", 767))
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+SET @bug18589_v1 = ""|
+CALL bug18589_p1(REPEAT("a", 767), @bug18589_v1)|
+SELECT @bug18589_v1|
+@bug18589_v1
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+CALL bug18589_p2(REPEAT("a", 767))|
+v
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+DROP FUNCTION bug18589_f1|
+DROP PROCEDURE bug18589_p1|
+DROP PROCEDURE bug18589_p2|
drop table t1,t2;
--- 1.188/mysql-test/t/sp.test 2006-04-25 16:09:27 +02:00
+++ 1.189/mysql-test/t/sp.test 2006-05-15 16:07:11 +02:00
@@ -5780,6 +5780,76 @@
#
+# BUG#12472/BUG#15137 'CREATE TABLE ... SELECT ... which explicitly or
+# implicitly uses stored function gives "Table not locked" error'.
+#
+--disable_warnings
+drop function if exists bug12472|
+--enable_warnings
+create function bug12472() returns int return (select count(*) from t1)|
+# Check case when function is used directly
+create table t3 as select bug12472() as i|
+show create table t3|
+select * from t3|
+drop table t3|
+# Check case when function is used indirectly through view
+create view v1 as select bug12472() as j|
+create table t3 as select * from v1|
+show create table t3|
+select * from t3|
+drop table t3|
+drop view v1|
+drop function bug12472|
+
+
+#
+# BUG#18587: Function that accepts and returns TEXT garbles data if longer than
+# 766 chars
+#
+
+# Prepare.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS bug18589_f1|
+DROP PROCEDURE IF EXISTS bug18589_p1|
+DROP PROCEDURE IF EXISTS bug18589_p2|
+--enable_warnings
+
+CREATE FUNCTION bug18589_f1(arg TEXT) RETURNS TEXT
+BEGIN
+ RETURN CONCAT(arg, "");
+END|
+
+CREATE PROCEDURE bug18589_p1(arg TEXT, OUT ret TEXT)
+BEGIN
+ SET ret = CONCAT(arg, "");
+END|
+
+CREATE PROCEDURE bug18589_p2(arg TEXT)
+BEGIN
+ DECLARE v TEXT;
+ CALL bug18589_p1(arg, v);
+ SELECT v;
+END|
+
+# Test case.
+
+SELECT bug18589_f1(REPEAT("a", 767))|
+
+SET @bug18589_v1 = ""|
+CALL bug18589_p1(REPEAT("a", 767), @bug18589_v1)|
+SELECT @bug18589_v1|
+
+CALL bug18589_p2(REPEAT("a", 767))|
+
+# Cleanup.
+
+DROP FUNCTION bug18589_f1|
+DROP PROCEDURE bug18589_p1|
+DROP PROCEDURE bug18589_p2|
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
--- 1.218/sql/sp_head.cc 2006-05-04 14:34:26 +02:00
+++ 1.219/sql/sp_head.cc 2006-05-15 21:58:58 +02:00
@@ -951,6 +951,7 @@
bool err_status= FALSE;
uint ip= 0;
ulong save_sql_mode;
+ bool save_abort_on_warning;
Query_arena *old_arena;
/* per-instruction arena */
MEM_ROOT execute_mem_root;
@@ -1011,6 +1012,10 @@
thd->derived_tables= 0;
save_sql_mode= thd->variables.sql_mode;
thd->variables.sql_mode= m_sql_mode;
+ save_abort_on_warning= thd->abort_on_warning;
+ thd->abort_on_warning=
+ (m_sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES));
+
/*
It is also more efficient to save/restore current thd->lex once when
do it in each instruction
@@ -1143,6 +1148,7 @@
DBUG_ASSERT(!thd->derived_tables);
thd->derived_tables= old_derived_tables;
thd->variables.sql_mode= save_sql_mode;
+ thd->abort_on_warning= save_abort_on_warning;
thd->stmt_arena= old_arena;
state= EXECUTED;
@@ -1219,18 +1225,23 @@
sp_head::execute_function(THD *thd, Item **argp, uint argcount,
Field *return_value_fld)
{
- Item_cache **param_values;
ulonglong binlog_save_options;
bool need_binlog_call;
- uint params;
+ uint arg_no;
sp_rcontext *octx = thd->spcont;
sp_rcontext *nctx = NULL;
+ char buf[STRING_BUFFER_USUAL_SIZE];
+ String binlog_buf(buf, sizeof(buf), &my_charset_bin);
bool err_status= FALSE;
+
+ MEM_ROOT call_mem_root;
+ Query_arena call_arena(&call_mem_root, Query_arena::INITIALIZED_FOR_SP);
+ Query_arena backup_arena;
+
DBUG_ENTER("sp_head::execute_function");
DBUG_PRINT("info", ("function %s", m_name.str));
LINT_INIT(binlog_save_options);
- params= m_pcont->context_var_count();
/*
Check that the function is called with all specified arguments.
@@ -1238,66 +1249,90 @@
If it is not, use my_error() to report an error, or it will not terminate
the invoking query properly.
*/
-
- if (argcount != params)
+ if (argcount != m_pcont->context_var_count())
{
/*
Need to use my_error here, or it will not terminate the
invoking query properly.
*/
my_error(ER_SP_WRONG_NO_OF_ARGS, MYF(0),
- "FUNCTION", m_qname.str, params, argcount);
+ "FUNCTION", m_qname.str, m_pcont->context_var_count(), argcount);
DBUG_RETURN(TRUE);
}
-
- /* Allocate param_values to be used for dumping the call into binlog. */
-
- if (!(param_values= (Item_cache**)thd->alloc(sizeof(Item_cache*)*argcount)))
- DBUG_RETURN(TRUE);
-
- // QQ Should have some error checking here? (types, etc...)
+ /*
+ Prepare arena and memroot for objects which lifetime is whole
+ duration of function call (sp_rcontext, it's tables and items,
+ sp_cursor and Item_cache holders for case expressions).
+ We can't use caller's arena/memroot for those objects because
+ in this case some fixed amount of memory will be consumed for
+ each function/trigger invocation and so statements which involve
+ lot of them will hog memory.
+ TODO: we should create sp_rcontext once per command and reuse
+ it on subsequent executions of a function/trigger.
+ */
+ init_sql_alloc(&call_mem_root, MEM_ROOT_BLOCK_SIZE, 0);
+ thd->set_n_backup_active_arena(&call_arena, &backup_arena);
if (!(nctx= new sp_rcontext(m_pcont, return_value_fld, octx)) ||
nctx->init(thd))
{
- delete nctx; /* Delete nctx if it was init() that failed. */
- DBUG_RETURN(TRUE);
+ thd->restore_active_arena(&call_arena, &backup_arena);
+ err_status= TRUE;
+ goto err_with_cleanup;
}
+ /*
+ We have to switch temporarily back to callers arena/memroot.
+ Function arguments belong to the caller and so the may reference
+ memory which they will allocate during calculation long after
+ this function call will be finished (e.g. in Item::cleanup()).
+ */
+ thd->restore_active_arena(&call_arena, &backup_arena);
+
#ifndef DBUG_OFF
nctx->sp= this;
#endif
/* Pass arguments. */
+ for (arg_no= 0; arg_no < argcount; arg_no++)
+ {
+ /* Arguments must be fixed in Item_func_sp::fix_fields */
+ DBUG_ASSERT(argp[arg_no]->fixed);
+
+ if ((err_status= nctx->set_variable(thd, arg_no, argp[arg_no])))
+ goto err_with_cleanup;
+ }
+ need_binlog_call= mysql_bin_log.is_open() && (thd->options & OPTION_BIN_LOG);
+
+ /*
+ Remember the original arguments for unrolled replication of functions
+ before they are changed by execution.
+ */
+ if (need_binlog_call)
{
- uint i;
-
- for (i= 0 ; i < argcount ; i++)
+ binlog_buf.length(0);
+ binlog_buf.append(STRING_WITH_LEN("SELECT "));
+ append_identifier(thd, &binlog_buf, m_name.str, m_name.length);
+ binlog_buf.append('(');
+ for (arg_no= 0; arg_no < argcount; arg_no++)
{
- if (!argp[i]->fixed && argp[i]->fix_fields(thd, &argp[i]))
- {
- err_status= TRUE;
- break;
- }
+ String str_value_holder;
+ String *str_value;
- param_values[i]= Item_cache::get_cache(argp[i]->result_type());
- param_values[i]->store(argp[i]);
+ if (arg_no)
+ binlog_buf.append(',');
- if (nctx->set_variable(thd, i, param_values[i]))
- {
- err_status= TRUE;
- break;
- }
- }
- }
+ str_value= sp_get_item_value(nctx->get_item(arg_no),
+ &str_value_holder);
- if (err_status)
- {
- delete nctx;
- DBUG_RETURN(TRUE);
+ if (str_value)
+ binlog_buf.append(*str_value);
+ else
+ binlog_buf.append(STRING_WITH_LEN("NULL"));
+ }
+ binlog_buf.append(')');
}
-
thd->spcont= nctx;
/*
@@ -1306,17 +1341,34 @@
*/
need_binlog_call= mysql_bin_log.is_open() &&
(thd->options & OPTION_BIN_LOG) && !thd->current_stmt_binlog_row_based;
+ binlog_save_options= thd->options;
if (need_binlog_call)
{
reset_dynamic(&thd->user_var_events);
mysql_bin_log.start_union_events(thd);
- binlog_save_options= thd->options;
- thd->options&= ~OPTION_BIN_LOG;
}
+ /*
+ Switch to call arena/mem_root so objects like sp_cursor or
+ Item_cache holders for case expressions can be allocated on it.
+
+ TODO: In future we should associate call arena/mem_root with
+ sp_rcontext and allocate all these objects (and sp_rcontext
+ itself) on it directly rather than juggle with arenas.
+ */
+ thd->set_n_backup_active_arena(&call_arena, &backup_arena);
+
+ thd->options&= ~OPTION_BIN_LOG;
+
err_status= execute(thd);
+ thd->options= binlog_save_options;
+
+ thd->restore_active_arena(&call_arena, &backup_arena);
if (need_binlog_call)
+ mysql_bin_log.stop_union_events(thd);
+
+ if (need_binlog_call && thd->binlog_evt_union.unioned_events)
{
mysql_bin_log.stop_union_events(thd);
thd->options= binlog_save_options;
@@ -1369,27 +1421,19 @@
}
}
+
nctx->pop_all_cursors(); // To avoid memory leaks after an error
+
+err_with_cleanup:
delete nctx;
+ call_arena.free_items();
+ free_root(&call_mem_root, MYF(0));
thd->spcont= octx;
DBUG_RETURN(err_status);
}
-static Item_func_get_user_var *item_is_user_var(Item *it)
-{
- if (it->type() == Item::FUNC_ITEM)
- {
- Item_func *fi= static_cast<Item_func*>(it);
-
- if (fi->functype() == Item_func::GUSERVAR_FUNC)
- return static_cast<Item_func_get_user_var*>(fi);
- }
- return NULL;
-}
-
-
/*
Execute a procedure.
SYNOPSIS
@@ -1467,22 +1511,28 @@
for (uint i= 0 ; i < params ; i++)
{
Item *arg_item= it_args++;
- sp_variable_t *spvar= m_pcont->find_variable(i);
if (!arg_item)
break;
+ sp_variable_t *spvar= m_pcont->find_variable(i);
+
if (!spvar)
continue;
if (spvar->mode != sp_param_in)
{
- if (!arg_item->is_splocal() && !item_is_user_var(arg_item))
+ Settable_routine_parameter *srp=
+ arg_item->get_settable_routine_parameter();
+
+ if (!srp)
{
my_error(ER_SP_NOT_VAR_ARG, MYF(0), i+1, m_qname.str);
err_status= TRUE;
break;
}
+
+ srp->set_required_privilege(spvar->mode == sp_param_inout);
}
if (spvar->mode == sp_param_out)
@@ -1566,36 +1616,16 @@
if (spvar->mode == sp_param_in)
continue;
- if (arg_item->is_splocal())
- {
- if (octx->set_variable(thd,
- ((Item_splocal*) arg_item)->get_var_idx(),
- nctx->get_item(i)))
- {
- err_status= TRUE;
- break;
- }
- }
- else
- {
- Item_func_get_user_var *guv= item_is_user_var(arg_item);
+ Settable_routine_parameter *srp=
+ arg_item->get_settable_routine_parameter();
- if (guv)
- {
- Item *item= nctx->get_item(i);
- Item_func_set_user_var *suv;
-
- suv= new Item_func_set_user_var(guv->get_name(), item);
- /*
- Item_func_set_user_var is not fixed after construction,
- call fix_fields().
- */
- if ((err_status= test(!suv || suv->fix_fields(thd, &item) ||
- suv->check() || suv->update())))
- break;
- }
- }
+ DBUG_ASSERT(srp);
+ if (srp->set_value(thd, octx, nctx->get_item(i)))
+ {
+ err_status= TRUE;
+ break;
+ }
}
}
@@ -2437,12 +2467,7 @@
int
sp_instr_set_trigger_field::exec_core(THD *thd, uint *nextp)
{
- int res= 0;
- Item *it= sp_prepare_func_item(thd, &value);
- if (!it ||
- !trigger_field->fixed && trigger_field->fix_fields(thd, 0) ||
- (it->save_in_field(trigger_field->field, 0) < 0))
- res= -1;
+ const int res= (trigger_field->set_value(thd, value) ? -1 : 0);
*nextp = m_ip+1;
return res;
}
--- 1.4.2.1/mysql-test/r/binlog.result 2006-05-12 18:58:42 +02:00
+++ 1.10/mysql-test/r/binlog_stm_binlog.result 2006-05-15 16:06:28 +02:00
@@ -1,3 +1,15 @@
+create table t1 (a int, b int) engine=innodb;
+begin;
+insert into t1 values (1,2);
+commit;
+show binlog events;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
+master-bin.000001 102 Query 1 209 use `test`; create table t1 (a int, b int) engine=innodb
+master-bin.000001 209 Query 1 277 use `test`; BEGIN
+master-bin.000001 277 Query 1 90 use `test`; insert into t1 values (1,2)
+master-bin.000001 367 Xid 1 394 COMMIT /* XID */
+drop table t1;
drop table if exists t1, t2;
reset master;
create table t1 (a int) engine=bdb;
@@ -8,7 +20,7 @@
begin;
insert t2 values (5);
commit;
-show binlog events from 98;
+show binlog events from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=bdb
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
@@ -17,14 +29,14 @@
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert t2 values (5)
-master-bin.000001 # Xid 1 # COMMIT /* xid=12 */
+master-bin.000001 # Xid 1 # COMMIT /* xid= */
drop table t1,t2;
reset master;
create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
-show binlog events in 'master-bin.000001' from 98;
+show binlog events in 'master-bin.000001' from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN
@@ -128,8 +140,8 @@
master-bin.000001 # Query 1 # use `test`; insert into t1 values(3 + 4)
master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4)
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4)
-master-bin.000001 # Xid 1 # COMMIT /* xid=19 */
+master-bin.000001 # Xid 1 # COMMIT /* xid= */
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002' from 98;
+show binlog events in 'master-bin.000002' from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
--- 1.4.2.1/mysql-test/t/binlog.test 2006-05-12 18:58:52 +02:00
+++ 1.9/mysql-test/extra/binlog_tests/binlog.test 2006-05-15 16:06:24 +02:00
@@ -1,9 +1,11 @@
#
# misc binlogging tests that do not require a slave running
#
+
-- source include/not_embedded.inc
-- source include/have_bdb.inc
-- source include/have_innodb.inc
+-- source include/have_debug.inc
--disable_warnings
drop table if exists t1, t2;
@@ -19,9 +21,9 @@
insert t2 values (5);
commit;
# first COMMIT must be Query_log_event, second - Xid_log_event
---replace_result "xid=21" "xid=12"
--replace_column 2 # 5 #
-show binlog events from 98;
+--replace_regex /table_id: [0-9]+/table_id: #/
+show binlog events from 102;
drop table t1,t2;
#
@@ -41,9 +43,9 @@
--enable_query_log
commit;
drop table t1;
---replace_result "xid=32" "xid=19"
--replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 98;
+--replace_regex /table_id: [0-9]+/table_id: #/
+show binlog events in 'master-bin.000001' from 102;
--replace_column 2 # 5 #
-show binlog events in 'master-bin.000002' from 98;
-
+--replace_regex /table_id: [0-9]+/table_id: #/
+show binlog events in 'master-bin.000002' from 102;
--- 1.25/mysql-test/r/rpl_temporary.result 2006-04-25 19:00:08 +02:00
+++ 1.26/mysql-test/r/rpl_temporary.result 2006-05-15 16:06:46 +02:00
@@ -94,8 +94,6 @@
set @session.pseudo_thread_id=200;
create temporary table t201 (id int);
create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int);
-set @con1_id=connection_id();
-kill @con1_id;
create table t1(f int);
insert into t1 values (1);
select * from t1 /* must be 1 */;
--- 1.20/mysql-test/t/rpl_temporary.test 2006-04-25 19:00:08 +02:00
+++ 1.21/mysql-test/t/rpl_temporary.test 2006-05-15 16:07:11 +02:00
@@ -171,8 +171,18 @@
set @session.pseudo_thread_id=200;
create temporary table t201 (id int);
create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int);
-set @con1_id=connection_id();
-kill @con1_id;
+
+#
+# Don't kill our own connection to the server as
+# the result code differs depending on platform.
+#
+# Select the id to kill into a variable of mysqltest
+let $con1_id= `select connection_id()`;
+# Switch connection to avoid killing our own connection
+connection master;
+--disable_query_log
+eval kill $con1_id;
+--enable_query_log
#now do something to show that slave is ok after DROP temp tables
connection master;
| Thread |
|---|
| • bk commit into 5.1 tree (lars:1.2398) | Lars Thalmann | 15 May |