Commit Graph

87 Commits

Author SHA1 Message Date
drh 4bfd4ad9a7 Remove the unused sqlite3Utf8to16() utility function.
FossilOrigin-Name: 9159b43eb2cb5d6ed18a5ad168fa27134fec2553
2013-08-07 15:57:24 +00:00
dan f52bb8d385 Begin adding experimental sqlite_stat4 table. This commit is buggy.
FossilOrigin-Name: 2beea303a1d609cd2ff252412c50b966b9e5e8f1
2013-08-03 20:24:58 +00:00
drh 4261096124 Remove an unnecessary parameter from sqlite3Utf8Read() resulting in a slight
performance increase.

FossilOrigin-Name: 8b962c94a2f829f71efdd0ca770469b02feea3e1
2012-09-17 18:56:32 +00:00
drh faacf17cc1 Begin a branch that experimentally replaces sqlite_stat2 with a new table
called sqlite_stat3 that will hopefully facilitate better query
planning decisions.

FossilOrigin-Name: 52e1d7e8ddd4bb5ef3a9d00fd2d719a8a784f807
2011-08-12 01:51:45 +00:00
drh 0a32fa6d81 Use only unsigned values in the implementatin of LIKE and GLOB so that
values won't overflow to negative when dealing with malformed UTF8.

FossilOrigin-Name: 77f01578bb565d1bc884b374b68bae10ce34a084
2011-06-13 12:19:21 +00:00
shaneh dba2cc43c4 Minor change to sqlite3Utf8Read() to make consistent with READ_UTF8() usage and avoid implementation defined usages of <<.
Added some additional UTF-8 test cases.

FossilOrigin-Name: 7173b3929fae4e678223b0e978a2da7fa50a9005
2011-03-24 17:43:18 +00:00
dan b7dca7d733 Modify the vdbe so that the comparison operator opcodes do not modify the data type of operands. Fix for [aa92c76cd4].
FossilOrigin-Name: 8858042fa1449516a2c7dbb991dca3eb6c5794cb
2010-03-05 16:32:12 +00:00
drh c81c11f62c Remove the obsolete "$Id:$" RCS identifier strings from the source code.
FossilOrigin-Name: f6c045f649036958078cb15cd9d5453680c82b0c
2009-11-10 01:30:52 +00:00
drh 1faca75755 Another attempt at getting the pTail pointer computations correct for
sqlite3_prepare16().  Ticket [3fe897352e].

FossilOrigin-Name: a96b4e8c01d167d35b9ec08ee6603e52ead601b6
2009-10-24 03:04:10 +00:00
drh 6d116cace9 Check-in [19064d7cea] broke the pTail return on sqlite3_prepare16() when
the SQL contained surrogates. This check-in restores correct function.
Part of ticket [3fe897352e].

FossilOrigin-Name: 65b1e3a4c31f6cb6fd3f600701658b0cdbee603f
2009-10-24 01:55:14 +00:00
drh 7c95b0f3da Make sure that UTF16 to UTF8 conversions to not read past the end of the
UTF16 input buffer if the last two bytes of the UTF16 happen to be the
first half of a surrogate pair.  Ticket [3fe897352e]

FossilOrigin-Name: 19064d7cea838e1a93fe63743ed247f440679e97
2009-10-23 18:15:46 +00:00
shane cea72b2dc2 Warning cleanup from the MSVC compile.
FossilOrigin-Name: 26cd015c0ee1c18dd37f11b47ce35cfa320b3514
2009-09-07 04:38:36 +00:00
dan 69188d9a66 Add the SQLITE_ENABLE_STAT2 macro. If this is not defined at build-time, the stat2 table is not created, populated, or used.
FossilOrigin-Name: 362665e89c21fd603d9f8ad6c0ead590e885af7c
2009-08-19 08:18:32 +00:00
dan 02fa469619 First version of sqlite_stat2 (schema forces exactly 10 samples).
FossilOrigin-Name: dd96bda2a85c1d94fb4a0bf5f27e2977f7f7e42e
2009-08-17 17:06:58 +00:00
drh aed382f9f1 Fix a bug in the sqlite3Utf16ByteLen() function so that it computes the
correct length even for strings that contain surrogate pairs.
Ticket #3766. (CVS 6427)

FossilOrigin-Name: 766bb7e59c28884e40ce13e3fc55c870d06d7e34
2009-04-01 18:40:32 +00:00
drh 769e97e032 Remove dead code from the UTF conversion routines. Fix a bug in
sqlite3_prepare16_v2() in which an out-of-memory error fails to
set the statement return pointer to NULL. (CVS 6423)

FossilOrigin-Name: 94e2f815ebb38981a2226d8aed9f3731f8833f7c
2009-04-01 16:33:37 +00:00
shane b08a67a772 Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417)
FossilOrigin-Name: 768514179a63783c4e70b931d1697403c04bedf5
2009-03-31 03:41:56 +00:00
shane 18e526c16b Work to remove harmless MSVC compiler warnings. (CVS 6013)
FossilOrigin-Name: 715dcd52c1372c62873cff5db97fdbdfce617808
2008-12-10 22:30:24 +00:00
drh ea6788322e Never use strlen(). Use our own internal sqlite3Strlen30() which is
guaranteed to never overflow an integer.  Additional explicit casts to
avoid nuisance warning messages. (CVS 6007)

FossilOrigin-Name: c872d554930ecf221ac2be5f886d5d67bb35288c
2008-12-10 19:26:22 +00:00
drh aa78bec993 Get rid of more silly compiler warnings. (CVS 5996)
FossilOrigin-Name: 59ae0020683766993c38e2b76a436d78d3e4bd63
2008-12-09 03:55:14 +00:00
drh b3190c1501 Some minor name refactoring in where.c. Avoid declaring variables before
initializing them in the amalgamation because VC++ doesn't like that. (CVS 5993)

FossilOrigin-Name: 6ed696e7c03351514278338fa986539cf0fac178
2008-12-08 21:37:14 +00:00
drh bbf695d6ea Prevent buffer overruns when converting malformed UTF16 to UTF8. Ticket #3482. (CVS 5869)
FossilOrigin-Name: 3f657e88767f60d305dd6151e7aa54363341d052
2008-11-07 03:29:33 +00:00
danielk1977 44a376f6b4 Fix further warnings/compilation errors in test code. (CVS 5558)
FossilOrigin-Name: 42247b917ae5a5c0d81b934200810755d0040282
2008-08-12 15:04:58 +00:00
danielk1977 6e89162dd1 Fix warnings and a compilation error in test code. (CVS 5556)
FossilOrigin-Name: 80c129e63ec7dbed3de1e485dffea96fae40aa6d
2008-08-12 14:48:40 +00:00
danielk1977 ad76a81ed5 Use a macro to make sure that the calls to sqlite3Utf8Read() from MemTranslate() are inlined. This speeds up converting from utf8 to utf16. (CVS 5492)
FossilOrigin-Name: 78a623bbb17e35bcb902d3ea1d0b963570588d2d
2008-07-29 11:25:14 +00:00
mihailim 7ffb2b5f35 Changed copy-paste error in comment. Fixes #3193. (CVS 5323)
FossilOrigin-Name: 00eee53e8626591c4a0c61fe35735ec95ab3ef72
2008-06-27 18:59:44 +00:00
danielk1977 5f09613545 Changes to the Mem structure to reduce the frequency of freeing and reallocating the dynamic buffer. (CVS 4928)
FossilOrigin-Name: d0bf73d81453da1d8e602e0445064d9f5e348063
2008-03-28 15:44:09 +00:00
danielk1977 a7a8e14bf2 Where possible, avoid freeing buffers allocated for vdbe memory cells in case they can be reused. (CVS 4783)
FossilOrigin-Name: 990237e27e417aff3dbf05784b716c21f3761a3a
2008-02-13 18:25:27 +00:00
danielk1977 ae72d98252 Add automatic recovery from the pager "error-state". Also add a new error code - SQLITE_IOERR_NOMEM. (CVS 4454)
FossilOrigin-Name: 12eca32a6a3d68d5b20eed03afdffe7599e66014
2007-10-03 08:46:44 +00:00
danielk1977 4152e677b8 Fixes for compilation/testing when the various OMIT macros are defined. (CVS 4423)
FossilOrigin-Name: c8405b15c074c94dab5e33272cf1471f458d11df
2007-09-12 17:01:45 +00:00
danielk1977 28c66307d7 Test sqlite3_bind_zeroblob(). Only include sqlite3Utf8To8 in builds if SQLITE_DEBUG is defined. (CVS 4363)
FossilOrigin-Name: fde6142b7bb33198b3d6b65cfbddfad61694b1fb
2007-09-01 11:04:26 +00:00
drh b21c8cd4f6 The sqlite3_value object now carries an sqlite3* pointer to use for
recording malloc failures.  This eliminates the need to pass sqlite3*
pointers into many internal interfaces.  Also added more mutexing. (CVS 4263)

FossilOrigin-Name: 9287276191a582c1cf7cf6b71d8399727d8e534d
2007-08-21 19:33:56 +00:00
danielk1977 1e5369531e More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233)
FossilOrigin-Name: 77b1671351fe94b0ebc126a63140643deae2aa64
2007-08-16 10:09:01 +00:00
drh 174357527a Half-way through a major refactoring of the memory allocation.
I have not even attempted to compile so I am certain there are
countless errors. (CVS 4231)

FossilOrigin-Name: deb7ecd65f7b83eaf0ba610eeef3b0ede61db1c3
2007-08-16 04:30:38 +00:00
drh 0a0e131c7e Revise the amalgamation so that all symbols have file scope except those
that begin with "sqlite3_".  Ticket #2554. (CVS 4197)

FossilOrigin-Name: 73db545289a1a99bd48b22895d2a3ee86540f107
2007-08-07 17:04:59 +00:00
drh 6615095629 Rework the UTF8 reader logic in order to avoid the use of malloc().
Ticket #2523. (CVS 4175)

FossilOrigin-Name: 9a059cb6bced5cdc950f7816602ac92d89a899be
2007-07-23 19:12:41 +00:00
danielk1977 7677c0cc62 Add some code to MemTranslate() to prevent the READ_UTF8() macro from overreading a buffer. (CVS 4033)
FossilOrigin-Name: 0595319cd716611bb5a12eb952e395283ea749bb
2007-05-23 16:23:09 +00:00
danielk1977 92182323e0 Remove the SKIP_UTF16 macros (they are no longer in use). (CVS 4018)
FossilOrigin-Name: 73e654fbdc791daa10c49557bf479f152586ac28
2007-05-16 18:23:05 +00:00
danielk1977 a9c16b0a38 Fix handling of utf-16 encoding of code point 0xE000. (CVS 4017)
FossilOrigin-Name: bfc35ce8673ce51f726535b90c1d86be272848bb
2007-05-16 18:11:41 +00:00
drh f076504b1c Remove the alternative UTF-16 implementation of SUBSTR(). It does not
work anymore and the UTF-8 version can do everything that the UTF-16
version does. (CVS 4009)

FossilOrigin-Name: 9b91502ef0ea9c0bfb8362c4b70314dc8449eb9e
2007-05-15 14:40:11 +00:00
drh 4a919118d3 A new approach for UTF-8 translation. (CVS 4004)
FossilOrigin-Name: 6c8ad2790eaede90b3f1ef62614e667178b2a8c4
2007-05-15 11:55:09 +00:00
drh 53c1402157 Add some UTF-8 test infrastructure. Treat NaN as NULL. The printf routines
print infinity as "Inf" not as "NaN".  Ticket #2345. (CVS 3972)

FossilOrigin-Name: ffe615a71107a38b6f60c7baf4284a5b0aecdc22
2007-05-10 17:23:11 +00:00
drh ee85813c94 Fix the amalgamation generator so that all non-API functions have file scope. (CVS 3958)
FossilOrigin-Name: e9f56ead0514f3eac75807ea710c1f035b8add4f
2007-05-08 20:37:38 +00:00
drh 38def05454 Increase test coverage by statically defining SQLITE_BIGENDIAN and related
macros for ix86 platforms.  Still a run-time test for other architectures.
Need to add additional cases to cover other popular processors. (CVS 3781)

FossilOrigin-Name: 476e7c3fcc69d8b21d161c758aaa5ef7163abb15
2007-03-31 15:27:59 +00:00
drh b3fa0e0146 When converting UTF8 or UTF16 strings, change overlong strings and other
illegal codes to 0xFFFD.  Ticket #2029. (CVS 3479)

FossilOrigin-Name: 0c6736df9cb4c3c8f6224e30df939cead9cd5369
2006-10-19 01:58:43 +00:00
drh bb2abb2c09 Fix another UTF conversion problem on x64. Ticket #2008. (CVS 3466)
FossilOrigin-Name: d16523e555afa1e6e89409f614fd665261fa3865
2006-10-05 11:43:53 +00:00
drh a39f4c5c8b Fix UTF conversions for -O2 on gcc 4.1.1. Ticket #2008. (CVS 3464)
FossilOrigin-Name: 86a08bb7c5da42fbeb5a026287d67912a2ffb7f1
2006-10-04 15:23:21 +00:00
drh 66f4a06259 Fix an overzealous assert() in the UTF-16 to UTF-8 converter. (CVS 3338)
FossilOrigin-Name: 096bd8212fa06c7271fc24280133d1f0864ffb42
2006-07-26 14:57:30 +00:00
drh a49b8611b9 Allocate enough memory for the worst-case UTF-16 to UTF-8 conversion.
Ticket #1773. (CVS 3174)

FossilOrigin-Name: 2a0120c0f06d17185ede773729d97c93f90923ff
2006-04-16 12:05:03 +00:00
drh 74161705f1 Remove unused parameters on internal APIs. Suppress warnings from
CodeWarrior. (CVS 3110)

FossilOrigin-Name: 4b22e4b847f8d5c29830baea541194ef3a0c4811
2006-02-24 02:53:49 +00:00