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

3rd argument to sqlite3Error() should always be a format string, never

user-supplied error message text.  Ticket #1354. (CVS 2583)

FossilOrigin-Name: d6146a542aacd10d349d432fe343cc17cc3b3ab5
This commit is contained in:
drh
2005-08-12 23:20:53 +00:00
parent bb7ac00bf0
commit 2501eb1df6
4 changed files with 20 additions and 10 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing built-in functions.
#
# $Id: func.test,v 1.36 2005/06/25 18:42:16 drh Exp $
# $Id: func.test,v 1.37 2005/08/12 23:20:53 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -485,6 +485,16 @@ do_test func-16.1 {
}
} {X'616263' NULL}
# Correctly handle function error messages that include %. Ticket #1354
#
do_test func-17.1 {
proc testfunc1 args {error "Error %d with %s percents %p"}
db function testfunc1 ::testfunc1
catchsql {
SELECT testfunc1(1,2,3);
}
} {1 {Error %d with %s percents %p}}
finish_test