[MDEV-8732] Error with replication on slaves after dumpfile data import on master Created: 2015-09-02  Updated: 2020-02-13  Resolved: 2020-02-13

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 5.5.41
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: John Margaritsanakis Assignee: Andrei Elkin
Resolution: Duplicate Votes: 0
Labels: None
Environment:

CentOS Linux release 7.1.1503 (Core)


Issue Links:
Duplicate
duplicates MDEV-4992 'DROP DATABASE IF EXISTS' causes repl... Open

 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.


 Comments   
Comment by Elena Stepanova [ 2019-04-06 ]

Elkin,
this is a very old entry from the depth of our backlog. Unless you see there anything worth digging into, please feel free to close with any status of your choosing.

Generated at Thu Feb 08 07:29:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.