Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tkt9b78184b-alt Excluding Merge-Ins
This is equivalent to a diff from eab4297577 to b0629132bc
2019-07-08
| ||
12:44 | Comment improvements. No changes to code. (Leaf check-in: b0629132bc user: drh tags: tkt9b78184b-alt) | |
2019-07-02
| ||
20:10 | Have ALTER TABLE detect and error out for the case where renaming a column changes a the interpretation of a double-quoted identifier in the database schema from an SQL literal to a column reference. (check-in: 5dbb0734af user: dan tags: tkt9b78184b-alt) | |
12:23 | Restore the legacy behavior of enabling double-quoted string literals in all contexts. But also provide a new compile-time option (SQLITE_DQS) to change the default to something more restrictive. (check-in: 97a94446f3 user: drh tags: trunk) | |
11:56 | Experimental implementation of FILTER clause for aggregate functions. (check-in: 1f1ae2d6ac user: dan tags: filter-clause) | |
2019-06-28
| ||
07:08 | Use the OP_Sequence opcode for generating unique rowid values for an autoindex on a co-routine implementation of a subquery. (check-in: eab4297577 user: drh tags: trunk) | |
2019-06-26
| ||
21:04 | Ensure that when an ephemeral cursor is reopened with a second invocation of to OP_OpenEphemeral, the sequence counter is reset and the cache marked as stale. Fix for [9cdc5c46]. (check-in: 5fd20e09a5 user: dan tags: trunk) | |
Changes to src/alter.c.
︙ | |||
523 524 525 526 527 528 529 530 531 532 533 534 535 536 | 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | + + | Table *pTab; /* Table being updated */ int iCol; /* Index of column being renamed */ char *zOld = 0; /* Old column name */ char *zNew = 0; /* New column name */ const char *zDb; /* Name of schema containing the table */ int iSchema; /* Index of the schema */ int bQuote; /* True to quote the new name */ Vdbe *v; /* VDBE handle */ int regRefCnt; /* Register for number of refs to column */ /* Locate the table to be altered */ pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]); if( !pTab ) goto exit_rename_column; /* Cannot alter a system table */ if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_rename_column; |
︙ | |||
556 557 558 559 560 561 562 | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | + + + + + + - - - + + + - - + - + + - - - - - - - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if( 0==sqlite3StrICmp(pTab->aCol[iCol].zName, zOld) ) break; } if( iCol==pTab->nCol ){ sqlite3ErrorMsg(pParse, "no such column: \"%s\"", zOld); goto exit_rename_column; } /* Allocate a register to count the number of rewritten column refs. */ v = sqlite3GetVdbe(pParse); if( v==0 ) goto exit_rename_column; regRefCnt = ++pParse->nMem; sqlite3VdbeAddOp2(v, OP_Integer, 0, regRefCnt); |
︙ | |||
1221 1222 1223 1224 1225 1226 1227 | 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 | - + + + + + + - + + + + | renameTokenFree(db, pParse->pRename); sqlite3ParserReset(pParse); } /* ** SQL function: ** |
︙ | |||
1363 1364 1365 1366 1367 1368 1369 | 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 | - + + + + - + | } renameColumnIdlistNames(&sParse, &sCtx, pStep->pIdList, zOld); renameColumnElistNames(&sParse, &sCtx, pStep->pExprList, zOld); } } } |
︙ | |||
1655 1656 1657 1658 1659 1660 1661 | 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 | - + | } /* ** Register built-in functions used to help implement ALTER TABLE */ void sqlite3AlterFunctions(void){ static FuncDef aAlterTableFuncs[] = { |
Changes to src/resolve.c.
︙ | |||
814 815 816 817 818 819 820 | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 | - + + + | NC_IdxExpr|NC_PartIdx); } if( (pDef->funcFlags & SQLITE_FUNC_INTERNAL)!=0 && pParse->nested==0 && sqlite3Config.bInternalFunctions==0 ){ /* Internal-use-only functions are disallowed unless the |
︙ |
Changes to src/vdbe.h.
︙ | |||
279 280 281 282 283 284 285 286 287 288 289 290 291 292 | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | + | RecordCompare sqlite3VdbeFindCompare(UnpackedRecord*); #ifndef SQLITE_OMIT_TRIGGER void sqlite3VdbeLinkSubProgram(Vdbe *, SubProgram *); #endif int sqlite3NotPureFunc(sqlite3_context*); void sqlite3VdbeIncrReg(sqlite3_context*, int, int); /* Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on ** each VDBE opcode. ** ** Use the SQLITE_ENABLE_MODULE_COMMENTS macro to see some extra no-op ** comments in VDBE programs that show key decision points in the code ** generator. |
︙ |
Changes to src/vdbeaux.c.
︙ | |||
4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 | 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 | + + + + + + + + + + | sqlite3_result_error(pCtx, "non-deterministic function in index expression or CHECK constraint", -1); return 0; } return 1; } /* ** Increment the value of register iReg, which is guaranteed to be an ** integer, in the VM associated with context object pCtx by iVal. */ void sqlite3VdbeIncrReg(sqlite3_context *pCtx, int iReg, int iVal){ Mem *pMem = &pCtx->pVdbe->aMem[iReg]; assert( pMem->flags==MEM_Int ); pMem->u.i += iVal; } #ifndef SQLITE_OMIT_VIRTUALTABLE /* ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored ** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored ** in memory obtained from sqlite3DbMalloc). */ |
︙ |
Changes to test/alter.test.
︙ | |||
682 683 684 685 686 687 688 | 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | - + | #-------------------------------------------------------------------------- # alter-9.X - Special test: Make sure the sqlite_rename_column() and # rename_table() functions do not crash when handed bad input. # sqlite3_test_control SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 1 do_test alter-9.1 { |
︙ |
Changes to test/alterauth2.test.
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - | do_auth_test 1.2 { ALTER TABLE t2 RENAME a TO aaa; } { {SQLITE_ALTER_TABLE main t2 {} {}} {SQLITE_FUNCTION {} like {} {}} {SQLITE_FUNCTION {} sqlite_rename_column {} {}} |
︙ |
Changes to test/altercol.test.
︙ | |||
634 635 636 637 638 639 640 | 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | - + - + | 'CREATE TABLE x1(i INTEGER, t TEXT)', 'table', 'x1', 'main', 'ddd', -1, 'zzz', 0 ); } {} do_execsql_test 14.2 { SELECT |
︙ |
Added test/altercol2.test.
|