diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2011-11-18 22:20:47 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2011-11-18 22:20:47 +0000 |
commit | 6b8b13ec2dc170236f4e4a74e60a178ea982ba1e (patch) | |
tree | 411013c575c3de0a9ae0100ced9b69f6bd280153 | |
parent | cd9680e241453d7e95c4385868ce79121fc49601 (diff) |
Fix a change in behavior in 'database show' from 1.8.
In 1.8 and previous versions, one could use any fullword portion of the key
name, including the full key, to obtain the record. Until this patch, this
did not work for the full key.
Closes issue ASTERISK-18886
Patch: by tilghman
Review: by twilson (http://pastebin.com/7rtu6bpk) on #asterisk-dev
........
Merged revisions 345640 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/db.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -117,9 +117,9 @@ static void db_sync(void); DEFINE_SQL_STATEMENT(put_stmt, "INSERT OR REPLACE INTO astdb (key, value) VALUES (?, ?)") DEFINE_SQL_STATEMENT(get_stmt, "SELECT value FROM astdb WHERE key=?") DEFINE_SQL_STATEMENT(del_stmt, "DELETE FROM astdb WHERE key=?") -DEFINE_SQL_STATEMENT(deltree_stmt, "DELETE FROM astdb WHERE key LIKE ? || '/' || '%'") +DEFINE_SQL_STATEMENT(deltree_stmt, "DELETE FROM astdb WHERE key || '/' LIKE ? || '/' || '%'") DEFINE_SQL_STATEMENT(deltree_all_stmt, "DELETE FROM astdb") -DEFINE_SQL_STATEMENT(gettree_stmt, "SELECT key, value FROM astdb WHERE key LIKE ? || '/' || '%'") +DEFINE_SQL_STATEMENT(gettree_stmt, "SELECT key, value FROM astdb WHERE key || '/' LIKE ? || '/' || '%'") DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value FROM astdb") DEFINE_SQL_STATEMENT(showkey_stmt, "SELECT key, value FROM astdb WHERE key LIKE '%' || '/' || ?") DEFINE_SQL_STATEMENT(create_astdb_stmt, "CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PRIMARY KEY(key))") |