Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-9001 - Fix DB name quoting in mysqldump --routine #111

Closed
wants to merge 1 commit into from

Conversation

FGasper
Copy link

@FGasper FGasper commented Oct 23, 2015

MariaDB fix for: https://bugs.mysql.com/bug.php?id=78932

(code is original, not copied from MySQL)

@FGasper
Copy link
Author

FGasper commented Oct 23, 2015

It would be great to get a backport of this to as many versions are supported … the breakage from this is pretty debilitating when you want a full backup of everything.

@svoj
Copy link
Contributor

svoj commented Oct 23, 2015

Hi FGasper,

thanks for you contribution. JIRA task has been created to track this pull request: https://mariadb.atlassian.net/browse/MDEV-9001

Thanks,
Sergey

@svoj svoj changed the title Fix DB name quoting in mysqldump --routine MDEV-9001 - Fix DB name quoting in mysqldump --routine Oct 23, 2015
@svoj
Copy link
Contributor

svoj commented Oct 23, 2015

This task was added to 5.5.47 backlog, which is supposed to be handled between 2015-12-01 and 2015-12-08.

@svoj
Copy link
Contributor

svoj commented Dec 1, 2015

Felipe,

Similar to other open source projects, the MariaDB Foundation needs to have shared ownership of all code that is included in the MariaDB distribution. The easiest way to achieve this is by submitting your code under the BSD-new license.

The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/

Please indicate in a comment below that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.

Thanks,
Sergey

@svoj svoj self-assigned this Dec 1, 2015
@FGasper
Copy link
Author

FGasper commented Dec 1, 2015

I am contributing the new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license.

Sent from my android device.

-----Original Message-----
From: Sergey notifications@github.com
To: MariaDB/server server@noreply.github.com
Cc: FGasper felipe@felipegasper.com
Sent: Tue, 01 Dec 2015 8:54
Subject: Re: [server] MDEV-9001 - Fix DB name quoting in mysqldump --routine (#111)

Filipe,

Similar to other open source projects, the MariaDB Foundation needs to have shared ownership of all code that is included in the MariaDB distribution. The easiest way to achieve this is by submitting your code under the BSD-new license.

The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/

Please indicate in a comment below that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.

Thanks,
Sergey


Reply to this email directly or view it on GitHub:
#111 (comment)

@svoj
Copy link
Contributor

svoj commented Dec 2, 2015

Felipe,

  • it won't work with e.g. --compatible=ansi, where quote character is double quote (instead of back tick)
  • it doesn't escape string, which is needed for the following statement issued by dump_routines_for_db(): "SHOW %s STATUS WHERE Db = '%s'"
  • the following statement issued by switch_db_collation()/restore_db_collation() will suffer from double quoting: "ALTER DATABASE %s CHARACTER SET %s COLLATE %s %s"
  • same for the following statement issued by fetch_db_collation(): "use %s"

The correct fix is to use escaped string for string literals and original string for identifiers (which are quoted later), like in this patch: http://lists.askmonty.org/pipermail/commits/2015-December/008694.html

@svoj
Copy link
Contributor

svoj commented Dec 3, 2015

Fix pushed to 5.5: 9f07c6b

@svoj svoj closed this Dec 3, 2015
ankitkumar031 pushed a commit to ankitkumar031/server that referenced this pull request Apr 16, 2017
vuvova pushed a commit that referenced this pull request Jun 22, 2017
dr-m pushed a commit that referenced this pull request Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants