Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix comparisons of ROWID against floating point numbers so that they work correctly. Ticket #377 and #567. (CVS 1178) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c9ac3db8e08403398ec3447573853346 |
User & Date: | drh 2004-01-14 21:59:23.000 |
Context
2004-01-15
| ||
02:44 | Reinsert the experimental sqlite_commit_hook() API. (CVS 1179) (check-in: 72bc84f2f1 user: drh tags: trunk) | |
2004-01-14
| ||
21:59 | Fix comparisons of ROWID against floating point numbers so that they work correctly. Ticket #377 and #567. (CVS 1178) (check-in: c9ac3db8e0 user: drh tags: trunk) | |
13:50 | Version 2.8.11 (CVS 1177) (check-in: a9f25347de user: drh tags: trunk) | |
Changes
Changes to src/encode.c.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + | ************************************************************************* ** This file contains helper routines used to translate binary data into ** a null-terminated string (suitable for use in SQLite) and back again. ** These are convenience routines for use by people who want to store binary ** data in an SQLite database. The code in this file is not used by any other ** part of the SQLite library. ** |
︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | + - + + + | } out[i++] = (c + e)&0xff; } return i; } #ifdef ENCODER_TEST #include <stdio.h> /* ** The subroutines above are not tested by the usual test suite. To test ** these routines, compile just this one file with a -DENCODER_TEST=1 option ** and run the result. */ int main(int argc, char **argv){ |
︙ | |||
237 238 239 240 241 242 243 244 245 | 240 241 242 243 244 245 246 247 248 249 | + | } if( memcmp(in, out, n)!=0 ){ printf(" ERROR decode mismatch\n"); exit(1); } printf(" OK\n"); } fprintf(stderr, "Finished. Total encoding: %d bytes\n", nByte); } #endif /* ENCODER_TEST */ |
Changes to src/vdbe.c.
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + | ** ** Various scripts scan this source file in order to generate HTML ** documentation, headers files, or other derived files. The formatting ** of the code in this file is, therefore, important. See other comments ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** |
︙ | |||
1213 1214 1215 1216 1217 1218 1219 | 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | - + - - - - - + + + + + + + - + - + - - - - + + + + + - + - - + + + + + + + + + + | int tos = p->tos; VERIFY( if( tos<0 ) goto not_enough_stack; ) Integerify(p, tos); aStack[tos].i += pOp->p1; break; } |
︙ |
Changes to src/where.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This module contains C code that generates VDBE code used to process ** the WHERE clause of SQL statements. ** |
︙ | |||
851 852 853 854 855 856 857 | 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 | - - + + - - | assert( aExpr[k].p!=0 ); assert( aExpr[k].idxLeft==iCur || aExpr[k].idxRight==iCur ); if( aExpr[k].idxLeft==iCur ){ sqliteExprCode(pParse, aExpr[k].p->pRight); }else{ sqliteExprCode(pParse, aExpr[k].p->pLeft); } |
︙ |
Changes to test/misc3.test.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + | # #*********************************************************************** # This file implements regression tests for SQLite library. # # This file implements tests for miscellanous features that were # left out of other test files. # |
︙ | |||
202 203 204 205 206 207 208 209 210 | 202 203 204 205 206 207 208 209 210 211 | + | } } {64} do_test misc3-4.3 { execsql { SELECT count(a) FROM t3 WHERE b IN (SELECT b FROM t3 ORDER BY a+1); } } {64} finish_test |
Changes to test/rowid.test.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing the magic ROWID column that is # found on all tables. # |
︙ | |||
466 467 468 469 470 471 472 473 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 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 | + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } } {123 124} do_test rowid-9.10 { execsql { SELECT * FROM t3 WHERE a>=122.9 AND a<=123.1 } } {123} # Ticket #567. Comparisons of ROWID or integery primary key against # floating point numbers still do not always work. |