Skip to content

Parsing errors from mysqldump 8.0 #1339

@n0madic

Description

@n0madic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions