Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix test script problems causing SQLITE_OMIT_VIRTUALTABLE builds to fail. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
37ad064e5f5704cf345d23b38b3f6d62 |
User & Date: | dan 2018-09-06 17:23:08.543 |
Context
2018-09-06
| ||
17:47 | Fix a problem in ALTER TABLE with SQLITE_OMIT_VIRTUALTABLE builds. (check-in: fa835145e6 user: dan tags: trunk) | |
17:23 | Fix test script problems causing SQLITE_OMIT_VIRTUALTABLE builds to fail. (check-in: 37ad064e5f user: dan tags: trunk) | |
16:50 | Merge accidental fork. (check-in: ebadb7dc25 user: mistachkin tags: trunk) | |
Changes
Changes to test/altercol.test.
︙ | ︙ | |||
421 422 423 424 425 426 427 | #------------------------------------------------------------------------- # Test that views can be edited even if there are missing collation # sequences or user defined functions. # reset_db | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | #------------------------------------------------------------------------- # Test that views can be edited even if there are missing collation # sequences or user defined functions. # reset_db ifcapable vtab { foreach {tn old new lSchema} { 1 _x_ _xxx_ { { CREATE TABLE t1(a, b, _x_) } { CREATE VIEW s1 AS SELECT a, b, _x_ FROM t1 WHERE _x_='abc' COLLATE xyz } } 2 _x_ _xxx_ { { CREATE TABLE t1(a, b, _x_) } { CREATE VIEW v1 AS SELECT a, b, _x_ FROM t1 WHERE scalar(_x_) } } 3 _x_ _xxx_ { { CREATE TABLE t1(a, b, _x_) } { CREATE VIEW v1 AS SELECT a, b, _x_ FROM t1 WHERE _x_ = unicode(1, 2, 3) } } 4 _x_ _xxx_ { { CREATE TABLE t1(a, b, _x_) } { CREATE VIRTUAL TABLE e1 USING echo(t1) } } } { register_echo_module db do_rename_column_test 10.$tn $old $new $lSchema } #-------------------------------------------------------------------------- # Test that if a view or trigger refers to a virtual table for which the # module is not available, RENAME COLUMN cannot proceed. # reset_db register_echo_module db do_execsql_test 11.0 { CREATE TABLE x1(a, b, c); CREATE VIRTUAL TABLE e1 USING echo(x1); } db close sqlite3 db test.db do_execsql_test 11.1 { ALTER TABLE x1 RENAME b TO bbb; SELECT sql FROM sqlite_master; } { {CREATE TABLE x1(a, bbb, c)} {CREATE VIRTUAL TABLE e1 USING echo(x1)} } do_execsql_test 11.2 { CREATE VIEW v1 AS SELECT e1.*, x1.c FROM e1, x1; } do_catchsql_test 11.3 { ALTER TABLE x1 RENAME c TO ccc; } {1 {error in view v1: no such module: echo}} } #------------------------------------------------------------------------- # Test some error conditions: # # 1. Renaming a column of a system table, # 2. Renaming a column of a VIEW, # 3. Renaming a column of a virtual table. |
︙ | ︙ |
Changes to test/altertab.test.
︙ | ︙ | |||
64 65 66 67 68 69 70 | {CREATE TABLE "t2new"(a, b)} {CREATE INDEX t2expr ON "t2new"(a) WHERE "t2new".b>0} } #------------------------------------------------------------------------- reset_db | > | | | | | | | | | | | | | | | | > | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | {CREATE TABLE "t2new"(a, b)} {CREATE INDEX t2expr ON "t2new"(a) WHERE "t2new".b>0} } #------------------------------------------------------------------------- reset_db ifcapable vtab { register_echo_module db do_execsql_test 2.0 { CREATE TABLE abc(a, b, c); INSERT INTO abc VALUES(1, 2, 3); CREATE VIRTUAL TABLE eee USING echo('abc'); SELECT * FROM eee; } {1 2 3} do_execsql_test 2.1 { ALTER TABLE eee RENAME TO fff; SELECT * FROM fff; } {1 2 3} db close sqlite3 db test.db do_catchsql_test 2.2 { ALTER TABLE fff RENAME TO ggg; } {1 {no such module: echo}} } #------------------------------------------------------------------------- reset_db do_execsql_test 3.0 { CREATE TABLE txx(a, b, c); INSERT INTO txx VALUES(1, 2, 3); |
︙ | ︙ |