1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a bug in the command-line shell for ".mode insert" on UTF16 databases

with BLOB values.

FossilOrigin-Name: d8fdc7821808e2bfa048144ee3015b745232dc30
This commit is contained in:
drh
2013-09-04 16:08:50 +00:00
parent 2b1a64a120
commit 55a1b30875
4 changed files with 27 additions and 11 deletions

View File

@ -722,7 +722,11 @@ do_test shell1-3-31.1 {
# Test the output of the ".dump" command
#
do_test shell1-4.1 {
db close
forcedelete test.db
sqlite3 db test.db
db eval {
PRAGMA encoding=UTF16;
CREATE TABLE t1(x);
INSERT INTO t1 VALUES(null), (''), (1), (2.25), ('hello'), (x'807f');
}
@ -752,6 +756,14 @@ INSERT INTO t1 VALUES(X'807f');}}
# Test the output of ".mode tcl"
#
do_test shell1-4.3 {
db close
forcedelete test.db
sqlite3 db test.db
db eval {
PRAGMA encoding=UTF8;
CREATE TABLE t1(x);
INSERT INTO t1 VALUES(null), (''), (1), (2.25), ('hello'), (x'807f');
}
catchcmd test.db ".mode tcl\nselect * from t1;"
} {0 {""
""