Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/public-domain/sqlite merge 3.17.0
details: https://anonhg.NetBSD.org/src/rev/5bb75b763c70
branches: trunk
changeset: 352039:5bb75b763c70
user: christos <christos%NetBSD.org@localhost>
date: Sat Mar 11 16:29:51 2017 +0000
description:
merge 3.17.0
diffstat:
external/public-domain/sqlite/bin/sqlite3.1 | 190 +
external/public-domain/sqlite/dist/shell.c | 893 +-
external/public-domain/sqlite/dist/sqlite3.1 | 190 -
external/public-domain/sqlite/dist/sqlite3.c | 18633 ++++++---
external/public-domain/sqlite/lib/shlib_version | 4 +-
external/public-domain/sqlite/man/Makefile | 11 +-
external/public-domain/sqlite/man/SQLITE_ACCESS_EXISTS.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_CHANGESET_DATA.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_CHANGESET_OMIT.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_CHECKPOINT_PASSIVE.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_CONFIG_SINGLETHREAD.3 | 4 +-
external/public-domain/sqlite/man/SQLITE_CREATE_INDEX.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_DBCONFIG_MAINDBNAME.3 | 137 +
external/public-domain/sqlite/man/SQLITE_DBSTATUS_LOOKASIDE_USED.3 | 15 +-
external/public-domain/sqlite/man/SQLITE_DENY.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_DETERMINISTIC.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_FCNTL_LOCKSTATE.3 | 14 +-
external/public-domain/sqlite/man/SQLITE_INDEX_CONSTRAINT_EQ.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_INDEX_SCAN_UNIQUE.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_INTEGER.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_IOCAP_ATOMIC.3 | 4 +-
external/public-domain/sqlite/man/SQLITE_IOERR_READ.3 | 10 +-
external/public-domain/sqlite/man/SQLITE_LIMIT_LENGTH.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_LOCK_NONE.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_MUTEX_FAST.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_OK.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_OPEN_READONLY.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_ROLLBACK.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_SCANSTAT_NLOOP.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_SHM_NLOCK.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_SHM_UNLOCK.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_STATUS_MEMORY_USED.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_STMTSTATUS_FULLSCAN_STEP.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_SYNC_NORMAL.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_TESTCTRL_FIRST.3 | 4 +-
external/public-domain/sqlite/man/SQLITE_TRACE_STMT.3 | 65 +
external/public-domain/sqlite/man/SQLITE_UTF8.3 | 2 +-
external/public-domain/sqlite/man/SQLITE_VERSION.3 | 7 +-
external/public-domain/sqlite/man/SQLITE_VTAB_CONSTRAINT_SUPPORT.3 | 2 +-
external/public-domain/sqlite/man/sqlite3.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_aggregate_context.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_aggregate_count.3 | 14 +-
external/public-domain/sqlite/man/sqlite3_api_routines.3 | 13 +
external/public-domain/sqlite/man/sqlite3_auto_extension.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_backup.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_backup_init.3 | 12 +-
external/public-domain/sqlite/man/sqlite3_bind_blob.3 | 26 +-
external/public-domain/sqlite/man/sqlite3_bind_parameter_count.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_bind_parameter_index.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_bind_parameter_name.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_blob.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_blob_bytes.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_blob_close.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_blob_open.3 | 13 +-
external/public-domain/sqlite/man/sqlite3_blob_read.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_blob_reopen.3 | 13 +-
external/public-domain/sqlite/man/sqlite3_blob_write.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_busy_handler.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_busy_timeout.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_cancel_auto_extension.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_changegroup.3 | 9 +
external/public-domain/sqlite/man/sqlite3_changes.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_changeset_iter.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_clear_bindings.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_close.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_collation_needed.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_column_blob.3 | 22 +-
external/public-domain/sqlite/man/sqlite3_column_count.3 | 13 +-
external/public-domain/sqlite/man/sqlite3_column_database_name.3 | 14 +-
external/public-domain/sqlite/man/sqlite3_column_decltype.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_column_name.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_commit_hook.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_compileoption_used.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_complete.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_config.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_context.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_context_db_handle.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_create_collation.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_create_function.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_create_module.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_data_count.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_data_directory.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_db_cacheflush.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_db_config.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_db_filename.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_db_handle.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_db_mutex.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_db_readonly.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_db_release_memory.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_db_status.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_declare_vtab.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_destructor_type.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_enable_load_extension.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_enable_shared_cache.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_errcode.3 | 12 +-
external/public-domain/sqlite/man/sqlite3_exec.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_extended_result_codes.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_file.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_file_control.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_finalize.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_get_autocommit.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_get_auxdata.3 | 14 +-
external/public-domain/sqlite/man/sqlite3_get_table.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_index_info.3 | 7 +-
external/public-domain/sqlite/man/sqlite3_initialize.3 | 10 +-
external/public-domain/sqlite/man/sqlite3_interrupt.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_io_methods.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_last_insert_rowid.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_limit.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_load_extension.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_log.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_malloc.3 | 14 +-
external/public-domain/sqlite/man/sqlite3_mem_methods.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_memory_used.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_module.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_mprintf.3 | 10 +-
external/public-domain/sqlite/man/sqlite3_mutex.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_mutex_alloc.3 | 12 +-
external/public-domain/sqlite/man/sqlite3_mutex_held.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_mutex_methods.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_next_stmt.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_open.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_overload_function.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_pcache.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_pcache_methods2.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_pcache_page.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_prepare.3 | 10 +-
external/public-domain/sqlite/man/sqlite3_preupdate_hook.3 | 37 +-
external/public-domain/sqlite/man/sqlite3_progress_handler.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_randomness.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_release_memory.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_reset.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_reset_auto_extension.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_result_blob.3 | 40 +-
external/public-domain/sqlite/man/sqlite3_result_subtype.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_session.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_set_authorizer.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_sleep.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_snapshot.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_snapshot_cmp.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_snapshot_free.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_snapshot_get.3 | 36 +-
external/public-domain/sqlite/man/sqlite3_snapshot_open.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_snapshot_recover.3 | 28 +
external/public-domain/sqlite/man/sqlite3_soft_heap_limit.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_soft_heap_limit64.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_sql.3 | 46 +-
external/public-domain/sqlite/man/sqlite3_status.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_step.3 | 9 +-
external/public-domain/sqlite/man/sqlite3_stmt.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_stmt_busy.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_stmt_readonly.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_stmt_scanstatus.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_stmt_scanstatus_reset.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_stmt_status.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_strglob.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_stricmp.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_strlike.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_system_errno.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_table_column_metadata.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_temp_directory.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_test_control.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_threadsafe.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_total_changes.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_trace.3 | 13 +-
external/public-domain/sqlite/man/sqlite3_trace_v2.3 | 45 +
external/public-domain/sqlite/man/sqlite3_unlock_notify.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_update_hook.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_uri_parameter.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_user_data.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_value.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_value_blob.3 | 26 +-
external/public-domain/sqlite/man/sqlite3_value_dup.3 | 6 +-
external/public-domain/sqlite/man/sqlite3_value_subtype.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_version.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_vfs.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_vfs_find.3 | 8 +-
external/public-domain/sqlite/man/sqlite3_vtab.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_vtab_config.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_vtab_cursor.3 | 2 +-
external/public-domain/sqlite/man/sqlite3_vtab_on_conflict.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_wal_autocheckpoint.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_wal_checkpoint.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_wal_checkpoint_v2.3 | 4 +-
external/public-domain/sqlite/man/sqlite3_wal_hook.3 | 4 +-
external/public-domain/sqlite/man/sqlite3changegroup_add.3 | 82 +
external/public-domain/sqlite/man/sqlite3changegroup_delete.3 | 12 +
external/public-domain/sqlite/man/sqlite3changegroup_new.3 | 4 +-
external/public-domain/sqlite/man/sqlite3changegroup_output.3 | 36 +
external/public-domain/sqlite/man/sqlite3changeset_apply.3 | 22 +-
external/public-domain/sqlite/man/sqlite3changeset_apply_strm.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_concat.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_conflict.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_finalize.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_fk_conflicts.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_invert.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_new.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_next.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_old.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_op.3 | 2 +-
external/public-domain/sqlite/man/sqlite3changeset_pk.3 | 6 +-
external/public-domain/sqlite/man/sqlite3changeset_start.3 | 4 +-
external/public-domain/sqlite/man/sqlite3session_attach.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_changeset.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_create.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_delete.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_diff.3 | 4 +-
external/public-domain/sqlite/man/sqlite3session_enable.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_indirect.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_isempty.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_patchset.3 | 2 +-
external/public-domain/sqlite/man/sqlite3session_table_filter.3 | 4 +-
external/public-domain/sqlite/man/sqlite_int64.3 | 4 +-
213 files changed, 13589 insertions(+), 7886 deletions(-)
diffs (truncated from 41120 to 300 lines):
diff -r 598a11d9c1d1 -r 5bb75b763c70 external/public-domain/sqlite/bin/sqlite3.1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/public-domain/sqlite/bin/sqlite3.1 Sat Mar 11 16:29:51 2017 +0000
@@ -0,0 +1,190 @@
+.\" $NetBSD: sqlite3.1,v 1.1 2017/03/11 16:29:51 christos Exp $
+.Dd December 16, 2012
+.Dt SQLITE3 1
+.Os
+.Sh NAME
+.Nm sqlite3
+.Nd A command line interface for SQLite version 3
+.Sh SYNOPSIS
+.Nm
+.Op Ar options
+.Op Ar databasefile
+.Op Ar SQL
+.Sh DESCRIPTION
+.Nm
+is a terminal-based front-end to the SQLite library that can evaluate
+queries interactively and display the results in multiple formats.
+.Nm
+can also be used within shell scripts and other applications to provide
+batch processing features.
+.Pp
+To start a
+.Nm
+interactive session, invoke the
+.Nm
+command and optionally provide the name of a database file.
+If the database file does not exist, it will be created.
+If the database file does exist, it will be opened.
+.Pp
+For example, to create a new database file named "mydata.db", create
+a table named "memos" and insert a couple of records into that table:
+.Bd -literal -offset indent
+$ sqlite3 mydata.db
+SQLite version 3.1.3
+Enter ".help" for instructions
+sqlite> create table memos(text, priority INTEGER);
+sqlite> insert into memos values('deliver project description', 10);
+sqlite> insert into memos values('lunch with Christine', 100);
+sqlite> select * from memos;
+deliver project description|10
+lunch with Christine|100
+sqlite>
+.Ed
+.Pp
+If no database name is supplied, the
+.Em ATTACH
+sql command can be used
+to attach to existing or create new database files.
+.Em ATTACH
+can also be used to attach to multiple databases within the same
+interactive session.
+This is useful for migrating data between databases,
+possibly changing the schema along the way.
+.Pp
+Optionally, a SQL statement or set of SQL statements can be supplied as
+a single argument.
+Multiple statements should be separated by semi-colons.
+.Pp
+For example:
+.Bd -literal -offset indent
+$ sqlite3 -line mydata.db 'select * from memos where priority > 20;'
+ text = lunch with Christine
+ priority = 100
+.Ed
+.Ss SQLITE META-COMMANDS
+The interactive interpreter offers a set of meta-commands that can be
+used to control the output format, examine the currently attached
+database files, or perform administrative operations upon the
+attached databases (such as rebuilding indices).
+Meta-commands are always prefixed with a dot
+.Dq \&. .
+.Pp
+A list of available meta-commands can be viewed at any time by issuing
+the '.help' command.
+For example:
+.Bd -literal -offset indent
+sqlite> .help
+\&.databases List names and files of attached databases
+\&.dump ?TABLE? ... Dump the database in an SQL text format
+\&.echo ON|OFF Turn command echo on or off
+\&.exit Exit this program
+\&.explain ON|OFF Turn output mode suitable for EXPLAIN on or off.
+\&.header(s) ON|OFF Turn display of headers on or off
+\&.help Show this message
+\&.import FILE TABLE Import data from FILE into TABLE
+\&.indices TABLE Show names of all indices on TABLE
+\&.mode MODE ?TABLE? Set output mode where MODE is one of:
+ csv Comma-separated values
+ column Left-aligned columns. (See .width)
+ html HTML <table> code
+ insert SQL insert statements for TABLE
+ line One value per line
+ list Values delimited by .separator string
+ tabs Tab-separated values
+ tcl TCL list elements
+\&.nullvalue STRING Print STRING in place of NULL values
+\&.output FILENAME Send output to FILENAME
+\&.output stdout Send output to the screen
+\&.prompt MAIN CONTINUE Replace the standard prompts
+\&.quit Exit this program
+\&.read FILENAME Execute SQL in FILENAME
+\&.schema ?TABLE? Show the CREATE statements
+\&.separator STRING Change separator used by output mode and .import
+\&.show Show the current values for various settings
+\&.tables ?PATTERN? List names of tables matching a LIKE pattern
+\&.timeout MS Try opening locked tables for MS milliseconds
+\&.width NUM NUM ... Set column widths for "column" mode
+sqlite>
+.Ed
+.Sh OPTIONS
+.Nm
+has the following options:
+.Bl -tag -width abcdefghij
+.It Fl init Ar file
+Read and execute commands from
+.Ar file ,
+which can contain a mix of SQL statements and meta-commands.
+.It Fl echo
+Print commands before execution.
+.It Fl header
+Turn headers on.
+.It Fl noheader
+Turn headers off.
+.It Fl column
+Query results will be displayed in a table like form, using
+whitespace characters to separate the columns and align the
+output.
+.It Fl html
+Query results will be output as simple HTML tables.
+.It Fl line
+Query results will be displayed with one value per line, rows
+separated by a blank line.
+Designed to be easily parsed by scripts or other programs
+.It Fl list
+Query results will be displayed with the separator (|, by default)
+character between each field value.
+.It Fl separator Ar separator
+Set output field separator.
+Default is
+.Dq | .
+.It Fl nullvalue Ar string
+Set
+.Ar string
+used to represent
+.Dv NULL
+values.
+Default is
+.Dq \e
+(empty string).
+.It Fl version
+Show SQLite version.
+.It Fl help
+Show help on options and exit.
+.El
+.Ss INIT FILE
+.Nm
+reads an initialization file to set the configuration of the
+interactive environment.
+Throughout initialization, any previously specified setting can be overridden.
+The sequence of initialization is as follows:
+.Bl -enum
+.It
+The default configuration is established as follows:
+.Bd -literal -offset indent
+mode = LIST
+separator = "|"
+main prompt = "sqlite> "
+continue prompt = " ...> "
+.Ed
+.It
+If the file
+.Pa ~/.sqliterc
+exists, it is processed first.
+can be found in the user's home directory, it is
+read and processed.
+It should generally only contain meta-commands.
+.It
+If the
+.Fl init
+option is present, the specified file is processed.
+.It
+All other command line options are processed.
+.El
+.Sh SEE ALSO
+.Lk http://www.sqlite.org/
+.Sh AUTHORS
+This manual page was originally written by Andreas Rottmann
+.Aq rotty%debian.org@localhost ,
+for the Debian GNU/Linux system (but may be used by others).
+It was subsequently revised by Bill Bumgarner
+.Aq bbum%mac.com@localhost .
diff -r 598a11d9c1d1 -r 5bb75b763c70 external/public-domain/sqlite/dist/shell.c
--- a/external/public-domain/sqlite/dist/shell.c Sat Mar 11 16:06:35 2017 +0000
+++ b/external/public-domain/sqlite/dist/shell.c Sat Mar 11 16:29:51 2017 +0000
@@ -143,6 +143,7 @@
extern char *sqlite3_win32_unicode_to_utf8(LPCWSTR);
extern char *sqlite3_win32_mbcs_to_utf8_v2(const char *, int);
extern char *sqlite3_win32_utf8_to_mbcs_v2(const char *, int);
+extern LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText);
#endif
/* On Windows, we normally run with output mode of TEXT so that \n characters
@@ -524,7 +525,7 @@
#if defined(_WIN32) || defined(WIN32)
/* For interactive input on Windows systems, translate the
** multi-byte characterset characters into UTF-8. */
- if( stdin_is_interactive ){
+ if( stdin_is_interactive && in==stdin ){
char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
if( zTrans ){
int nTrans = strlen30(zTrans)+1;
@@ -626,8 +627,10 @@
int normalMode; /* Output mode before ".explain on" */
int writableSchema; /* True if PRAGMA writable_schema=ON */
int showHeader; /* True to show column names in List or Column mode */
+ int nCheck; /* Number of ".check" commands run */
unsigned shellFlgs; /* Various flags */
char *zDestTable; /* Name of destination table when MODE_Insert */
+ char zTestcase[30]; /* Name of current test case */
char colSeparator[20]; /* Column separator character for several modes */
char rowSeparator[20]; /* Row separator character for MODE_Ascii */
int colWidth[100]; /* Requested width of each column when in column mode*/
@@ -665,11 +668,12 @@
#define MODE_Semi 3 /* Same as MODE_List but append ";" to each line */
#define MODE_Html 4 /* Generate an XHTML table */
#define MODE_Insert 5 /* Generate SQL "insert" statements */
-#define MODE_Tcl 6 /* Generate ANSI-C or TCL quoted elements */
-#define MODE_Csv 7 /* Quote strings, numbers are plain */
-#define MODE_Explain 8 /* Like MODE_Column, but do not truncate data */
-#define MODE_Ascii 9 /* Use ASCII unit and record separators (0x1F/0x1E) */
-#define MODE_Pretty 10 /* Pretty-print schemas */
+#define MODE_Quote 6 /* Quote values as for SQL */
+#define MODE_Tcl 7 /* Generate ANSI-C or TCL quoted elements */
+#define MODE_Csv 8 /* Quote strings, numbers are plain */
+#define MODE_Explain 9 /* Like MODE_Column, but do not truncate data */
+#define MODE_Ascii 10 /* Use ASCII unit and record separators (0x1F/0x1E) */
+#define MODE_Pretty 11 /* Pretty-print schemas */
static const char *modeDescr[] = {
"line",
@@ -678,6 +682,7 @@
"semi",
"html",
"insert",
+ "quote",
"tcl",
"csv",
"explain",
@@ -894,6 +899,7 @@
}
#endif
+#ifndef SQLITE_OMIT_AUTHORIZATION
/*
** When the ".auth ON" is set, the following authorizer callback is
** invoked. It always returns SQLITE_OK.
@@ -926,7 +932,7 @@
az[1] = zA2;
az[2] = zA3;
az[3] = zA4;
- raw_printf(p->out, "authorizer: %s", azAction[op]);
+ utf8_printf(p->out, "authorizer: %s", azAction[op]);
for(i=0; i<4; i++){
raw_printf(p->out, " ");
if( az[i] ){
@@ -938,7 +944,27 @@
raw_printf(p->out, "\n");
return SQLITE_OK;
}
-
+#endif
+
+/*
+** Print a schema statement. Part of MODE_Semi and MODE_Pretty output.
+**
+** This routine converts some CREATE TABLE statements for shadow tables
+** in FTS3/4/5 into CREATE TABLE IF NOT EXISTS statements.
+*/
+static void printSchemaLine(FILE *out, const char *z, const char *zTail){
+ if( sqlite3_strglob("CREATE TABLE ['\"]*", z)==0 ){
+ utf8_printf(out, "CREATE TABLE IF NOT EXISTS %s%s", z+13, zTail);
+ }else{
+ utf8_printf(out, "%s%s", z, zTail);
+ }
+}
+static void printSchemaLineN(FILE *out, char *z, int n, const char *zTail){
+ char c = z[n];
+ z[n] = 0;
+ printSchemaLine(out, z, zTail);
+ z[n] = c;
+}
/*
** This is the callback routine that the shell
@@ -1057,7 +1083,7 @@
break;
}
Home |
Main Index |
Thread Index |
Old Index