TablePlus / TablePlus

TablePlus macOS issue tracker
https://tableplus.com
3.34k stars 56 forks source link

Database with FUNCTION: Dump inserts flags that cause problems when importing #3301

Open simube opened 1 month ago

simube commented 1 month ago

Please answer the questions below, it helps us to keep track of the issue. Please do not ignore it or your issue will be closed.

  1. Which driver are you using and version of it (Ex: PostgreSQL 10.0): MariaDB 10.5.22

  2. Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): 550

  3. The steps to reproduce this issue:

    • Create a Database which has a FUNCTION
    • Hit CMD&A to select all tables AND functions
    • File -> Export -> SQL (with table structure and content)
    • re-import the generated sql-file into a new database with File -> Import -> From SQL Dump
    • The following Error is shown:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,N...' at line 1

This is caused because a line at the very end of the file:

NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION;