From: Date: July 14 2006 1:27pm Subject: bk commit into 4.1 tree (ramil:1.2536) BUG#15195 List-Archive: http://lists.mysql.com/commits/9170 X-Bug: 15195 Message-Id: <200607141127.k6EBR81M039144@myoffice.izhnet.ru> Below is the list of changes that have just been committed into a local 4.1 repository of ram. When ram 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@stripped, 2006-07-14 16:26:58+05:00, ramil@stripped +7 -0 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) mysql-test/r/warnings.result@stripped, 2006-07-14 16:26:50+05:00, ramil@stripped +7 -0 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) mysql-test/t/warnings-master.opt@stripped, 2006-07-14 16:26:51+05:00, ramil@stripped +1 -1 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) mysql-test/t/warnings.test@stripped, 2006-07-14 16:26:51+05:00, ramil@stripped +4 -0 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) sql/handler.cc@stripped, 2006-07-14 16:26:51+05:00, ramil@stripped +2 -2 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) sql/mysql_priv.h@stripped, 2006-07-14 16:26:51+05:00, ramil@stripped +1 -1 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) sql/mysqld.cc@stripped, 2006-07-14 16:26:51+05:00, ramil@stripped +10 -2 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) sql/set_var.cc@stripped, 2006-07-14 16:26:52+05:00, ramil@stripped +1 -0 --{skip-}merge option added which allows the user to disable merge engine and to avoid the potential security problem. (see bug #15195: Security Breach with MERGE table) # 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: ramil # Host: myoffice.izhnet.ru # Root: /usr/home/ram/work/4.1.b15195 --- 1.171/sql/handler.cc 2006-07-14 16:27:09 +05:00 +++ 1.172/sql/handler.cc 2006-07-14 16:27:09 +05:00 @@ -73,9 +73,9 @@ "Alias for MEMORY", DB_TYPE_HEAP}, {"MEMORY", &have_yes, "Hash based, stored in memory, useful for temporary tables", DB_TYPE_HEAP}, - {"MERGE", &have_yes, + {"MERGE", &have_merge_db, "Collection of identical MyISAM tables", DB_TYPE_MRG_MYISAM}, - {"MRG_MYISAM",&have_yes, + {"MRG_MYISAM",&have_merge_db, "Alias for MERGE", DB_TYPE_MRG_MYISAM}, {"ISAM", &have_isam, "Obsolete storage engine, now replaced by MyISAM", DB_TYPE_ISAM}, --- 1.378/sql/mysql_priv.h 2006-07-14 16:27:09 +05:00 +++ 1.379/sql/mysql_priv.h 2006-07-14 16:27:09 +05:00 @@ -1021,7 +1021,7 @@ extern SHOW_COMP_OPTION have_geometry, have_rtree_keys; extern SHOW_COMP_OPTION have_crypt; extern SHOW_COMP_OPTION have_compress; -extern SHOW_COMP_OPTION have_blackhole_db; +extern SHOW_COMP_OPTION have_blackhole_db, have_merge_db; #ifndef __WIN__ extern pthread_t signal_thread; --- 1.613/sql/mysqld.cc 2006-07-14 16:27:09 +05:00 +++ 1.614/sql/mysqld.cc 2006-07-14 16:27:09 +05:00 @@ -287,6 +287,7 @@ my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0; my_bool opt_log_slave_updates= 0; my_bool opt_console= 0, opt_bdb, opt_innodb, opt_isam, opt_ndbcluster; +my_bool opt_merge; #ifdef HAVE_NDBCLUSTER_DB const char *opt_ndbcluster_connectstring= 0; my_bool opt_ndb_shm, opt_ndb_optimized_node_selection; @@ -420,7 +421,7 @@ CHARSET_INFO *national_charset_info, *table_alias_charset; SHOW_COMP_OPTION have_berkeley_db, have_innodb, have_isam, have_ndbcluster, - have_example_db, have_archive_db, have_csv_db; + have_example_db, have_archive_db, have_csv_db, have_merge_db; SHOW_COMP_OPTION have_raid, have_openssl, have_symlink, have_query_cache; SHOW_COMP_OPTION have_geometry, have_rtree_keys; SHOW_COMP_OPTION have_crypt, have_compress; @@ -4345,7 +4346,8 @@ OPT_DATETIME_FORMAT, OPT_LOG_QUERIES_NOT_USING_INDEXES, OPT_DEFAULT_TIME_ZONE, - OPT_LOG_SLOW_ADMIN_STATEMENTS + OPT_LOG_SLOW_ADMIN_STATEMENTS, + OPT_MERGE }; @@ -4705,6 +4707,9 @@ #endif /* HAVE_REPLICATION */ {"memlock", OPT_MEMLOCK, "Lock mysqld in memory.", (gptr*) &locked_in_memory, (gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"merge", OPT_MERGE, "Enable Merge storage engine. Disable with \ +--skip-merge.", + (gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0}, {"myisam-recover", OPT_MYISAM_RECOVER, "Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.", (gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0, @@ -6467,6 +6472,9 @@ else have_berkeley_db= SHOW_OPTION_DISABLED; #endif + break; + case OPT_MERGE: + have_merge_db= opt_merge ? SHOW_OPTION_YES : SHOW_OPTION_DISABLED; break; case OPT_ISAM: #ifdef HAVE_ISAM --- 1.21/mysql-test/t/warnings.test 2006-07-14 16:27:09 +05:00 +++ 1.22/mysql-test/t/warnings.test 2006-07-14 16:27:09 +05:00 @@ -118,6 +118,10 @@ alter table t1 engine=isam; drop table t1; +create table t1 (id int) engine=merge; +alter table t1 engine=merge; +drop table t1; + # # Test for deprecated TYPE= syntax # --- 1.2/mysql-test/t/warnings-master.opt 2006-07-14 16:27:09 +05:00 +++ 1.3/mysql-test/t/warnings-master.opt 2006-07-14 16:27:09 +05:00 @@ -1 +1 @@ ---skip-isam +--skip-isam --skip-merge --- 1.183/sql/set_var.cc 2006-07-14 16:27:09 +05:00 +++ 1.184/sql/set_var.cc 2006-07-14 16:27:09 +05:00 @@ -738,6 +738,7 @@ {"have_innodb", (char*) &have_innodb, SHOW_HAVE}, {"have_isam", (char*) &have_isam, SHOW_HAVE}, {"have_ndbcluster", (char*) &have_ndbcluster, SHOW_HAVE}, + {"have_merge_engine", (char*) &have_merge_db, SHOW_HAVE}, {"have_openssl", (char*) &have_openssl, SHOW_HAVE}, {"have_query_cache", (char*) &have_query_cache, SHOW_HAVE}, {"have_raid", (char*) &have_raid, SHOW_HAVE}, --- 1.31/mysql-test/r/warnings.result 2006-07-14 16:27:09 +05:00 +++ 1.32/mysql-test/r/warnings.result 2006-07-14 16:27:09 +05:00 @@ -171,6 +171,13 @@ Warnings: Warning 1266 Using storage engine MyISAM for table 't1' drop table t1; +create table t1 (id int) engine=merge; +Warnings: +Warning 1266 Using storage engine MyISAM for table 't1' +alter table t1 engine=merge; +Warnings: +Warning 1266 Using storage engine MyISAM for table 't1' +drop table t1; create table t1 (id int) type=heap; Warnings: Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead