Description:
ndb_rpl.ndb_rpl_dist_priv w5 [ fail ]
Test ended at 2016-11-03 11:44:50 CURRENT_TEST: ndb_rpl.ndb_rpl_dist_priv === SHOW MASTER STATUS === ---- 1. ---- File slave-bin.000001 Position 37499 Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set ========================== === SHOW SLAVE STATUS === ---- 1. ---- Slave_IO_State Waiting for master to send event Master_Host 127.0.0.1 Master_User root Master_Port 18042 Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 42072 Relay_Log_File slave-relay-bin.000002 Relay_Log_Pos 37899 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1292 Last_Error Error 'Incorrect datetime value: '0000-00-00 00:00:00' for column 'Timestamp' at row 1' on query. Default database: 'mysql'. Query: 'insert into mysql.tables_priv_backup select * from mysql.tables_priv'
How to repeat:
Failing sporadically on Solaris
Suggested fix:
In fix for
Bug #24430209 MYSQL CLUSTER DISTRIBUTED PRIVILEGES VALIDATION FAILS
proxies_priv table was updated to not contain illegal timestamp values.
The same should be done for tables_priv, columns_priv and procs_priv.
diff --git a/storage/ndb/tools/ndb_dist_priv.sql b/storage/ndb/tools/ndb_dist_priv.sql
index 6569cea..7ab65c1 100644
--- a/storage/ndb/tools/ndb_dist_priv.sql
+++ b/storage/ndb/tools/ndb_dist_priv.sql
@@ -69,10 +69,19 @@ begin
like mysql.user;
create table if not exists mysql.db_backup
like mysql.db;
+ -- Remove possibly illegal timestamps in mysql.tables_priv
+ update mysql.tables_priv set Timestamp = current_timestamp
+ where Timestamp = timestamp(0);
create table if not exists mysql.tables_priv_backup
like mysql.tables_priv;
+ -- Remove possibly illegal timestamps in mysql.columns_priv
+ update mysql.columns_priv set Timestamp = current_timestamp
+ where Timestamp = timestamp(0);
create table if not exists mysql.columns_priv_backup
like mysql.columns_priv;
+ -- Remove possibly illegal timestamps in mysql.procs_priv
+ update mysql.procs_priv set Timestamp = current_timestamp
+ where Timestamp = timestamp(0);
create table if not exists mysql.procs_priv_backup
like mysql.procs_priv;
-- Remove possibly illegal timestamps in mysql.proxies_priv
@@ -247,8 +256,17 @@ begin
declare exit handler for sqlexception set revert = 1;
alter table mysql.user algorithm = copy, engine = ndb;
alter table mysql.db algorithm = copy, engine = ndb;
+ -- Remove possibly illegal timestamps in mysql.tables_priv
+ update mysql.tables_priv set Timestamp = current_timestamp
+ where Timestamp = timestamp(0);
alter table mysql.tables_priv algorithm = copy, engine = ndb;
+ -- Remove possibly illegal timestamps in mysql.columns_priv
+ update mysql.columns_priv set Timestamp = current_timestamp
+ where Timestamp = timestamp(0);
alter table mysql.columns_priv algorithm = copy, engine = ndb;
+ -- Remove possibly illegal timestamps in mysql.procs_priv
+ update mysql.procs_priv set Timestamp = current_timestamp
+ where Timestamp = timestamp(0);
alter table mysql.procs_priv algorithm = copy, engine = ndb;
-- Remove possibly illegal timestamps in mysql.proxies_priv
update mysql.proxies_priv set Timestamp = current_timestamp