Thank you for continuing on the patch.
Here are some review comments for you.
http://bugs.python.org/review/9750/diff/3609/11286
File Lib/sqlite3/dump.py (right):
http://bugs.python.org/review/9750/diff/3609/11286#newcode43
Lib/sqlite3/dump.py:43: res = cu.execute("PRAGMA table_info('%s')" %
table_name.replace('"', '""'))
Table names with a quote (') will not work. Also, a table name with a double
quote will end up having two double quotes in it. The enclosing quote and the
duplicated quote must match!
Single quotes around the pragma table_info table name work, but since this is an
identifier, use double quotes. Single quotes are for string literals. See
http://www.sqlite.org/lang_keywords.html.
res = cu.execute("""PRAGMA table_info("%s")""" % table_name.replace('"', '"" '))
http://bugs.python.org/review/9750/diff/3609/11287
File Lib/sqlite3/test/dump.py (right):
http://bugs.python.org/review/9750/diff/3609/11287#newcode30
Lib/sqlite3/test/dump.py:30: """CREATE TABLE t4('legal""name' text);"""
Quote names using double quotes. The column name now has two double quotes, but
you most likely intended it to have one.
Also you are missing the test case for a table with double quote in its name.
Please use
CREATE TABLE t3("group" text, "index" integer);
CREATE TABLE "t""4"("legal""name" text);
Issue 9750: sqlite3 iterdump fails on column with reserved name
Created 6 months, 2 weeks ago by Marko.Kohtala
Modified 3 months, 2 weeks ago
Reviewers:
Base URL: None
Comments: 2