]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
sort the complete sql stmts to get proper ordering on tab complete
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 6 Jul 2010 17:02:50 +0000 (12:02 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 6 Jul 2010 17:03:09 +0000 (12:03 -0500)
src/switch_console.c
src/switch_core_sqldb.c

index 9f8a15c0ec4ef7df3eef8e525a3e6a825fcb54a2..353a30319d7c941de5c753d28341ac918df9b19f 100644 (file)
@@ -756,7 +756,7 @@ SWITCH_DECLARE(unsigned char) switch_console_complete(const char *line, const ch
                        }
                }
 
-               stream.write_function(&stream, " and hostname='%s'", switch_core_get_variable("hostname"));
+               stream.write_function(&stream, " and hostname='%s' order by a1,a2,a3,a4,a5,a6,a7,a8,a9,a10", switch_core_get_variable("hostname"));
                switch_cache_db_execute_sql_callback(db, stream.data, comp_callback, &h, &errmsg);
 
                if (errmsg) {
index e9849502bece4b8041a89f93affd959fbf5f9930..7fc32c0a3f272b7e6de79643a079e1934ba1ea4c 100644 (file)
@@ -1491,6 +1491,7 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_
        switch_cache_db_execute_sql(dbh, "create index complete8 on complete (a8,hostname)", NULL);
        switch_cache_db_execute_sql(dbh, "create index complete9 on complete (a9,hostname)", NULL);
        switch_cache_db_execute_sql(dbh, "create index complete10 on complete (a10,hostname)", NULL);
+       switch_cache_db_execute_sql(dbh, "create index complete11 on complete (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,hostname)", NULL);
        switch_cache_db_execute_sql(dbh, "create index nat_map_port_proto on nat (port,proto,hostname)", NULL);
        switch_cache_db_execute_sql(dbh, "create index channels1 on channels(hostname)", NULL);
        switch_cache_db_execute_sql(dbh, "create index calls1 on calls(hostname)", NULL);