1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-22 22:13:04 +03:00

First small steps toward brining trunk and apple-osx closer together.

FossilOrigin-Name: 28284ccc0d7301503f6d2d7bee9093738d52e331
This commit is contained in:
drh
2015-02-19 00:29:11 +00:00
parent 96c707a3c2
commit 883ad04985
10 changed files with 47 additions and 23 deletions

View File

@@ -291,6 +291,14 @@ static void substrFunc(
}
}
}
#ifdef SQLITE_SUBSTR_COMPATIBILITY
/* If SUBSTR_COMPATIBILITY is defined then substr(X,0,N) work the same as
** as substr(X,1,N) - it returns the first N characters of X. This
** is essentially a back-out of the bug-fix in check-in [5fc125d362df4b8]
** from 2009-02-02 for compatibility of applications that exploited the
** old buggy behavior. */
if( p1==0 ) p1 = 1; /* <rdar://problem/6778339> */
#endif
if( argc==3 ){
p2 = sqlite3_value_int(argv[2]);
if( p2<0 ){