Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
When a binary log event is written as a result of DDL recovery, it does not set a default database, so if an object name is not fully-qualified, the object cannot be found upon executing such an event.
Example of an event:
bb-10.6-monty 387d673e + "fake" patch |
# at 384
|
#700101 0:00:00 server id 1 end_log_pos 672 CRC32 0x0d19d9fa Query thread_id=0 exec_time=1620238373 error_code=0
|
SET TIMESTAMP=0/*!*/;
|
SET @@session.pseudo_thread_id=0/*!*/;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
|
SET @@session.sql_mode=1411383296/*!*/;
|
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
/*!\C latin1 *//*!*/;
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
SET @@session.lc_time_names=0/*!*/;
|
SET @@session.collation_database=DEFAULT/*!*/;
|
ALTER /* QNO 475 CON_ID 36 */ TABLE t3 CHANGE COLUMN IF EXISTS scol8 `c2` BIGINT UNSIGNED DEFAULT 0, LOCK=SHARED, ADD COLUMN IF NOT EXISTS icol5 INT UNSIGNED NULL DEFAULT 0, ALGORITHM=COPY, LOCK=SHARED, ENGINE=InnoDB
|
/*!*/;
|
DELIMITER ;
|
# End of log file
|
ROLLBACK /* added by mysqlbinlog */;
|
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
|
Error on slave:
2021-05-05 18:13:04 6 [ERROR] Slave SQL: Error 'Table '.t3' doesn't exist' on query. Default database: ''. Query: 'ALTER /* QNO 475 CON_ID 36 */ TABLE t3 CHANGE COLUMN IF EXISTS scol8 `c2` BIGINT UNSIGNED DEFAULT 0, LOCK=SHARED, ADD COLUMN IF NOT EXISTS icol5 INT UNSIGNED NULL DEFAULT 0, ALGORITHM=COPY, LOCK=SHARED, ENGINE=InnoDB', Gtid 0-1-1439, Internal MariaDB error code: 1146
|
2021-05-05 18:13:04 6 [Warning] Slave: Table '.t3' doesn't exist Error_code: 1146
|
Attachments
Issue Links
- relates to
-
MDEV-17567 Atomic DDL
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link | This issue relates to TODO-2694 [ TODO-2694 ] |
Description |
When a binary log event is written as a result of DDL recovery, it does not set a default database, so if an object name is not fully-qualified, the object cannot be found upon executing such an event.
Example of an event: {noformat|title=bb-10.6-monty 387d673e + "fake" patch} # at 384 #700101 0:00:00 server id 1 end_log_pos 672 CRC32 0x0d19d9fa Query thread_id=0 exec_time=1620238373 error_code=0 SET TIMESTAMP=0/*!*/; SET @@session.pseudo_thread_id=0/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/; SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; ALTER /* QNO 475 CON_ID 36 */ TABLE t3 CHANGE COLUMN IF EXISTS scol8 `c2` BIGINT UNSIGNED DEFAULT 0, LOCK=SHARED, ADD COLUMN IF NOT EXISTS icol5 INT UNSIGNED NULL DEFAULT 0, ALGORITHM=COPY, LOCK=SHARED, ENGINE=InnoDB /*!*/; DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; {noformat} Error on slave: {noformat} 2021-05-05 18:13:04 6 [ERROR] Slave SQL: Error 'Table '.t3' doesn't exist' on query. Default database: ''. Query: 'ALTER /* QNO 475 CON_ID 36 */ TABLE t3 CHANGE COLUMN IF EXISTS scol8 `c2` BIGINT UNSIGNED DEFAULT 0, LOCK=SHARED, ADD COLUMN IF NOT EXISTS icol5 INT UNSIGNED NULL DEFAULT 0, ALGORITHM=COPY, LOCK=SHARED, ENGINE=InnoDB', Gtid 0-1-1439, Internal MariaDB error code: 1146 2021-05-05 18:13:04 6 [Warning] Slave: Table '.t3' doesn't exist Error_code: 1146 {noformat} |
When a binary log event is written as a result of DDL recovery, it does not set a default database, so if an object name is not fully-qualified, the object cannot be found upon executing such an event.
Example of an event: {noformat:title=bb-10.6-monty 387d673e + "fake" patch} # at 384 #700101 0:00:00 server id 1 end_log_pos 672 CRC32 0x0d19d9fa Query thread_id=0 exec_time=1620238373 error_code=0 SET TIMESTAMP=0/*!*/; SET @@session.pseudo_thread_id=0/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/; SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; ALTER /* QNO 475 CON_ID 36 */ TABLE t3 CHANGE COLUMN IF EXISTS scol8 `c2` BIGINT UNSIGNED DEFAULT 0, LOCK=SHARED, ADD COLUMN IF NOT EXISTS icol5 INT UNSIGNED NULL DEFAULT 0, ALGORITHM=COPY, LOCK=SHARED, ENGINE=InnoDB /*!*/; DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; {noformat} Error on slave: {noformat} 2021-05-05 18:13:04 6 [ERROR] Slave SQL: Error 'Table '.t3' doesn't exist' on query. Default database: ''. Query: 'ALTER /* QNO 475 CON_ID 36 */ TABLE t3 CHANGE COLUMN IF EXISTS scol8 `c2` BIGINT UNSIGNED DEFAULT 0, LOCK=SHARED, ADD COLUMN IF NOT EXISTS icol5 INT UNSIGNED NULL DEFAULT 0, ALGORITHM=COPY, LOCK=SHARED, ENGINE=InnoDB', Gtid 0-1-1439, Internal MariaDB error code: 1146 2021-05-05 18:13:04 6 [Warning] Slave: Table '.t3' doesn't exist Error_code: 1146 {noformat} |
Link |
This issue relates to |
Priority | Major [ 3 ] | Critical [ 2 ] |
issue.field.resolutiondate | 2021-05-10 11:00:27.0 | 2021-05-10 11:00:27.184 |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 121635 ] | MariaDB v4 [ 159242 ] |
Fixed in orginal commit in bb-10.6-monty