[MDEV-11169] Error Restoring mysqldump in MariaDB 5.5 Created: 2016-10-28 Updated: 2023-11-16 Resolved: 2023-11-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser, Scripts & Clients |
| Affects Version/s: | 5.5.52 |
| Fix Version/s: | 10.6.8, 10.7.4, 10.8.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jamie Jackson | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux; Ubuntu 12.04.5 LTS; 64-bit |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
| Comments |
| Comment by Elena Stepanova [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The reason of the syntax error is an extra semicolon in the trigger definition. Jamie Jackson, do you have the complete command line that was used to create the dump? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jamie Jackson [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@Elena Stepanova, the mysqldump command is included in the description. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Okay, thanks. This command does not seem to cause an extra semicolon, so I thought maybe there was something else in there. What does the trigger look like when you just run show create trigger cal_tbl_event_delete? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jamie Jackson [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jamie Jackson [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Source or target server? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Source I suppose – the one where you got the output above. Normally it does not have the trailing semicolon:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jamie Jackson [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is from the source server (the one which I'm dumping):
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jamie Jackson [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Linking | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jamie Jackson [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
FYI, I still have the create script used to create the original triggers. FWIW, it was run over JDBC (Lucee Server 4.5.4.015 and mariadb-java-client-1.2.3.jar) with `allowMultiQueries=true`.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please take a look at the above? The SQL looks valid, and yet the server ends up with an extra semicolon at the end of the single-statement triggers. Is the connector misused here somehow, or does it actually misbehave? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Diego Dupin [ 2016-11-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Elena, After some tests, i've been able to reproduced the problem : After query like
information_schema.TRIGGERS will contain 'DO1;'. Issue can be done too using the folowing command : mysql -uroot -D testj < insert.txt
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-11-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
What you've found is But as you can see in Jamie Jackson's script above, they don't have anything like that in the script – neither executable comments, nor extra statements after triggers. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Diego Dupin [ 2016-11-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
elenst sorry i misunderstood the problem. for example :
will have a "action_statement" with "DO 2;" in I_S.TRIGGERS. That can occur only when when option "allowMultiQueries" is enable (that correspond to capability CLIENT_MULTI_STATEMENT), permitting to send multiple statement per COM_QUERY / COM_STMT_QUERY. SQL send is valid. Issue must lie on how server handle those multi-statement. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2023-11-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
diego dupin, with | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Diego Dupin [ 2023-11-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Problem reproduced with 10.6.7 and corrected in 10.6.8. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2023-11-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks diego dupin |