[MDEV-7231] Field ROUTINE_DEFINITION in INFORMATION_SCHEMA.`ROUTINES` contains broken procedure body when used shielding quotes inside. Created: 2014-11-28 Updated: 2016-02-27 Resolved: 2016-02-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Procedure |
| Affects Version/s: | 5.1.67, 5.2.14, 5.3.12, 5.5, 10.0 |
| Fix Version/s: | 10.1.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Mikhail Gavrilov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | procedure, quotes, triggers, upstream | ||
| Environment: |
Linux Fedora 21 |
||
| Attachments: |
|
| Sprint: | 10.1.11, 10.1.12 |
| Description |
|
As you can see on the screenshot comparison only difference is the amount of shielding quotes. Why? Yet another example:
|
| Comments |
| Comment by Elena Stepanova [ 2014-11-29 ] | |||||||||||||||||||||||||||||||||||||||
|
Thanks for the report. | |||||||||||||||||||||||||||||||||||||||
| Comment by Mikhail Gavrilov [ 2014-11-30 ] | |||||||||||||||||||||||||||||||||||||||
|
I think priority must be increased because also affected triggers:
As you can see trigger is worked but I cannot get it body. | |||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-30 ] | |||||||||||||||||||||||||||||||||||||||
|
It's just the standard procedure – we usually set priority for upstream bugs to minor, because we want to wait and see whether upstream fixes them; and if not, the priority can be raised. | |||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-01-16 ] | |||||||||||||||||||||||||||||||||||||||
|
Problem is that on mysql.proc table body nad body_utf8 are not exactly the same even on default character set:
This difference is made when procedure body is constructed while parsing and error is somewhere on literal handling. | |||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-01-16 ] | |||||||||||||||||||||||||||||||||||||||
|
I do not know enough about MySQL parser to be able to fix this bug. Reassigning to bar. | |||||||||||||||||||||||||||||||||||||||
| Comment by Peter Laursen [ 2015-02-02 ] | |||||||||||||||||||||||||||||||||||||||
|
Independent of this discussion I posted to bugs.mysql.com http://bugs.mysql.com/bug.php?id=75685 a few days ago. | |||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2016-02-17 ] | |||||||||||||||||||||||||||||||||||||||
|
A smaller test reproducing the problem:
Both SELECT queries return a wrong result with the quote character removed:
If I rewrite the query slightly (notice the N prefix meaning NATIONAL CHARACTER literal):
it returns a correct result:
| |||||||||||||||||||||||||||||||||||||||
| Comment by Mikhail Gavrilov [ 2016-02-26 ] | |||||||||||||||||||||||||||||||||||||||
|
Bug is not fixed if only upgrade server.
For fix this needed recreate all procedures. Can you add this in mysql_upgrade ??? |