• Anel Husakovic's avatar
    MDEV-21786 mysqldump will forget sequence definition details on --no-data dump · 81870e49
    Anel Husakovic authored
    - Original patch was contributed by Jani Tolonen <jani.k.tolonen@gmail.com>
    https://github.com/an3l/server/commits/bb-10.3-anel-MDEV-21786-dump-sequence
    which distinguishes data structure (linked list) of sequences from
    tables.
    - Added standard sql output to prevent future changes
    of sequences and disabled locks for sequences.
    - Added test case for `MDEV-20070: mysqldump won't work correct on
    sequences` where table column depends on sequence value.
    - Restore sequence last value in the following way:
      - Find `next_not_cached_value` and use it to `setval()`
      - We just need for logical restore, so don't execute `setval()`
      - `setval()` should be showed also in case of `--no-data` option.
    
    Reviewed-by: daniel@mariadb.org
    81870e49
mysqldump.test 99.2 KB