Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add the SQLITE_TESTCTRL_BYTEORDER test control to interrogate SQLite's notion of the processor byte order and whether the byte order is known at compile-time or determined at run-time. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9c6961967ae00e563ebe2859eaf2639a |
User & Date: | drh 2014-04-18 00:06:02.110 |
Context
2014-04-18
| ||
00:49 | Add the SQLITE_RUNTIME_BYTEORDER compile-time option to force SQLite to check the processor byte-order at run-time. Add additional compile-time byte order checks for ARM, PPC, and SPARC. (check-in: 2c5363873a user: drh tags: trunk) | |
00:08 | Preliminary changes to support building VSIX packages for Windows Phone 8.1. (check-in: a1b2f28ba8 user: mistachkin tags: vsixWinPhone81) | |
00:06 | Add the SQLITE_TESTCTRL_BYTEORDER test control to interrogate SQLite's notion of the processor byte order and whether the byte order is known at compile-time or determined at run-time. (check-in: 9c6961967a user: drh tags: trunk) | |
2014-04-14
| ||
19:48 | Make sure the undocumented sqlite_rename_parent() function does not crash even if it is invoked with NULL arguments. Ticket [264b970c4379fd4b94] (check-in: c6fa8d0d82 user: drh tags: trunk) | |
Changes
Changes to src/main.c.
︙ | |||
3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 | 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 | + + + + + + + + + + + + + + + + | ** } */ case SQLITE_TESTCTRL_ALWAYS: { int x = va_arg(ap,int); rc = ALWAYS(x); break; } /* ** sqlite3_test_control(SQLITE_TESTCTRL_BYTEORDER); ** ** The integer returned reveals the byte-order of the computer on which ** SQLite is running: ** ** 1 big-endian, determined at run-time ** 10 little-endian, determined at run-time ** 432101 big-endian, determined at compile-time ** 123410 little-endian, determined at compile-time */ case SQLITE_TESTCTRL_BYTEORDER: { rc = SQLITE_BYTEORDER*100 + SQLITE_LITTLEENDIAN*10 + SQLITE_BIGENDIAN; break; } /* sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N) ** ** Set the nReserve size to N for the main database on the database ** connection db. */ case SQLITE_TESTCTRL_RESERVE: { |
︙ |
Changes to src/shell.c.
︙ | |||
3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 | 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 | + | { "pending_byte", SQLITE_TESTCTRL_PENDING_BYTE }, { "assert", SQLITE_TESTCTRL_ASSERT }, { "always", SQLITE_TESTCTRL_ALWAYS }, { "reserve", SQLITE_TESTCTRL_RESERVE }, { "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS }, { "iskeyword", SQLITE_TESTCTRL_ISKEYWORD }, { "scratchmalloc", SQLITE_TESTCTRL_SCRATCHMALLOC }, { "byteorder", SQLITE_TESTCTRL_BYTEORDER }, }; int testctrl = -1; int rc = 0; int i, n; open_db(p, 0); /* convert testctrl text option to value. allow any unique prefix |
︙ | |||
3063 3064 3065 3066 3067 3068 3069 | 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 | - - + + + | } else { fprintf(stderr,"Error: testctrl %s takes a single int option\n", azArg[1]); } break; /* sqlite3_test_control(int) */ |
︙ |
Changes to src/sqlite.h.in.
︙ | |||
6114 6115 6116 6117 6118 6119 6120 | 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 | + - + | #define SQLITE_TESTCTRL_OPTIMIZATIONS 15 #define SQLITE_TESTCTRL_ISKEYWORD 16 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18 #define SQLITE_TESTCTRL_EXPLAIN_STMT 19 #define SQLITE_TESTCTRL_NEVER_CORRUPT 20 #define SQLITE_TESTCTRL_VDBE_COVERAGE 21 #define SQLITE_TESTCTRL_BYTEORDER 22 |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
549 550 551 552 553 554 555 | 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 | - - + + + + + - + | ** evaluated at runtime. */ #ifdef SQLITE_AMALGAMATION const int sqlite3one = 1; #else extern const int sqlite3one; #endif |
︙ |