Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch integrity-check-improvements Excluding Merge-Ins
This is equivalent to a diff from 80adc0cb to 5af7d72e
2017-02-22
| ||
18:53 | Improvements to PRAGMA integrity_check. Verify CHECK constraints. Verify NOT NULL constraints even on table that lack indexes. Verify CHECK and NOT NULL constraints with PRAGMA quick_check. (check-in: aa02bd3c user: drh tags: trunk) | |
18:04 | Cleanup and simplification of the output row count limit control of PRAGMA integrity_check. (Closed-Leaf check-in: 5af7d72e user: drh tags: integrity-check-improvements) | |
15:11 | Fix integrity_check so that it verifies NOT NULL constraints even for tables that have no indexes. Enhance quick_check so that it verifies NOT NULL and CHECK constraints. (check-in: 5264844b user: drh tags: integrity-check-improvements) | |
14:15 | Enhance "PRAGMA integrity_check" so that it verifies CHECK constraints. (check-in: 549bae08 user: drh tags: integrity-check-improvements) | |
2017-02-21
| ||
21:24 | In sqlite3VdbeHalt(), return as soon as possible if Vdbe.magic!=VDBE_MAGIC_RUN. This makes sqlite3_reset() slightly faster in some cases. (check-in: 80adc0cb user: dan tags: trunk) | |
17:52 | Fix an FTS5 problem that could cause a crash when certain queries were interrupted using sqlite3_interrupt(). (check-in: e400909f user: dan tags: trunk) | |
Changes to src/build.c.
︙ | |||
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 | 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 | + | ** the column currently under construction. */ void sqlite3AddNotNull(Parse *pParse, int onError){ Table *p; p = pParse->pNewTable; if( p==0 || NEVER(p->nCol<1) ) return; p->aCol[p->nCol-1].notNull = (u8)onError; p->tabFlags |= TF_HasNotNull; } /* ** Scan the column type name zType (length nType) and return the ** associated affinity type. ** ** This routine does a case-independent search of zType for the |
︙ |
Changes to src/pragma.c.
︙ | |||
290 291 292 293 294 295 296 297 298 299 300 301 302 303 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | + + + + + + + + + + + + + + + + | upr = mid - 1; }else{ lwr = mid + 1; } } return lwr>upr ? 0 : &aPragmaName[mid]; } /* ** Helper subroutine for PRAGMA integrity_check: ** ** Generate code to output a single-column result row with the result ** held in register regResult. Decrement the result count and halt if ** the maximum number of result rows have been issued. */ static int integrityCheckResultRow(Vdbe *v, int regResult){ int addr; sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, 1); addr = sqlite3VdbeAddOp3(v, OP_IfPos, 1, sqlite3VdbeCurrentAddr(v)+2, 1); VdbeCoverage(v); sqlite3VdbeAddOp2(v, OP_Halt, 0, 0); return addr; } /* ** Process a pragma statement. ** ** Pragmas are of this form: ** ** PRAGMA [schema.]id [= value] |
︙ | |||
1373 1374 1375 1376 1377 1378 1379 | 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 | + + + + + + + - + - + + | break; #ifndef SQLITE_INTEGRITY_CHECK_ERROR_MAX # define SQLITE_INTEGRITY_CHECK_ERROR_MAX 100 #endif #ifndef SQLITE_OMIT_INTEGRITY_CHECK /* PRAGMA integrity_check ** PRAGMA integrity_check(N) ** PRAGMA quick_check ** PRAGMA quick_check(N) ** ** Verify the integrity of the database. ** |
︙ | |||
1406 1407 1408 1409 1410 1411 1412 | 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 | - + - - - - | mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX; if( zRight ){ sqlite3GetInt32(zRight, &mxErr); if( mxErr<=0 ){ mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX; } } |
︙ | |||
1464 1465 1466 1467 1468 1469 1470 | 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 | - + - + - + + + + + + - - - - - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - + - - - + - - - + + + - - - - - - + + + - - - - + + + + + - + - + | sqlite3VdbeChangeP5(v, (u8)i); addr = sqlite3VdbeAddOp1(v, OP_IsNull, 2); VdbeCoverage(v); sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, sqlite3MPrintf(db, "*** in database %s ***\n", db->aDb[i].zDbSName), P4_DYNAMIC); sqlite3VdbeAddOp3(v, OP_Move, 2, 4, 1); sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 2); |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
1875 1876 1877 1878 1879 1880 1881 | 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 | - - - - - - - - + + + + + + + + + | ** ** TF_OOOHidden applies to tables or view that have hidden columns that are ** followed by non-hidden columns. Example: "CREATE VIRTUAL TABLE x USING ** vtab1(a HIDDEN, b);". Since "b" is a non-hidden column but "a" is hidden, ** the TF_OOOHidden attribute would apply in this case. Such tables require ** special handling during INSERT processing. */ |
︙ |
Changes to src/vdbe.c.
︙ | |||
5607 5608 5609 5610 5611 5612 5613 | 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 | - + | #ifndef SQLITE_OMIT_INTEGRITY_CHECK /* Opcode: IntegrityCk P1 P2 P3 P4 P5 ** ** Do an analysis of the currently open database. Store in ** register P1 the text of an error message describing any problems. ** If no problems are found, store a NULL in register P1. ** |
︙ | |||
5640 5641 5642 5643 5644 5645 5646 | 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 | - + - + | pnErr = &aMem[pOp->p3]; assert( (pnErr->flags & MEM_Int)!=0 ); assert( (pnErr->flags & (MEM_Str|MEM_Blob))==0 ); pIn1 = &aMem[pOp->p1]; assert( pOp->p5<db->nDb ); assert( DbMaskTest(p->btreeMask, pOp->p5) ); z = sqlite3BtreeIntegrityCheck(db->aDb[pOp->p5].pBt, aRoot, nRoot, |
︙ |
Changes to test/check.test.
︙ | |||
305 306 307 308 309 310 311 312 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | + - + + + + + - | } } {12 -22} do_test check-4.8 { execsql { PRAGMA ignore_check_constraints=ON; UPDATE t4 SET x=0, y=1; SELECT * FROM t4; PRAGMA integrity_check; } |
︙ |