parser icon indicating copy to clipboard operation
parser copied to clipboard

Parsing errors from mysqldump 8.0

Open n0madic opened this issue 4 years ago • 0 comments

Bug Report

Getting errors parsing output from mysqldump

mysqldump  Ver 8.0.26 for Linux on x86_64 (MySQL Community Server - GPL)
  1. The problematic part of the dump:
CREATE TABLE `sites` (
  /* skipped... */
  `rules` json NOT NULL DEFAULT (_utf8mb4'[]'),
  `reasons` json NOT NULL DEFAULT (json_array()),
  `date_updated_for_send` int GENERATED ALWAYS AS ((case when ((`status` = _utf8mb3'') or (`status` = _utf8mb3'fail')) then `date_update` else NULL end)) VIRTUAL,
  /* ...skipped */
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1. What did you expect to see? dump as is

  2. What did you see instead?

parse error: line 3 column 34 near "(_utf8mb4'[]'),
parse error: line 4 column 36 near "(json_array());
parse error: line 5 column 86 near "'') or (`status` = _utf8mb3'fail')) then `date_update` else NULL end)) VIRTUAL,
  1. What version of TiDB SQL Parser are you using? parser v4.0.2
github.com/pingcap/parser v0.0.0-20200623164729-3a18f1e5dceb

n0madic avatar Sep 11 '21 13:09 n0madic