Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 1064 "InvalidArgument" importing a mysqldump made with default options #7375

Closed
mcronce opened this issue Jan 25, 2021 · 0 comments · Fixed by #7431
Closed

Error 1064 "InvalidArgument" importing a mysqldump made with default options #7375

mcronce opened this issue Jan 25, 2021 · 0 comments · Fixed by #7431

Comments

@mcronce
Copy link

mcronce commented Jan 25, 2021

Overview of the Issue

As part of the framework test for mysqldump, we import backups taken with various permutations of mysqldump options. Currently, a backup of an empty database taken with default options (e.g. mysqldump -h172.17.0.2 -uroot -ptesting test) fails with the following error:

ERROR 1064 (42000) at line 40: vtgate: http://3e5d5c6a960a:33574/: vttablet: rpc error: code = InvalidArgument desc = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':__vtudvold_time_zone' at line 1 (errno 1064) (sqlstate 42000) (CallerID: userData1): Sql: "set @@time_zone = :__vtudvold_time_zone", BindVars: {__vtudvold_time_zone: "type:VARBINARY value:\"SYSTEM\" "}

This is the particular query it's bombing out on:

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

Tested with vitess/vttestserver:mysql57 container image, short hash 0f8e94a68399

Reproduction Steps

Importing this will exercise the failure:

-- MySQL dump 10.13  Distrib 8.0.21, for Linux (x86_64)
--
-- Host: 172.17.0.2    Database: test1
-- ------------------------------------------------------
-- Server version	5.7.30

/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!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 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-11-12 15:40:05

Binary version

$ /vt/bin/vtcombo -version
ERROR: logging before flag.Parse: E0122 18:55:31.686379    2285 syslogger.go:149] can't connect to syslog
Version: e259a08f0 (Git branch 'master') built on Fri Jan 22 04:19:58 UTC 2021 by vitess@b581768d34fd using go1.15.6 linux/amd64

As an aside, TIL vttestserver -version doesn't work :)

Operating system and Environment details

Inside the vttestserver container:

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
vitess@3e5d5c6a960a:/$ uname -sr 
Linux 5.10.2-2-MANJARO
vitess@3e5d5c6a960a:/$ uname -m
x86_64

Log Fragments

I0122 18:52:51.460354     706 tabletserver.go:1339] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':__vtudvold_time_zone' at line 1 (errno 1064) (sqlstate 42000) (CallerID: userData1): Sql: "set @@time_zone = :__vtudvold_time_zone", BindVars: {__vtudvold_time_zone: "type:VARBINARY value:\"SYSTEM\" "}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants