3609 Marc Alff 2011-03-18 [merge]
Merge mysql-trunk --> mysql-trunk-stage
modified:
include/decimal.h
mysql-test/r/func_math.result
mysql-test/r/grant.result
mysql-test/r/grant2.result
mysql-test/r/plugin_auth.result
mysql-test/r/plugin_auth_qa.result
mysql-test/r/plugin_auth_qa_1.result
mysql-test/r/plugin_auth_qa_2.result
mysql-test/r/sp_notembedded.result
mysql-test/r/system_mysql_db.result
mysql-test/suite/funcs_1/r/is_columns_mysql.result
mysql-test/suite/funcs_1/r/is_user_privileges.result
mysql-test/suite/rpl/r/rpl_checksum_cache.result
mysql-test/suite/rpl/r/rpl_ignore_table.result
mysql-test/suite/rpl/r/rpl_stm_000001.result
mysql-test/suite/rpl/t/rpl_checksum_cache.test
mysql-test/t/func_math.test
mysql-test/t/plugin_auth.test
scripts/mysql_system_tables.sql
scripts/mysql_system_tables_fix.sql
sql/my_decimal.h
sql/mysqld.cc
sql/mysqld.h
sql/sql_acl.cc
strings/decimal.c
unittest/gunit/item-t.cc
3608 Marc Alff 2011-03-18 [merge]
WL#2515 PERFORMANCE SCHEMA STAGES
WL#4813 PERFORMANCE SCHEMA STATEMENTS
Merge of mysql-trunk-wl4813 (revno 3216) to mysql-trunk-stage,
for inclusion in mysql-trunk.
added:
include/mysql/psi/mysql_stage.h
include/mysql/psi/mysql_statement.h
mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result
mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result
mysql-test/suite/perfschema/r/ddl_events_stages_current.result
mysql-test/suite/perfschema/r/ddl_events_stages_history.result
mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result
mysql-test/suite/perfschema/r/ddl_events_statements_current.result
mysql-test/suite/perfschema/r/ddl_events_statements_history.result
mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result
mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result
mysql-test/suite/perfschema/r/dml_events_stages_current.result
mysql-test/suite/perfschema/r/dml_events_stages_history.result
mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
mysql-test/suite/perfschema/r/dml_events_statements_current.result
mysql-test/suite/perfschema/r/dml_events_statements_history.result
mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
mysql-test/suite/perfschema/r/start_server_innodb.result
mysql-test/suite/perfschema/r/start_server_no_stage_class.result
mysql-test/suite/perfschema/r/start_server_no_stages_history.result
mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
mysql-test/suite/perfschema/r/start_server_no_statement_class.result
mysql-test/suite/perfschema/r/start_server_no_statements_history.result
mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
mysql-test/suite/perfschema/t/ddl_esgs_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/ddl_esgs_global_by_event_name.test
mysql-test/suite/perfschema/t/ddl_esms_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/ddl_esms_global_by_event_name.test
mysql-test/suite/perfschema/t/ddl_events_stages_current.test
mysql-test/suite/perfschema/t/ddl_events_stages_history.test
mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test
mysql-test/suite/perfschema/t/ddl_events_statements_current.test
mysql-test/suite/perfschema/t/ddl_events_statements_history.test
mysql-test/suite/perfschema/t/ddl_events_statements_history_long.test
mysql-test/suite/perfschema/t/dml_esgs_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/dml_esgs_global_by_event_name.test
mysql-test/suite/perfschema/t/dml_esms_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/dml_esms_global_by_event_name.test
mysql-test/suite/perfschema/t/dml_events_stages_current.test
mysql-test/suite/perfschema/t/dml_events_stages_history.test
mysql-test/suite/perfschema/t/dml_events_stages_history_long.test
mysql-test/suite/perfschema/t/dml_events_statements_current.test
mysql-test/suite/perfschema/t/dml_events_statements_history.test
mysql-test/suite/perfschema/t/dml_events_statements_history_long.test
mysql-test/suite/perfschema/t/start_server_innodb-master.opt
mysql-test/suite/perfschema/t/start_server_innodb.test
mysql-test/suite/perfschema/t/start_server_no_stage_class-master.opt
mysql-test/suite/perfschema/t/start_server_no_stage_class.test
mysql-test/suite/perfschema/t/start_server_no_stages_history-master.opt
mysql-test/suite/perfschema/t/start_server_no_stages_history.test
mysql-test/suite/perfschema/t/start_server_no_stages_history_long-master.opt
mysql-test/suite/perfschema/t/start_server_no_stages_history_long.test
mysql-test/suite/perfschema/t/start_server_no_statement_class-master.opt
mysql-test/suite/perfschema/t/start_server_no_statement_class.test
mysql-test/suite/perfschema/t/start_server_no_statements_history-master.opt
mysql-test/suite/perfschema/t/start_server_no_statements_history.test
mysql-test/suite/perfschema/t/start_server_no_statements_history_long-master.opt
mysql-test/suite/perfschema/t/start_server_no_statements_history_long.test
mysql-test/suite/sys_vars/r/pfs_events_stages_history_long_size_basic.result
mysql-test/suite/sys_vars/r/pfs_events_stages_history_size_basic.result
mysql-test/suite/sys_vars/r/pfs_events_statements_history_long_size_basic.result
mysql-test/suite/sys_vars/r/pfs_events_statements_history_size_basic.result
mysql-test/suite/sys_vars/r/pfs_max_stage_classes_basic.result
mysql-test/suite/sys_vars/r/pfs_max_statement_classes_basic.result
mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic.test
mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic.test
mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic.test
mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic.test
mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic.test
mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic.test
storage/perfschema/pfs_con_slice.cc
storage/perfschema/pfs_con_slice.h
storage/perfschema/pfs_events.h
storage/perfschema/pfs_events_stages.cc
storage/perfschema/pfs_events_stages.h
storage/perfschema/pfs_events_statements.cc
storage/perfschema/pfs_events_statements.h
storage/perfschema/table_esgs_by_thread_by_event_name.cc
storage/perfschema/table_esgs_by_thread_by_event_name.h
storage/perfschema/table_esgs_global_by_event_name.cc
storage/perfschema/table_esgs_global_by_event_name.h
storage/perfschema/table_esms_by_thread_by_event_name.cc
storage/perfschema/table_esms_by_thread_by_event_name.h
storage/perfschema/table_esms_global_by_event_name.cc
storage/perfschema/table_esms_global_by_event_name.h
storage/perfschema/table_events_stages.cc
storage/perfschema/table_events_stages.h
storage/perfschema/table_events_statements.cc
storage/perfschema/table_events_statements.h
modified:
include/mysql/psi/psi.h
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v2.h.pp
mysql-test/r/mysqld--help-notwin.result
mysql-test/r/mysqld--help-win.result
mysql-test/r/sp-threads.result
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
mysql-test/suite/funcs_1/r/processlist_priv_ps.result
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
mysql-test/suite/funcs_1/r/processlist_val_ps.result
mysql-test/suite/perfschema/include/schema.inc
mysql-test/suite/perfschema/include/start_server_common.inc
mysql-test/suite/perfschema/r/checksum.result
mysql-test/suite/perfschema/r/column_privilege.result
mysql-test/suite/perfschema/r/csv_table_io.result
mysql-test/suite/perfschema/r/dml_setup_consumers.result
mysql-test/suite/perfschema/r/dml_setup_timers.result
mysql-test/suite/perfschema/r/func_file_io.result
mysql-test/suite/perfschema/r/indexed_table_io.result
mysql-test/suite/perfschema/r/information_schema.result
mysql-test/suite/perfschema/r/innodb_table_io.result
mysql-test/suite/perfschema/r/memory_table_io.result
mysql-test/suite/perfschema/r/merge_table_io.result
mysql-test/suite/perfschema/r/multi_table_io.result
mysql-test/suite/perfschema/r/myisam_file_io.result
mysql-test/suite/perfschema/r/myisam_table_io.result
mysql-test/suite/perfschema/r/ortho_iter.result
mysql-test/suite/perfschema/r/part_table_io.result
mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result
mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result
mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result
mysql-test/suite/perfschema/r/privilege.result
mysql-test/suite/perfschema/r/privilege_table_io.result
mysql-test/suite/perfschema/r/query_cache.result
mysql-test/suite/perfschema/r/rollback_table_io.result
mysql-test/suite/perfschema/r/schema_lc0.result
mysql-test/suite/perfschema/r/schema_lc1.result
mysql-test/suite/perfschema/r/schema_lc2.result
mysql-test/suite/perfschema/r/start_server_no_cond_class.result
mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
mysql-test/suite/perfschema/r/start_server_no_file_class.result
mysql-test/suite/perfschema/r/start_server_no_file_inst.result
mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
mysql-test/suite/perfschema/r/start_server_no_table_inst.result
mysql-test/suite/perfschema/r/start_server_no_thread_class.result
mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
mysql-test/suite/perfschema/r/start_server_nothing.result
mysql-test/suite/perfschema/r/start_server_off.result
mysql-test/suite/perfschema/r/start_server_on.result
mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
mysql-test/suite/perfschema/r/table_aggregate_off.result
mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
mysql-test/suite/perfschema/r/temp_table_io.result
mysql-test/suite/perfschema/r/trigger_table_io.result
mysql-test/suite/perfschema/r/view_table_io.result
mysql-test/suite/perfschema/t/checksum.test
mysql-test/suite/perfschema/t/column_privilege.test
mysql-test/suite/perfschema/t/privilege.test
mysql-test/suite/perfschema/t/start_server_nothing-master.opt
mysql-test/suite/perfschema/t/start_server_nothing.test
scripts/mysql_system_tables.sql
sql/filesort.cc
sql/item_func.cc
sql/lock.cc
sql/log.cc
sql/log_event.cc
sql/mysqld.cc
sql/mysqld.h
sql/rpl_master.cc
sql/rpl_slave.cc
sql/sql_base.cc
sql/sql_cache.cc
sql/sql_class.cc
sql/sql_class.h
sql/sql_cursor.cc
sql/sql_delete.cc
sql/sql_insert.cc
sql/sql_parse.cc
sql/sql_partition_admin.cc
sql/sql_prepare.cc
sql/sql_select.cc
sql/sql_table.cc
sql/sql_union.cc
sql/sql_update.cc
sql/sql_view.cc
sql/sys_vars.cc
storage/perfschema/CMakeLists.txt
storage/perfschema/ha_perfschema.cc
storage/perfschema/pfs.cc
storage/perfschema/pfs_column_types.h
storage/perfschema/pfs_column_values.cc
storage/perfschema/pfs_column_values.h
storage/perfschema/pfs_engine_table.cc
storage/perfschema/pfs_events_waits.cc
storage/perfschema/pfs_events_waits.h
storage/perfschema/pfs_instr.cc
storage/perfschema/pfs_instr.h
storage/perfschema/pfs_instr_class.cc
storage/perfschema/pfs_instr_class.h
storage/perfschema/pfs_server.cc
storage/perfschema/pfs_server.h
storage/perfschema/pfs_stat.h
storage/perfschema/pfs_timer.cc
storage/perfschema/pfs_timer.h
storage/perfschema/pfs_visitor.cc
storage/perfschema/pfs_visitor.h
storage/perfschema/table_events_waits.cc
storage/perfschema/table_events_waits.h
storage/perfschema/table_ews_by_thread_by_event_name.cc
storage/perfschema/table_ews_global_by_event_name.cc
storage/perfschema/table_helper.cc
storage/perfschema/table_helper.h
storage/perfschema/table_setup_consumers.cc
storage/perfschema/table_setup_instruments.cc
storage/perfschema/table_setup_instruments.h
storage/perfschema/table_setup_timers.cc
storage/perfschema/unittest/pfs-t.cc
storage/perfschema/unittest/pfs_instr-oom-t.cc
storage/perfschema/unittest/pfs_instr-t.cc
storage/perfschema/unittest/pfs_timer-t.cc
=== modified file 'include/decimal.h'
--- a/include/decimal.h 2007-05-24 10:24:36 +0000
+++ b/include/decimal.h 2011-03-03 14:25:41 +0000
@@ -29,14 +29,14 @@ typedef struct st_decimal_t {
int internal_str2dec(const char *from, decimal_t *to, char **end,
my_bool fixed);
-int decimal2string(decimal_t *from, char *to, int *to_len,
+int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals,
char filler);
int decimal2ulonglong(decimal_t *from, ulonglong *to);
int ulonglong2decimal(ulonglong from, decimal_t *to);
int decimal2longlong(decimal_t *from, longlong *to);
int longlong2decimal(longlong from, decimal_t *to);
-int decimal2double(decimal_t *from, double *to);
+int decimal2double(const decimal_t *from, double *to);
int double2decimal(double from, decimal_t *to);
int decimal_actual_fraction(decimal_t *from);
int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
@@ -47,17 +47,17 @@ int decimal_bin_size(int precision, int
int decimal_result_size(decimal_t *from1, decimal_t *from2, char op,
int param);
-int decimal_intg(decimal_t *from);
-int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to);
-int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to);
-int decimal_cmp(decimal_t *from1, decimal_t *from2);
-int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to);
-int decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to,
+int decimal_intg(const decimal_t *from);
+int decimal_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_cmp(const decimal_t *from1, const decimal_t *from2);
+int decimal_mul(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_div(const decimal_t *from1, const decimal_t *from2, decimal_t *to,
int scale_incr);
-int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to);
-int decimal_round(decimal_t *from, decimal_t *to, int new_scale,
+int decimal_mod(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_round(const decimal_t *from, decimal_t *to, int new_scale,
decimal_round_mode mode);
-int decimal_is_zero(decimal_t *from);
+int decimal_is_zero(const decimal_t *from);
void max_decimal(int precision, int frac, decimal_t *to);
#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
=== modified file 'mysql-test/r/func_math.result'
--- a/mysql-test/r/func_math.result 2011-01-14 15:36:19 +0000
+++ b/mysql-test/r/func_math.result 2011-03-18 12:25:56 +0000
@@ -656,3 +656,11 @@ Warning 1366 Incorrect decimal value: ''
SELECT 1 div null;
1 div null
NULL
+#
+# Bug #11792200 - DIVIDING LARGE NUMBERS CAUSES STACK CORRUPTIONS
+#
+select (1.175494351E-37 div 1.7976931348623157E+308);
+(1.175494351E-37 div 1.7976931348623157E+308)
+0
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
=== modified file 'mysql-test/r/grant.result'
--- a/mysql-test/r/grant.result 2011-03-17 11:33:17 +0000
+++ b/mysql-test/r/grant.result 2011-03-18 14:58:27 +0000
@@ -54,7 +54,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
@@ -125,7 +125,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
@@ -172,7 +172,7 @@ max_updates 20
max_connections 30
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30
@@ -284,7 +284,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc;
=== modified file 'mysql-test/r/grant2.result'
--- a/mysql-test/r/grant2.result 2010-08-09 08:32:50 +0000
+++ b/mysql-test/r/grant2.result 2011-03-18 14:16:17 +0000
@@ -287,7 +287,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%';
@@ -355,7 +354,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES;
=== modified file 'mysql-test/r/plugin_auth.result'
--- a/mysql-test/r/plugin_auth.result 2011-02-09 09:50:55 +0000
+++ b/mysql-test/r/plugin_auth.result 2011-03-18 14:58:27 +0000
@@ -345,4 +345,62 @@ select USER(),CURRENT_USER();
USER() CURRENT_USER()
uplain@localhost uplain@localhost
DROP USER uplain@localhost;
+#
+# Bug #59038 : mysql.user.authentication_string column
+# causes configuration wizard to fail
+INSERT INTO mysql.user(
+Host,
+User,
+Password,
+Select_priv,
+Insert_priv,
+Update_priv,
+Delete_priv,
+Create_priv,
+Drop_priv,
+Reload_priv,
+Shutdown_priv,
+Process_priv,
+File_priv,
+Grant_priv,
+References_priv,
+Index_priv,
+Alter_priv,
+Show_db_priv,
+Super_priv,
+Create_tmp_table_priv,
+Lock_tables_priv,
+Execute_priv,
+Repl_slave_priv,
+Repl_client_priv,
+/*!50001
+Create_view_priv,
+Show_view_priv,
+Create_routine_priv,
+Alter_routine_priv,
+Create_user_priv,
+*/
+ssl_type,
+ssl_cipher,
+x509_issuer,
+x509_subject,
+max_questions,
+max_updates,
+max_connections)
+VALUES (
+'localhost',
+'inserttest', '',
+'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
+'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
+/*!50001 'Y', 'Y', 'Y', 'Y', 'Y', */'', '', '', '', '0', '0', '0');
+FLUSH PRIVILEGES;
+DROP USER inserttest@localhost;
+SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
+COLUMN_NAME IN ('authentication_string', 'plugin') AND
+TABLE_NAME='user' AND
+TABLE_SCHEMA='mysql'
+ORDER BY COLUMN_NAME;
+IS_NULLABLE COLUMN_NAME
+YES authentication_string
+YES plugin
End of 5.5 tests
=== modified file 'mysql-test/r/plugin_auth_qa.result'
--- a/mysql-test/r/plugin_auth_qa.result 2010-10-20 14:56:09 +0000
+++ b/mysql-test/r/plugin_auth_qa.result 2011-03-18 14:16:17 +0000
@@ -105,7 +105,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plu
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
plug test_plugin_server plug_dest
-plug_dest
+plug_dest NULL
DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -115,7 +115,7 @@ DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plug_dest
+plug_dest NULL
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -125,7 +125,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plu
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
plug test_plugin_server plug_dest
-plug_dest
+plug_dest NULL
DROP USER plug, plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -135,7 +135,7 @@ DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plug_dest
+plug_dest NULL
DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -145,7 +145,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* T
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
plug test_plugin_server plug_dest
-plug_dest
+plug_dest NULL
DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -155,7 +155,7 @@ DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plug_dest
+plug_dest NULL
DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
@@ -210,7 +210,7 @@ DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plüg_dest
+plüg_dest NULL
DROP USER plüg_dest;
SET NAMES ascii;
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
@@ -221,7 +221,7 @@ DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-pl??g_dest
+pl??g_dest NULL
DROP USER 'plüg_dest';
SET NAMES latin1;
========== test 1.1.1.5 ====================================
@@ -235,7 +235,7 @@ DROP USER 'plug';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plüg_dest
+plüg_dest NULL
DROP USER 'plüg_dest';
SET NAMES utf8;
CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
@@ -248,7 +248,7 @@ DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plüg_dest
+plüg_dest NULL
DROP USER 'plüg_dest';
CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -258,7 +258,7 @@ DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plüg_dest
+plüg_dest NULL
DROP USER plüg_dest;
========== test 1.1.1.2/1.1.2.2=============================
SET @auth_name= 'test_plugin_server';
@@ -278,7 +278,7 @@ DROP USER plug;
CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-hh's_plug_dest
+hh's_plug_dest NULL
DROP USER 'hh''s_plug_dest';
========== test 1.1.1.4 ====================================
CREATE USER plug IDENTIFIED WITH hh''s_test_plugin_server AS 'plug_dest';
@@ -294,7 +294,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* T
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
grant_user test_plugin_server plug_dest
-plug_dest
+plug_dest NULL
DROP USER grant_user,plug_dest;
set @save_sql_mode= @@sql_mode;
SET @@sql_mode=no_auto_create_user;
@@ -315,13 +315,13 @@ CREATE USER plug_dest IDENTIFIED BY 'plu
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password
grant_user test_plugin_server plug_dest
-plug_dest *939AEE68989794C0F408277411C26055CDF41119
+plug_dest NULL *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password
grant_user test_plugin_server plug_dest
-plug_dest *560881EB651416CEF77314D07D55EDCD5FC1BD6D
+plug_dest NULL *560881EB651416CEF77314D07D55EDCD5FC1BD6D
DROP USER grant_user,plug_dest;
set @@sql_mode= @save_sql_mode;
DROP DATABASE test_user_db;
=== modified file 'mysql-test/r/plugin_auth_qa_1.result'
--- a/mysql-test/r/plugin_auth_qa_1.result 2011-02-08 17:48:20 +0000
+++ b/mysql-test/r/plugin_auth_qa_1.result 2011-03-18 14:58:27 +0000
@@ -21,7 +21,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* T
GRANT PROXY ON plug_dest TO plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plug_dest
+plug_dest NULL
plug_user test_plugin_server plug_dest
1)
current_user()
@@ -74,7 +74,7 @@ GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-new_dest
+new_dest NULL
plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest;
CREATE USER plug_user
@@ -92,7 +92,7 @@ GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-new_dest
+new_dest NULL
plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest;
CREATE USER plug_user
@@ -114,13 +114,13 @@ connection default;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
new_user test_plugin_server plug_dest
-plug_dest
+plug_dest NULL
disconnect plug_user;
UPDATE mysql.user SET user='plug_user' WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plug_dest
+plug_dest NULL
plug_user test_plugin_server plug_dest
DROP USER plug_dest,plug_user;
========== test 1.3 ========================================
@@ -136,26 +136,26 @@ connection default;
disconnect plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-plug_dest
+plug_dest NULL
plug_user test_plugin_server plug_dest
UPDATE mysql.user SET user='new_user' WHERE user='plug_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
new_user test_plugin_server plug_dest
-plug_dest
+plug_dest NULL
UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
new_user test_plugin_server new_dest
-plug_dest
+plug_dest NULL
UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
new_user new_plugin_server new_dest
-plug_dest
+plug_dest NULL
connect(plug_user,localhost,new_user,new_dest);
ERROR HY000: Plugin 'new_plugin_server' is not loaded
UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user';
@@ -164,7 +164,7 @@ FLUSH PRIVILEGES;
GRANT PROXY ON new_dest TO new_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-new_dest
+new_dest NULL
new_user test_plugin_server new_dest
connect(plug_user,localhost,new_user,new_dest);
select USER(),CURRENT_USER();
@@ -177,9 +177,9 @@ FLUSH PRIVILEGES;
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-new_dest
+new_dest NULL
new_user test_plugin_server new_dest
-plug_dest
+plug_dest NULL
GRANT ALL PRIVILEGES ON test.* TO new_user;
connect(plug_user,localhost,new_dest,new_dest_passwd);
select USER(),CURRENT_USER();
@@ -194,7 +194,7 @@ CREATE USER proxied_user IDENTIFIED BY '
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
test_plugin_server proxied_user
-proxied_user
+proxied_user NULL
connect(proxy_con,localhost,proxied_user,proxied_user_passwd);
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
@@ -231,7 +231,7 @@ CREATE USER proxied_user IDENTIFIED BY '
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
test_plugin_server proxied_user
-proxied_user
+proxied_user NULL
connect(proxy_con,localhost,proxied_user,proxied_user_passwd);
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
@@ -274,11 +274,11 @@ GRANT PROXY ON proxied_user_5 TO ''@'';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
test_plugin_server proxied_user
-proxied_user_1
-proxied_user_2
-proxied_user_3
-proxied_user_4
-proxied_user_5
+proxied_user_1 NULL
+proxied_user_2 NULL
+proxied_user_3 NULL
+proxied_user_4 NULL
+proxied_user_5 NULL
connect(proxy_con_1,localhost,proxied_user_1,'proxied_user_1_pwd');
connect(proxy_con_2,localhost,proxied_user_2,proxied_user_2_pwd);
connect(proxy_con_3,localhost,proxied_user_3,proxied_user_3_pwd);
=== modified file 'mysql-test/r/plugin_auth_qa_2.result'
--- a/mysql-test/r/plugin_auth_qa_2.result 2010-10-25 10:24:26 +0000
+++ b/mysql-test/r/plugin_auth_qa_2.result 2011-03-18 14:16:17 +0000
@@ -7,7 +7,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* T
GRANT PROXY ON qa_test_1_dest TO qa_test_1_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-qa_test_1_dest
+qa_test_1_dest NULL
qa_test_1_user qa_auth_interface qa_test_1_dest
SELECT @@proxy_user;
@@proxy_user
@@ -20,7 +20,7 @@ current_user() user() @@local.proxy_user
qa_test_1_user@% qa_test_1_user@localhost NULL NULL
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-qa_test_1_dest
+qa_test_1_dest NULL
qa_test_1_user qa_auth_interface qa_test_1_dest
DROP USER qa_test_1_user;
DROP USER qa_test_1_dest;
@@ -33,8 +33,8 @@ GRANT PROXY ON qa_test_2_dest TO qa_test
GRANT PROXY ON authenticated_as TO qa_test_2_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-authenticated_as
-qa_test_2_dest
+authenticated_as NULL
+qa_test_2_dest NULL
qa_test_2_user qa_auth_interface qa_test_2_dest
SELECT @@proxy_user;
@@proxy_user
@@ -47,8 +47,8 @@ current_user() user() @@local.proxy_user
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' 'qa_test_2_user'@'%'
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
-authenticated_as
-qa_test_2_dest
+authenticated_as NULL
+qa_test_2_dest NULL
qa_test_2_user qa_auth_interface qa_test_2_dest
DROP USER qa_test_2_user;
DROP USER qa_test_2_dest;
@@ -83,8 +83,8 @@ GRANT PROXY ON qa_test_5_dest TO qa_test
GRANT PROXY ON qa_test_5_dest TO ''@'localhost';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password
- *DFCACE76914AD7BD801FC1A1ECF6562272621A22
-qa_test_5_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+ NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+qa_test_5_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_5_user qa_auth_interface qa_test_5_dest
exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_5_user'@'localhost' (using password: YES)
@@ -98,7 +98,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* T
GRANT PROXY ON qa_test_6_dest TO qa_test_6_user;
SELECT user,plugin,authentication_string,password FROM mysql.user;
user plugin authentication_string password
-qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
root
root
@@ -109,7 +109,7 @@ ERROR 1045 (28000): Access denied for us
GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user;
user plugin authentication_string password
-qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
root
root
@@ -121,7 +121,7 @@ ERROR 1045 (28000): Access denied for us
REVOKE PROXY ON qa_test_6_dest FROM root;
SELECT user,plugin,authentication_string FROM mysql.user;
user plugin authentication_string
-qa_test_6_dest
+qa_test_6_dest NULL
qa_test_6_user qa_auth_interface qa_test_6_dest
root
root
=== modified file 'mysql-test/r/sp_notembedded.result'
--- a/mysql-test/r/sp_notembedded.result 2010-08-09 08:32:50 +0000
+++ b/mysql-test/r/sp_notembedded.result 2011-03-18 14:16:17 +0000
@@ -249,8 +249,6 @@ max_updates, max_connections, max_user_c
VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N',
'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '',
'', '', '', '0', '0', '0', '0');
-Warnings:
-Warning 1364 Field 'authentication_string' doesn't have a default value
FLUSH PRIVILEGES;
CREATE PROCEDURE p1(i INT) BEGIN END;
DROP PROCEDURE p1;
=== modified file 'mysql-test/r/system_mysql_db.result'
--- a/mysql-test/r/system_mysql_db.result 2011-03-14 18:43:19 +0000
+++ b/mysql-test/r/system_mysql_db.result 2011-03-18 14:58:27 +0000
@@ -122,8 +122,8 @@ user CREATE TABLE `user` (
`max_updates` int(11) unsigned NOT NULL DEFAULT '0',
`max_connections` int(11) unsigned NOT NULL DEFAULT '0',
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
- `plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
+ `plugin` char(64) COLLATE utf8_bin DEFAULT '',
+ `authentication_string` text COLLATE utf8_bin,
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
=== modified file 'mysql-test/suite/funcs_1/r/is_columns_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result 2011-03-14 18:43:19 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result 2011-03-18 14:58:27 +0000
@@ -214,7 +214,7 @@ def mysql time_zone_transition_type Time
def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
def mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
-def mysql user authentication_string 42 NULL NO text 65535 65535 NULL NULL utf8 utf8_bin text select,insert,update,references
+def mysql user authentication_string 42 NULL YES text 65535 65535 NULL NULL utf8 utf8_bin text select,insert,update,references
def mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Create_tablespace_priv 32 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
@@ -236,7 +236,7 @@ def mysql user max_questions 37 0 NO int
def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
def mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references
-def mysql user plugin 41 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
+def mysql user plugin 41 YES char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
def mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
=== modified file 'mysql-test/suite/funcs_1/r/is_user_privileges.result'
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result 2010-08-09 08:32:50 +0000
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result 2011-03-18 14:16:17 +0000
@@ -128,7 +128,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -170,7 +170,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -212,7 +212,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
#
# Add GRANT OPTION db_datadict.* to testuser1;
GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
@@ -278,7 +278,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -320,7 +320,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -362,7 +362,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -414,7 +414,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -456,7 +456,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -498,7 +498,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -572,7 +572,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -614,7 +614,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -656,7 +656,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
#
# Here <SELECT YES> is shown correctly for testuser1;
@@ -722,7 +722,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -764,7 +764,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -806,7 +806,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -858,7 +858,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -900,7 +900,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -942,7 +942,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
SHOW GRANTS;
Grants for testuser1@localhost
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION
@@ -1046,7 +1046,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -1088,7 +1088,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -1130,7 +1130,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1229,7 +1229,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -1271,7 +1271,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -1313,7 +1313,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1365,7 +1365,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -1407,7 +1407,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -1449,7 +1449,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -1508,7 +1508,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -1550,7 +1550,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -1592,7 +1592,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -1666,7 +1666,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser2
Password
@@ -1708,7 +1708,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
Host localhost
User testuser3
Password
@@ -1750,7 +1750,7 @@ max_updates 0
max_connections 0
max_user_connections 0
plugin
-authentication_string
+authentication_string NULL
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
=== modified file 'mysql-test/suite/rpl/r/rpl_checksum_cache.result'
--- a/mysql-test/suite/rpl/r/rpl_checksum_cache.result 2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_checksum_cache.result 2011-03-18 13:11:47 +0000
@@ -2,7 +2,7 @@ include/master-slave.inc
[connection master]
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
-call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion");
+call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
set @save_binlog_cache_size = @@global.binlog_cache_size;
set @save_binlog_checksum = @@global.binlog_checksum;
set @save_master_verify_checksum = @@global.master_verify_checksum;
=== modified file 'mysql-test/suite/rpl/r/rpl_ignore_table.result'
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result 2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result 2011-03-18 14:58:27 +0000
@@ -30,7 +30,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
GRANT SELECT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON test.* TO mysqltest6@localhost;
=== modified file 'mysql-test/suite/rpl/r/rpl_stm_000001.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_000001.result 2011-02-22 07:52:45 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result 2011-03-18 14:58:27 +0000
@@ -63,7 +63,6 @@ Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
select select_priv,user from mysql.user where user = _binary'blafasel2';
select_priv user
N blafasel2
=== modified file 'mysql-test/suite/rpl/t/rpl_checksum_cache.test'
--- a/mysql-test/suite/rpl/t/rpl_checksum_cache.test 2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/t/rpl_checksum_cache.test 2011-03-18 13:11:47 +0000
@@ -4,7 +4,7 @@
--disable_warnings
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
-call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion");
+call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
--enable_warnings
connection master;
=== modified file 'mysql-test/t/func_math.test'
--- a/mysql-test/t/func_math.test 2011-01-14 15:36:19 +0000
+++ b/mysql-test/t/func_math.test 2011-03-18 12:25:56 +0000
@@ -500,3 +500,8 @@ SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_f
--echo # Bug #59498 div function broken in mysql-trunk
--echo #
SELECT 1 div null;
+
+--echo #
+--echo # Bug #11792200 - DIVIDING LARGE NUMBERS CAUSES STACK CORRUPTIONS
+--echo #
+select (1.175494351E-37 div 1.7976931348623157E+308);
=== modified file 'mysql-test/t/plugin_auth.test'
--- a/mysql-test/t/plugin_auth.test 2011-02-08 17:48:20 +0000
+++ b/mysql-test/t/plugin_auth.test 2011-03-18 14:58:27 +0000
@@ -434,4 +434,61 @@ connection default;
disconnect cleartext_con;
DROP USER uplain@localhost;
+--echo #
+--echo # Bug #59038 : mysql.user.authentication_string column
+--echo # causes configuration wizard to fail
+
+INSERT INTO mysql.user(
+ Host,
+ User,
+ Password,
+ Select_priv,
+ Insert_priv,
+ Update_priv,
+ Delete_priv,
+ Create_priv,
+ Drop_priv,
+ Reload_priv,
+ Shutdown_priv,
+ Process_priv,
+ File_priv,
+ Grant_priv,
+ References_priv,
+ Index_priv,
+ Alter_priv,
+ Show_db_priv,
+ Super_priv,
+ Create_tmp_table_priv,
+ Lock_tables_priv,
+ Execute_priv,
+ Repl_slave_priv,
+ Repl_client_priv,
+ /*!50001
+ Create_view_priv,
+ Show_view_priv,
+ Create_routine_priv,
+ Alter_routine_priv,
+ Create_user_priv,
+ */
+ ssl_type,
+ ssl_cipher,
+ x509_issuer,
+ x509_subject,
+ max_questions,
+ max_updates,
+ max_connections)
+VALUES (
+ 'localhost',
+ 'inserttest', '',
+ 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
+ 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
+ /*!50001 'Y', 'Y', 'Y', 'Y', 'Y', */'', '', '', '', '0', '0', '0');
+FLUSH PRIVILEGES;
+DROP USER inserttest@localhost;
+SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
+ COLUMN_NAME IN ('authentication_string', 'plugin') AND
+ TABLE_NAME='user' AND
+ TABLE_SCHEMA='mysql'
+ORDER BY COLUMN_NAME;
+
--echo End of 5.5 tests
=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql 2011-03-17 17:39:31 +0000
+++ b/scripts/mysql_system_tables.sql 2011-03-18 22:51:17 +0000
@@ -28,7 +28,7 @@ set @had_db_table= @@warning_count != 0;
CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
-CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, plugin char(64) DEFAULT '' NOT NULL, authentication_string TEXT NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, plugin char(64) DEFAULT '', authentication_string TEXT, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
-- Remember for later if user table already existed
set @had_user_table= @@warning_count != 0;
=== modified file 'scripts/mysql_system_tables_fix.sql'
--- a/scripts/mysql_system_tables_fix.sql 2011-03-14 18:43:19 +0000
+++ b/scripts/mysql_system_tables_fix.sql 2011-03-18 14:58:27 +0000
@@ -642,8 +642,8 @@ DROP PREPARE stmt;
drop procedure mysql.die;
-ALTER TABLE user ADD plugin char(64) DEFAULT '' NOT NULL, ADD authentication_string TEXT NOT NULL;
-ALTER TABLE user MODIFY plugin char(64) DEFAULT '' NOT NULL;
+ALTER TABLE user ADD plugin char(64) DEFAULT '', ADD authentication_string TEXT;
+ALTER TABLE user MODIFY plugin char(64) DEFAULT '';
-- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from
-- older versions
=== modified file 'sql/my_decimal.h'
--- a/sql/my_decimal.h 2011-03-09 20:54:55 +0000
+++ b/sql/my_decimal.h 2011-03-18 12:25:56 +0000
@@ -178,7 +178,7 @@ void max_my_decimal(my_decimal *to, int
{
DBUG_ASSERT((precision <= DECIMAL_MAX_PRECISION)&&
(frac <= DECIMAL_MAX_SCALE));
- max_decimal(precision, frac, (decimal_t*) to);
+ max_decimal(precision, frac, to);
}
inline void max_internal_decimal(my_decimal *to)
@@ -277,14 +277,19 @@ inline
int binary2my_decimal(uint mask, const uchar *bin, my_decimal *d, int prec,
int scale)
{
- return check_result(mask, bin2decimal(bin, (decimal_t*) d, prec, scale));
+ return check_result(mask, bin2decimal(bin, d, prec, scale));
}
inline
int my_decimal_set_zero(my_decimal *d)
{
- decimal_make_zero(((decimal_t*) d));
+ /*
+ We need the up-cast here, since my_decimal has sign() member functions,
+ which conflicts with decimal_t::size
+ (and decimal_make_zero is a macro, rather than a funcion).
+ */
+ decimal_make_zero(static_cast<decimal_t*>(d));
return 0;
}
@@ -292,7 +297,7 @@ int my_decimal_set_zero(my_decimal *d)
inline
bool my_decimal_is_zero(const my_decimal *decimal_value)
{
- return decimal_is_zero((decimal_t*) decimal_value);
+ return decimal_is_zero(decimal_value);
}
@@ -300,7 +305,7 @@ inline
int my_decimal_round(uint mask, const my_decimal *from, int scale,
bool truncate, my_decimal *to)
{
- return check_result(mask, decimal_round((decimal_t*) from, to, scale,
+ return check_result(mask, decimal_round(from, to, scale,
(truncate ? TRUNCATE : HALF_UP)));
}
@@ -308,14 +313,14 @@ int my_decimal_round(uint mask, const my
inline
int my_decimal_floor(uint mask, const my_decimal *from, my_decimal *to)
{
- return check_result(mask, decimal_round((decimal_t*) from, to, 0, FLOOR));
+ return check_result(mask, decimal_round(from, to, 0, FLOOR));
}
inline
int my_decimal_ceiling(uint mask, const my_decimal *from, my_decimal *to)
{
- return check_result(mask, decimal_round((decimal_t*) from, to, 0, CEILING));
+ return check_result(mask, decimal_round(from, to, 0, CEILING));
}
@@ -337,7 +342,7 @@ int my_decimal2int(uint mask, const my_d
{
my_decimal rounded;
/* decimal_round can return only E_DEC_TRUNCATED */
- decimal_round((decimal_t*)d, &rounded, 0, HALF_UP);
+ decimal_round(d, &rounded, 0, HALF_UP);
return check_result(mask, (unsigned_flag ?
decimal2ulonglong(&rounded, (ulonglong *)l) :
decimal2longlong(&rounded, l)));
@@ -348,15 +353,14 @@ inline
int my_decimal2double(uint, const my_decimal *d, double *result)
{
/* No need to call check_result as this will always succeed */
- return decimal2double((decimal_t*) d, result);
+ return decimal2double(d, result);
}
inline
int str2my_decimal(uint mask, const char *str, my_decimal *d, char **end)
{
- return check_result_and_overflow(mask, string2decimal(str,(decimal_t*)d,end),
- d);
+ return check_result_and_overflow(mask, string2decimal(str, d, end), d);
}
@@ -379,7 +383,7 @@ my_decimal *date2my_decimal(MYSQL_TIME *
inline
int double2my_decimal(uint mask, double val, my_decimal *d)
{
- return check_result_and_overflow(mask, double2decimal(val, (decimal_t*)d), d);
+ return check_result_and_overflow(mask, double2decimal(val, d), d);
}
@@ -409,7 +413,7 @@ int my_decimal_add(uint mask, my_decimal
const my_decimal *b)
{
return check_result_and_overflow(mask,
- decimal_add((decimal_t*)a,(decimal_t*)b,res),
+ decimal_add(a, b, res),
res);
}
@@ -419,7 +423,7 @@ int my_decimal_sub(uint mask, my_decimal
const my_decimal *b)
{
return check_result_and_overflow(mask,
- decimal_sub((decimal_t*)a,(decimal_t*)b,res),
+ decimal_sub(a, b, res),
res);
}
@@ -429,7 +433,7 @@ int my_decimal_mul(uint mask, my_decimal
const my_decimal *b)
{
return check_result_and_overflow(mask,
- decimal_mul((decimal_t*)a,(decimal_t*)b,res),
+ decimal_mul(a, b, res),
res);
}
@@ -439,8 +443,7 @@ int my_decimal_div(uint mask, my_decimal
const my_decimal *b, int div_scale_inc)
{
return check_result_and_overflow(mask,
- decimal_div((decimal_t*)a,(decimal_t*)b,res,
- div_scale_inc),
+ decimal_div(a, b, res, div_scale_inc),
res);
}
@@ -450,7 +453,7 @@ int my_decimal_mod(uint mask, my_decimal
const my_decimal *b)
{
return check_result_and_overflow(mask,
- decimal_mod((decimal_t*)a,(decimal_t*)b,res),
+ decimal_mod(a, b, res),
res);
}
@@ -462,14 +465,14 @@ int my_decimal_mod(uint mask, my_decimal
inline
int my_decimal_cmp(const my_decimal *a, const my_decimal *b)
{
- return decimal_cmp((decimal_t*) a, (decimal_t*) b);
+ return decimal_cmp(a, b);
}
inline
int my_decimal_intg(const my_decimal *a)
{
- return decimal_intg((decimal_t*) a);
+ return decimal_intg(a);
}
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2011-03-17 17:39:31 +0000
+++ b/sql/mysqld.cc 2011-03-18 22:51:17 +0000
@@ -2329,7 +2329,7 @@ LONG WINAPI my_unhandler_exception_filte
}
-static void init_signals(void)
+void my_init_signals(void)
{
if(opt_console)
SetConsoleCtrlHandler(console_event_handler,TRUE);
@@ -2550,11 +2550,11 @@ bugs.\n");
#ifndef EMBEDDED_LIBRARY
-static void init_signals(void)
+void my_init_signals(void)
{
sigset_t set;
struct sigaction sa;
- DBUG_ENTER("init_signals");
+ DBUG_ENTER("my_init_signals");
my_sigset(THR_SERVER_ALARM,print_signal_warning); // Should never be called!
@@ -4711,7 +4711,7 @@ int mysqld_main(int argc, char **argv)
if (init_common_variables())
unireg_abort(1); // Will do exit
- init_signals();
+ my_init_signals();
#if defined(__ia64__) || defined(__ia64)
/*
Peculiar things with ia64 platforms - it seems we only have half the
=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h 2011-03-17 17:39:31 +0000
+++ b/sql/mysqld.h 2011-03-18 22:51:17 +0000
@@ -77,6 +77,7 @@ bool is_secure_file_path(char *path);
// These are needed for unit testing.
void set_remaining_args(int argc, char **argv);
int init_common_variables();
+void my_init_signals();
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *system_charset_info;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *files_charset_info ;
=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc 2011-03-17 11:33:17 +0000
+++ b/sql/sql_acl.cc 2011-03-18 14:58:27 +0000
@@ -2402,8 +2402,10 @@ static int replace_user_table(THD *thd,
{
table->field[next_field]->store(combo.plugin.str, combo.plugin.length,
system_charset_info);
+ table->field[next_field]->set_notnull();
table->field[next_field + 1]->store(combo.auth.str, combo.auth.length,
system_charset_info);
+ table->field[next_field + 1]->set_notnull();
}
else
{
=== modified file 'strings/decimal.c'
--- a/strings/decimal.c 2011-01-19 13:31:17 +0000
+++ b/strings/decimal.c 2011-03-03 14:25:41 +0000
@@ -248,7 +248,7 @@ void max_decimal(int precision, int frac
}
-static dec1 *remove_leading_zeroes(decimal_t *from, int *intg_result)
+static dec1 *remove_leading_zeroes(const decimal_t *from, int *intg_result)
{
int intg= from->intg, i;
dec1 *buf0= from->buf;
@@ -326,7 +326,7 @@ int decimal_actual_fraction(decimal_t *f
E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW
*/
-int decimal2string(decimal_t *from, char *to, int *to_len,
+int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals,
char filler)
{
@@ -942,7 +942,7 @@ fatal_error:
E_DEC_OK/E_DEC_OVERFLOW/E_DEC_TRUNCATED
*/
-int decimal2double(decimal_t *from, double *to)
+int decimal2double(const decimal_t *from, double *to)
{
char strbuf[FLOATING_POINT_BUFFER], *end;
int len= sizeof(strbuf);
@@ -1461,7 +1461,7 @@ int decimal_bin_size(int precision, int
*/
int
-decimal_round(decimal_t *from, decimal_t *to, int scale,
+decimal_round(const decimal_t *from, decimal_t *to, int scale,
decimal_round_mode mode)
{
int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1,
@@ -1695,7 +1695,7 @@ int decimal_result_size(decimal_t *from1
return -1; /* shut up the warning */
}
-static int do_add(decimal_t *from1, decimal_t *from2, decimal_t *to)
+static int do_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{
int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg),
frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac),
@@ -1777,7 +1777,7 @@ static int do_add(decimal_t *from1, deci
/* to=from1-from2.
if to==0, return -1/0/+1 - the result of the comparison */
-static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
+static int do_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{
int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg),
frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac);
@@ -1846,7 +1846,7 @@ static int do_sub(decimal_t *from1, deci
/* ensure that always from1 > from2 (and intg1 >= intg2) */
if (carry)
{
- swap_variables(decimal_t *,from1,from1);
+ swap_variables(const decimal_t *, from1, from2);
swap_variables(dec1 *,start1, start2);
swap_variables(int,intg1,intg2);
swap_variables(int,frac1,frac2);
@@ -1912,35 +1912,35 @@ static int do_sub(decimal_t *from1, deci
return error;
}
-int decimal_intg(decimal_t *from)
+int decimal_intg(const decimal_t *from)
{
int res;
remove_leading_zeroes(from, &res);
return res;
}
-int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to)
+int decimal_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{
if (likely(from1->sign == from2->sign))
return do_add(from1, from2, to);
return do_sub(from1, from2, to);
}
-int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
+int decimal_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{
if (likely(from1->sign == from2->sign))
return do_sub(from1, from2, to);
return do_add(from1, from2, to);
}
-int decimal_cmp(decimal_t *from1, decimal_t *from2)
+int decimal_cmp(const decimal_t *from1, const decimal_t *from2)
{
if (likely(from1->sign == from2->sign))
return do_sub(from1, from2, 0);
return from1->sign > from2->sign ? -1 : 1;
}
-int decimal_is_zero(decimal_t *from)
+int decimal_is_zero(const decimal_t *from)
{
dec1 *buf1=from->buf,
*end=buf1+ROUND_UP(from->intg)+ROUND_UP(from->frac);
@@ -1971,7 +1971,7 @@ int decimal_is_zero(decimal_t *from)
XXX if this library is to be used with huge numbers of thousands of
digits, fast multiplication must be implemented.
*/
-int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to)
+int decimal_mul(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{
int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg),
frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac),
@@ -2095,8 +2095,8 @@ int decimal_mul(decimal_t *from1, decima
changed to malloc (or at least fallback to malloc if alloca() fails)
but then, decimal_mul() should be rewritten too :(
*/
-static int do_div_mod(decimal_t *from1, decimal_t *from2,
- decimal_t *to, decimal_t *mod, int scale_incr)
+static int do_div_mod(const decimal_t *from1, const decimal_t *from2,
+ decimal_t *to, decimal_t *mod, int scale_incr)
{
int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1,
frac2=ROUND_UP(from2->frac)*DIG_PER_DEC1, prec2=from2->intg+frac2,
@@ -2181,9 +2181,12 @@ static int do_div_mod(decimal_t *from1,
}
buf0=to->buf;
stop0=buf0+intg0+frac0;
+ DBUG_ASSERT(stop0 <= &to->buf[to->len]);
if (likely(div_mod))
- while (dintg++ < 0)
+ while (dintg++ < 0 && buf0 < &to->buf[to->len])
+ {
*buf0++=0;
+ }
len1=(i=ROUND_UP(prec1))+ROUND_UP(2*frac2+scale_incr+1) + 1;
set_if_bigger(len1, 3);
@@ -2355,7 +2358,8 @@ done:
*/
int
-decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to, int scale_incr)
+decimal_div(const decimal_t *from1, const decimal_t *from2, decimal_t *to,
+ int scale_incr)
{
return do_div_mod(from1, from2, to, 0, scale_incr);
}
@@ -2387,7 +2391,7 @@ decimal_div(decimal_t *from1, decimal_t
thus, there's no requirement for M or N to be integers
*/
-int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to)
+int decimal_mod(const decimal_t *from1, const decimal_t *from2, decimal_t *to)
{
return do_div_mod(from1, from2, 0, to, 0);
}
=== modified file 'unittest/gunit/item-t.cc'
--- a/unittest/gunit/item-t.cc 2011-02-21 10:36:31 +0000
+++ b/unittest/gunit/item-t.cc 2011-03-18 12:25:56 +0000
@@ -24,6 +24,59 @@
namespace {
+/*
+ A mock error handler for error_handler_hook.
+*/
+uint expected_error= 0;
+extern "C" void test_error_handler_hook(uint err, const char *str, myf MyFlags)
+{
+ EXPECT_EQ(expected_error, err) << str;
+}
+
+
+/**
+ A mock error handler which registers itself with the THD in the CTOR,
+ and unregisters in the DTOR. The function handle_condition() will
+ verify that it is called with the expected error number.
+ The DTOR will verify that handle_condition() has actually been called.
+*/
+class Mock_error_handler : public Internal_error_handler
+{
+public:
+ Mock_error_handler(THD *thd, uint expected_error)
+ : m_thd(thd),
+ m_expected_error(expected_error),
+ m_handle_called(0)
+ {
+ thd->push_internal_handler(this);
+ }
+
+ virtual ~Mock_error_handler()
+ {
+ // Strange Visual Studio bug: have to store 'this' in local variable.
+ Internal_error_handler *me= this;
+ EXPECT_EQ(me, m_thd->pop_internal_handler());
+ EXPECT_GE(m_handle_called, 0);
+ }
+
+ virtual bool handle_condition(THD *thd,
+ uint sql_errno,
+ const char* sqlstate,
+ MYSQL_ERROR::enum_warning_level level,
+ const char* msg,
+ MYSQL_ERROR ** cond_hdl)
+ {
+ EXPECT_EQ(sql_errno, m_expected_error);
+ ++m_handle_called;
+ return true;
+ }
+private:
+ THD *m_thd;
+ uint m_expected_error;
+ int m_handle_called;
+};
+
+
class ItemTest : public ::testing::Test
{
protected:
@@ -39,9 +92,11 @@ protected:
char *argv[] = { my_name, 0 };
set_remaining_args(1, argv);
init_common_variables();
+ my_init_signals();
randominit(&sql_rand, 0, 0);
xid_cache_init();
delegates_init();
+ error_handler_hook= test_error_handler_hook;
}
static void TearDownTestCase()
@@ -54,10 +109,12 @@ protected:
virtual void SetUp()
{
+ expected_error= 0;
m_thd= new THD(false);
THD *stack_thd= m_thd;
m_thd->thread_stack= (char*) &stack_thd;
m_thd->store_globals();
+ lex_start(m_thd);
}
virtual void TearDown()
@@ -66,7 +123,7 @@ protected:
delete m_thd;
}
- THD *m_thd;
+ THD *m_thd;
};
@@ -189,6 +246,38 @@ TEST_F(ItemTest, ItemFuncDesDecrypt)
}
+TEST_F(ItemTest, ItemFuncIntDivOverflow)
+{
+ const char dividend_str[]=
+ "99999999999999999999999999999999999999999"
+ "99999999999999999999999999999999999999999";
+ const char divisor_str[]= "0.5";
+ Item_float *dividend= new Item_float(dividend_str, sizeof(dividend_str));
+ Item_float *divisor= new Item_float(divisor_str, sizeof(divisor_str));
+ Item_func_int_div* quotient= new Item_func_int_div(dividend, divisor);
+
+ Mock_error_handler error_handler(m_thd, ER_TRUNCATED_WRONG_VALUE);
+ EXPECT_FALSE(quotient->fix_fields(m_thd, NULL));
+ expected_error= ER_DATA_OUT_OF_RANGE;
+ quotient->val_int();
+}
+
+
+TEST_F(ItemTest, ItemFuncIntDivUnderflow)
+{
+ // Bug #11792200 - DIVIDING LARGE NUMBERS CAUSES STACK CORRUPTIONS
+ const char dividend_str[]= "1.175494351E-37";
+ const char divisor_str[]= "1.7976931348623157E+308";
+ Item_float *dividend= new Item_float(dividend_str, sizeof(dividend_str));
+ Item_float *divisor= new Item_float(divisor_str, sizeof(divisor_str));
+ Item_func_int_div* quotient= new Item_func_int_div(dividend, divisor);
+
+ Mock_error_handler error_handler(m_thd, ER_TRUNCATED_WRONG_VALUE);
+ EXPECT_FALSE(quotient->fix_fields(m_thd, NULL));
+ EXPECT_EQ(0, quotient->val_int());
+}
+
+
/*
This is not an exhaustive test. It simply demonstrates that more of the
initializations in mysqld.cc are needed for testing Item_xxx classes.
No bundle (reason: useless for push emails).| Thread |
|---|
| • bzr push into mysql-trunk branch (marc.alff:3608 to 3609) | Marc Alff | 18 Mar |