#At file:///Users/kgeorge/mysql/work/fix-trunk-merge/ based on revid:alik@ibmvm-20100804092850-9i1ihr1srn45fno2
3176 Georgi Kodinov 2010-08-04 [merge]
Merge of bug #42144 to mysql-trunk-merge.
Fix extended to update all the enum variables and options to ulong to
be compliant with the plugin code.
modified:
include/myisam.h
include/mysql/plugin.h
mysql-test/collections/default.experimental
mysys/my_getopt.c
sql/events.cc
sql/events.h
sql/mysqld.cc
sql/mysqld.h
sql/sql_class.h
sql/sql_plugin.cc
sql/sys_vars.h
storage/example/ha_example.cc
storage/myisam/mi_static.c
=== modified file 'include/myisam.h'
--- a/include/myisam.h 2010-07-23 20:15:07 +0000
+++ b/include/myisam.h 2010-08-04 16:55:31 +0000
@@ -249,7 +249,7 @@ typedef struct st_columndef /* column i
extern char * myisam_log_filename; /* Name of logfile */
extern ulong myisam_block_size;
-extern uint myisam_concurrent_insert;
+extern ulong myisam_concurrent_insert;
extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
extern my_off_t myisam_max_temp_length;
extern ulong myisam_data_pointer_size;
=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h 2010-08-04 08:10:38 +0000
+++ b/include/mysql/plugin.h 2010-08-04 16:55:31 +0000
@@ -327,7 +327,7 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsign
#name, comment, check, update, &varname, def, min, max, blk }
#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
-DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned int) = { \
+DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def, typelib }
=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental 2010-08-04 08:21:06 +0000
+++ b/mysql-test/collections/default.experimental 2010-08-04 16:55:31 +0000
@@ -19,7 +19,6 @@ main.mysqlbinlog_row @solaris
main.mysqlbinlog_row_innodb @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
main.mysqlbinlog_row_myisam @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
-main.plugin* @solaris # Bug#47146 Linking problem with example plugin when dtrace enabled
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
@@ -32,7 +31,6 @@ perfschema.server_init
rpl.rpl_heartbeat_basic # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again
rpl.rpl_innodb_bug28430* # Bug#46029
-rpl.rpl_plugin_load* @solaris # Bug#47146
rpl.rpl_row_sp011* @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
=== modified file 'mysys/my_getopt.c'
--- a/mysys/my_getopt.c 2010-08-04 08:10:38 +0000
+++ b/mysys/my_getopt.c 2010-08-04 16:55:31 +0000
@@ -611,16 +611,16 @@ static int setval(const struct my_option
Accept an integer representation of the enumerated item.
*/
char *endptr;
- uint arg= (uint) strtoul(argument, &endptr, 10);
+ ulong arg= strtoul(argument, &endptr, 10);
if (*endptr || arg >= opts->typelib->count)
{
res= EXIT_ARGUMENT_INVALID;
goto ret;
}
- *(uint*)value= arg;
+ *(ulong*)value= arg;
}
else
- *(uint*)value= type - 1;
+ *(ulong*)value= type - 1;
}
break;
case GET_SET:
@@ -1016,7 +1016,7 @@ static void init_one_value(const struct
*((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL);
break;
case GET_ENUM:
- *((uint*) variable)= (uint) value;
+ *((ulong*) variable)= (ulong) value;
break;
case GET_UINT:
*((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL);
@@ -1292,7 +1292,7 @@ void my_print_variables(const struct my_
printf("\n");
break;
case GET_ENUM:
- printf("%s\n", get_type(optp->typelib, *(uint*) value));
+ printf("%s\n", get_type(optp->typelib, *(ulong*) value));
break;
case GET_STR:
case GET_STR_ALLOC: /* fall through */
=== modified file 'sql/events.cc'
--- a/sql/events.cc 2010-07-27 15:01:56 +0000
+++ b/sql/events.cc 2010-08-04 16:55:31 +0000
@@ -76,7 +76,7 @@
Event_queue *Events::event_queue;
Event_scheduler *Events::scheduler;
Event_db_repository *Events::db_repository;
-uint Events::opt_event_scheduler= Events::EVENTS_OFF;
+ulong Events::opt_event_scheduler= Events::EVENTS_OFF;
mysql_mutex_t Events::LOCK_event_metadata;
bool Events::check_system_tables_error= FALSE;
=== modified file 'sql/events.h'
--- a/sql/events.h 2010-04-12 13:17:37 +0000
+++ b/sql/events.h 2010-08-04 16:55:31 +0000
@@ -91,7 +91,7 @@ public:
*/
enum enum_opt_event_scheduler { EVENTS_OFF, EVENTS_ON, EVENTS_DISABLED };
/* Protected using LOCK_global_system_variables only. */
- static uint opt_event_scheduler;
+ static ulong opt_event_scheduler;
static mysql_mutex_t LOCK_event_metadata;
static bool check_if_system_tables_error();
static bool start();
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2010-07-29 12:33:56 +0000
+++ b/sql/mysqld.cc 2010-08-04 16:55:31 +0000
@@ -438,10 +438,10 @@ static bool calling_initgroups= FALSE; /
#endif
uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
uint mysqld_port_timeout;
-uint delay_key_write_options;
+ulong delay_key_write_options;
uint protocol_version;
uint lower_case_table_names;
-uint tc_heuristic_recover= 0;
+ulong tc_heuristic_recover= 0;
uint volatile thread_count;
int32 thread_running;
ulong thread_created;
@@ -452,7 +452,7 @@ ulong slow_launch_time, slave_open_temp_
ulong open_files_limit, max_binlog_size, max_relay_log_size;
ulong slave_trans_retries;
uint slave_net_timeout;
-uint slave_exec_mode_options;
+ulong slave_exec_mode_options;
ulonglong slave_type_conversions_options;
ulong thread_cache_size=0, thread_pool_size= 0;
ulong binlog_cache_size=0;
@@ -552,7 +552,7 @@ char *mysql_data_home= const_cast<char*>
const char *mysql_real_data_home_ptr= mysql_real_data_home;
char server_version[SERVER_VERSION_LENGTH];
char *mysqld_unix_port, *opt_mysql_tmpdir;
-uint thread_handling;
+ulong thread_handling;
/** name of reference on left expression in rewritten IN subquery */
const char *in_left_expr_name= "<left expr>";
=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h 2010-07-27 15:01:56 +0000
+++ b/sql/mysqld.h 2010-08-04 16:55:31 +0000
@@ -105,7 +105,7 @@ extern uint connection_count;
extern my_bool opt_safe_user_create;
extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap;
extern my_bool opt_slave_compressed_protocol, use_temp_pool;
-extern uint slave_exec_mode_options;
+extern ulong slave_exec_mode_options;
extern ulonglong slave_type_conversions_options;
extern my_bool opt_readonly, lower_case_file_system;
extern my_bool opt_enable_named_pipe, opt_sync_frm, opt_allow_suspicious_udfs;
@@ -136,7 +136,7 @@ extern my_bool relay_log_purge, opt_inno
extern my_bool relay_log_recovery;
extern uint test_flags,select_errors,ha_open_options;
extern uint protocol_version, mysqld_port, dropping_tables;
-extern uint delay_key_write_options;
+extern ulong delay_key_write_options;
extern char *opt_logname, *opt_slow_logname;
extern char *opt_backup_history_logname, *opt_backup_progress_logname,
*opt_backup_settings_name;
@@ -304,7 +304,7 @@ extern ulong specialflag;
extern uint mysql_data_home_len;
extern uint mysql_real_data_home_len;
extern const char *mysql_real_data_home_ptr;
-extern uint thread_handling;
+extern ulong thread_handling;
extern MYSQL_PLUGIN_IMPORT char *mysql_data_home;
extern char server_version[SERVER_VERSION_LENGTH];
extern MYSQL_PLUGIN_IMPORT char mysql_real_data_home[];
=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h 2010-07-30 15:30:30 +0000
+++ b/sql/sql_class.h 2010-08-04 16:55:31 +0000
@@ -114,7 +114,7 @@ extern bool volatile shutdown_in_progres
#define TC_HEURISTIC_RECOVER_COMMIT 1
#define TC_HEURISTIC_RECOVER_ROLLBACK 2
-extern uint tc_heuristic_recover;
+extern ulong tc_heuristic_recover;
typedef struct st_user_var_events
{
@@ -426,13 +426,13 @@ typedef struct system_variables
ulong log_warnings;
ulong group_concat_max_len;
- uint binlog_format; ///< binlog format for this thd (see enum_binlog_format)
+ ulong binlog_format; ///< binlog format for this thd (see enum_binlog_format)
my_bool binlog_direct_non_trans_update;
my_bool sql_log_bin;
- uint completion_type;
- uint query_cache_type;
- uint tx_isolation;
- uint updatable_views_with_limit;
+ ulong completion_type;
+ ulong query_cache_type;
+ ulong tx_isolation;
+ ulong updatable_views_with_limit;
uint max_user_connections;
/**
In slave thread we need to know in behalf of which
=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc 2010-08-04 08:21:06 +0000
+++ b/sql/sql_plugin.cc 2010-08-04 16:55:31 +0000
@@ -3025,11 +3025,11 @@ static int construct_options(MEM_ROOT *m
Allocate temporary space for the value of the tristate.
This option will have a limited lifetime and is not used beyond
server initialization.
- GET_ENUM value is an unsigned integer.
+ GET_ENUM value is an unsigned long integer.
*/
options[0].value= options[1].value=
- (uchar **)alloc_root(mem_root, sizeof(uint));
- *((uint*) options[0].value)= (uint) options[0].def_value;
+ (uchar **)alloc_root(mem_root, sizeof(ulong));
+ *((ulong*) options[0].value)= (ulong) options[0].def_value;
options+= 2;
}
=== modified file 'sql/sys_vars.h'
--- a/sql/sys_vars.h 2010-07-16 21:00:50 +0000
+++ b/sql/sys_vars.h 2010-08-04 16:55:31 +0000
@@ -271,28 +271,28 @@ public:
deprecated_version, substitute)
{
option.var_type= GET_ENUM;
- global_var(uint)= def_val;
+ global_var(ulong)= def_val;
DBUG_ASSERT(def_val < typelib.count);
- DBUG_ASSERT(size == sizeof(uint));
+ DBUG_ASSERT(size == sizeof(ulong));
}
bool session_update(THD *thd, set_var *var)
{
- session_var(thd, uint)= var->save_result.ulonglong_value;
+ session_var(thd, ulong)= var->save_result.ulonglong_value;
return false;
}
bool global_update(THD *thd, set_var *var)
{
- global_var(uint)= var->save_result.ulonglong_value;
+ global_var(ulong)= var->save_result.ulonglong_value;
return false;
}
void session_save_default(THD *thd, set_var *var)
- { var->save_result.ulonglong_value= global_var(uint); }
+ { var->save_result.ulonglong_value= global_var(ulong); }
void global_save_default(THD *thd, set_var *var)
{ var->save_result.ulonglong_value= option.def_value; }
uchar *session_value_ptr(THD *thd, LEX_STRING *base)
- { return (uchar*)typelib.type_names[session_var(thd, uint)]; }
+ { return (uchar*)typelib.type_names[session_var(thd, ulong)]; }
uchar *global_value_ptr(THD *thd, LEX_STRING *base)
- { return (uchar*)typelib.type_names[global_var(uint)]; }
+ { return (uchar*)typelib.type_names[global_var(ulong)]; }
};
/**
=== modified file 'storage/example/ha_example.cc'
--- a/storage/example/ha_example.cc 2010-08-03 16:21:13 +0000
+++ b/storage/example/ha_example.cc 2010-08-04 16:55:31 +0000
@@ -912,7 +912,7 @@ int ha_example::create(const char *name,
struct st_mysql_storage_engine example_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
-static uint srv_enum_var= 0;
+static ulong srv_enum_var= 0;
static ulong srv_ulong_var= 0;
const char *enum_var_names[]=
=== modified file 'storage/myisam/mi_static.c'
--- a/storage/myisam/mi_static.c 2010-07-23 20:13:36 +0000
+++ b/storage/myisam/mi_static.c 2010-08-04 16:55:31 +0000
@@ -33,9 +33,9 @@ uint myisam_quick_table_bits=9;
ulong myisam_block_size= MI_KEY_BLOCK_LENGTH; /* Best by test */
my_bool myisam_flush=0, myisam_delay_key_write=0, myisam_single_user=0;
#if defined(THREAD) && !defined(DONT_USE_RW_LOCKS)
-uint myisam_concurrent_insert= 2;
+ulong myisam_concurrent_insert= 2;
#else
-uint myisam_concurrent_insert= 0;
+ulong myisam_concurrent_insert= 0;
#endif
ulonglong myisam_max_temp_length= MAX_FILE_SIZE;
ulong myisam_data_pointer_size=4;
Attachment: [text/bzr-bundle] bzr/georgi.kodinov@oracle.com-20100804165531-wttmhhk59o4pwjb3.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-merge branch (Georgi.Kodinov:3176) Bug#42144 | Georgi Kodinov | 4 Aug |