From ed8600db489791e7134aff673b95df9be17aa84d Mon Sep 17 00:00:00 2001 From: Nils Koch Date: Sun, 20 Jul 2025 15:34:43 +0100 Subject: [PATCH] add test for dropping special column names --- testing/alter_table.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testing/alter_table.test b/testing/alter_table.test index 3d3b56053..188eb76e4 100755 --- a/testing/alter_table.test +++ b/testing/alter_table.test @@ -95,6 +95,18 @@ do_execsql_test_on_specific_db {:memory:} alter-table-drop-column { "3" } +do_execsql_test_on_specific_db {:memory:} alter-table-drop-column-special-name { + CREATE TABLE t(a, b, [c c]); + INSERT INTO t VALUES (1, 2, 3); + ALTER TABLE t DROP COLUMN b; + + SELECT "c c" FROM t; + SELECT sql FROM sqlite_schema; +} { + 3 + "CREATE TABLE t (a, [c c])" +} + do_execsql_test_in_memory_any_error fail-alter-table-drop-unique-column { CREATE TABLE t(a, b UNIQUE); ALTER TABLE t DROP b;