summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2012-01-16 14:31:37 +0000
committerSean Bright <sean@malleable.com>2012-01-16 14:31:37 +0000
commit382d14a214308b4cd04c32751a8d725504e12516 (patch)
tree160d3d6443e8d34f66b1e5d412c43fa46dda9c69
parentef0de1358d22502e6e202f300e4669427361c6aa (diff)
Sort the output of 'database show' by key.
This more closely mimics the behavior of 'database show' before the conversion to sqlite3. ........ Merged revisions 350938 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--main/db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/db.c b/main/db.c
index 96c814515..381931b48 100644
--- a/main/db.c
+++ b/main/db.c
@@ -119,8 +119,8 @@ 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_all_stmt, "DELETE FROM astdb")
-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(gettree_stmt, "SELECT key, value FROM astdb WHERE key || '/' LIKE ? || '/' || '%' ORDER BY key")
+DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value FROM astdb ORDER BY key")
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))")