Skip to content

Commit

Permalink
Vendor import of sqlite 3.38.5
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Aug 7, 2022
1 parent a22b677 commit adf4090
Show file tree
Hide file tree
Showing 20 changed files with 21,541 additions and 53 deletions.
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sqlite 3.38.2.
# Generated by GNU Autoconf 2.69 for sqlite 3.38.5.
#
# Report bugs to <http://www.sqlite.org>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
PACKAGE_VERSION='3.38.2'
PACKAGE_STRING='sqlite 3.38.2'
PACKAGE_VERSION='3.38.5'
PACKAGE_STRING='sqlite 3.38.5'
PACKAGE_BUGREPORT='http://www.sqlite.org'
PACKAGE_URL=''

Expand Down Expand Up @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sqlite 3.38.2 to adapt to many kinds of systems.
\`configure' configures sqlite 3.38.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1412,7 +1412,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sqlite 3.38.2:";;
short | recursive ) echo "Configuration of sqlite 3.38.5:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1537,7 +1537,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sqlite configure 3.38.2
sqlite configure 3.38.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sqlite $as_me 3.38.2, which was
It was created by sqlite $as_me 3.38.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2818,7 +2818,7 @@ fi

# Define the identity of the package.
PACKAGE='sqlite'
VERSION='3.38.2'
VERSION='3.38.5'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -14545,7 +14545,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sqlite $as_me 3.38.2, which was
This file was extended by sqlite $as_me 3.38.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -14602,7 +14602,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
sqlite config.status 3.38.2
sqlite config.status 3.38.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#

AC_PREREQ(2.61)
AC_INIT(sqlite, 3.38.2, http://www.sqlite.org)
AC_INIT(sqlite, 3.38.5, http://www.sqlite.org)
AC_CONFIG_SRCDIR([sqlite3.c])
AC_CONFIG_AUX_DIR([.])

Expand Down
18 changes: 13 additions & 5 deletions shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -14430,6 +14430,8 @@ static void exec_prepared_stmt_columnar(
int bNextLine = 0;
int bMultiLineRowExists = 0;
int bw = p->cmOpts.bWordWrap;
const char *zEmpty = "";
const char *zShowNull = p->nullValue;

rc = sqlite3_step(pStmt);
if( rc!=SQLITE_ROW ) return;
Expand Down Expand Up @@ -14491,12 +14493,14 @@ static void exec_prepared_stmt_columnar(
if( wx<0 ) wx = -wx;
if( useNextLine ){
uz = azNextLine[i];
if( uz==0 ) uz = (u8*)zEmpty;
}else if( p->cmOpts.bQuote ){
sqlite3_free(azQuoted[i]);
azQuoted[i] = quoted_column(pStmt,i);
uz = (const unsigned char*)azQuoted[i];
}else{
uz = (const unsigned char*)sqlite3_column_text(pStmt,i);
if( uz==0 ) uz = (u8*)zShowNull;
}
azData[nRow*nColumn + i]
= translateForDisplayAndDup(uz, &azNextLine[i], wx, bw);
Expand All @@ -14510,7 +14514,7 @@ static void exec_prepared_stmt_columnar(
nTotal = nColumn*(nRow+1);
for(i=0; i<nTotal; i++){
z = azData[i];
if( z==0 ) z = p->nullValue;
if( z==0 ) z = (char*)zEmpty;
n = strlenChar(z);
j = i%nColumn;
if( n>p->actualWidth[j] ) p->actualWidth[j] = n;
Expand Down Expand Up @@ -14614,7 +14618,10 @@ static void exec_prepared_stmt_columnar(
utf8_printf(p->out, "Interrupt\n");
}
nData = (nRow+1)*nColumn;
for(i=0; i<nData; i++) free(azData[i]);
for(i=0; i<nData; i++){
z = azData[i];
if( z!=zEmpty && z!=zShowNull ) free(azData[i]);
}
sqlite3_free(azData);
sqlite3_free((void*)azNextLine);
sqlite3_free(abRowDiv);
Expand Down Expand Up @@ -19040,12 +19047,12 @@ SELECT\
','||iif((cpos-1)%4>0, ' ', x'0a'||' '))\
||')' AS ColsSpec \
FROM (\
SELECT cpos, printf('\"%w\"',printf('%.*s%s', nlen-chop,name,suff)) AS cname \
SELECT cpos, printf('\"%w\"',printf('%!.*s%s', nlen-chop,name,suff)) AS cname \
FROM ColNames ORDER BY cpos\
)";
static const char * const zRenamesDone =
"SELECT group_concat("
" printf('\"%w\" to \"%w\"',name,printf('%.*s%s', nlen-chop, name, suff)),"
" printf('\"%w\" to \"%w\"',name,printf('%!.*s%s', nlen-chop, name, suff)),"
" ','||x'0a')"
"FROM ColNames WHERE suff<>'' OR chop!=0"
;
Expand Down Expand Up @@ -22644,7 +22651,8 @@ static int process_input(ShellState *p){
qss = QSS_Start;
}
}
if( nSql && QSS_PLAINDARK(qss) ){
if( nSql ){
/* This may be incomplete. Let the SQL parser deal with that. */
errCnt += runOneSqlLine(p, zSql, p->in, startline);
}
free(zSql);
Expand Down
Loading

0 comments on commit adf4090

Please sign in to comment.