1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Give a better error message on DROP COLUMN when attempting to drop

the last column of a table.

FossilOrigin-Name: 5e1f362bc3e53c60f9e6f771346d10c6e6a6cb3ff1eec5608101f9c5d6d2a5a4
This commit is contained in:
drh
2021-02-19 09:09:07 +00:00
parent c90fa01dbf
commit 239c84fc62
4 changed files with 15 additions and 11 deletions

View File

@ -72,7 +72,7 @@ do_execsql_test 1.7.2 {
do_catchsql_test 1.7.3 {
ALTER TABLE t1 DROP COLUMN a;
} {1 {error in table t1 after drop column: near ")": syntax error}}
} {1 {cannot drop column "a": no other columns exist}}
do_catchsql_test 1.8 {
@ -256,5 +256,3 @@ do_catchsql_test 5.5.2 {
} {1 {error in trigger tr: no such column: new.z}}
finish_test