[MDEV-30854] Do not use " as string delimiter in mariadb-tzinfo-to-sql
If SQL_MODE contains ANSI_QUOTES (https://mariadb.com/kb/en/sql-mode/), then the double-quote character (") is not a legal string delimiter. In https://github.com/MariaDB/server/commit/13e77930e615f05cc74d408110e887b00e1abcc9#diff-a333d4ebb2d73b6361ef7dfebc86d883f7e19853b4a9eb85984b039058fae47cR2431-R2435, Daniel Black introduced a case where the double-quote character would be used as a string delimiter in the SQL queries generated by mariadb-tzinfo-to-sql. This tool tool generates SQL queries which should be able to run on any MariaDB server of the matching version. Therefore, it should be extremely conservative in the SQL that it outputs, in order to maximize the chance that it can run regardless of the build or execution environment of the server. See MDEV-18778, MDEV-28263, and MDEV-28782 for previous cases where MariaDB has FAILED TO ENSURE that the generated timezone.sql actually works in different build and execution environments. More test coverage is clearly needed here. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
Showing
This diff is collapsed.
Please register or sign in to comment