aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-09-26 13:12:19 +0000
committerdrh <>2024-09-26 13:12:19 +0000
commit2fb055366dfb68b20d313f628f180fe52801c20d (patch)
tree71684f91b406848d288d6bfacc16e6673a361bdd /src
parent8cd30e3f5b6306b8d657e3dd7376763ab10f0279 (diff)
downloadsqlite-2fb055366dfb68b20d313f628f180fe52801c20d.tar.gz
sqlite-2fb055366dfb68b20d313f628f180fe52801c20d.zip
Clarification of the meaning of the nByte parameter to sqlite3_prepare().
Comment and documentation change only - no changes to the code. FossilOrigin-Name: 92d71eee4f3a5edb3877c108d14972d80654982b0de3e635d9d008e9d3b6591f
Diffstat (limited to 'src')
-rw-r--r--src/sqlite.h.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 5546793c9..72190beec 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -4222,13 +4222,17 @@ int sqlite3_limit(sqlite3*, int id, int newVal);
** and sqlite3_prepare16_v3() use UTF-16.
**
** ^If the nByte argument is negative, then zSql is read up to the
-** first zero terminator. ^If nByte is positive, then it is the
-** number of bytes read from zSql. ^If nByte is zero, then no prepared
+** first zero terminator. ^If nByte is positive, then it is the maximum
+** number of bytes read from zSql. When nByte is positive, zSql is read
+** up to the first zero terminator or until the nByte bytes have been read,
+** whichever comes first. ^If nByte is zero, then no prepared
** statement is generated.
** If the caller knows that the supplied string is nul-terminated, then
** there is a small performance advantage to passing an nByte parameter that
** is the number of bytes in the input string <i>including</i>
** the nul-terminator.
+** Note that nByte measure the length of the input in bytes, not
+** characters, even for the UTF-16 inferfaces.
**
** ^If pzTail is not NULL then *pzTail is made to point to the first byte
** past the end of the first SQL statement in zSql. These routines only