Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
5.5.41
-
None
-
CentOS Linux release 7.1.1503 (Core)
Description
We ran into a problem with replication on slaves after importing a dumpfile on master. Before the following begins replication works fine.
After importing the dumpfile replication always failed afterwards with this error:
Last_SQL_Error: Query caused different errors on master and slave. Error on master: message (format)='Table '%-.192s.%-.192s' doesn't exist' error code=1146 ; Error on slave: actual message='no error', error code=0. Default database: 'mysql'. Query: '/*!40000 DROP DATABASE IF EXISTS `mysql`*/'
|
Skipping the error does no good, it just produces error on the next position. The dumpfile up to that point is pretty short, so I'll paste it here:
SET @prerunGlobalLogSlowQueries = @@log_slow_queries;
|
SET GLOBAL log_slow_queries = 0;
|
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
|
--
|
-- Host: localhost Database:
|
-- ------------------------------------------------------
|
-- Server version 5.1.73
|
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
/*!40101 SET NAMES utf8 */;
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
--
|
-- Current Database: `mysql`
|
--
|
|
/*!40000 DROP DATABASE IF EXISTS `mysql`*/;
|
I fixed the replication (by dumping with --master-data and importing on slaves) then started again with the above portion of the dumpfile without its last line (the mysql DROP). That works fine. I then stopped replication and executed the missing line manually on the master and the slaves.
I get this on both:
MariaDB [(none)]> show warnings;
|
+-------+------+-----------------------------------+
|
| Level | Code | Message |
|
+-------+------+-----------------------------------+
|
| Error | 1146 | Table 'mysql.proc' doesn't exist |
|
| Error | 1146 | Table 'mysql.event' doesn't exist |
|
+-------+------+-----------------------------------+
|
2 rows in set (0.00 sec)
|
In other words, the exact same thing done separately on master/slaves works when replication is off, but when I execute it only on the master with replication turned on it does not.
It looks like a bug unless I'm missing something. Thanks for reading!
- John.
Attachments
Issue Links
- duplicates
-
MDEV-4992 'DROP DATABASE IF EXISTS' causes replication to break (does not break in MySQL)
- Open