diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-08 15:39:52 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-08 15:39:52 +0000 |
commit | 48a9dbecbfd574688bff9713ec4e376387707942 (patch) | |
tree | 5bd03fdd807b49b627335f97c6a84a3117f88310 /cdr | |
parent | 1beea4a70f3e7b964a3fbc4e9c5704433dab662c (diff) |
Merged revisions 269006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r269006 | seanbright | 2010-06-08 11:28:49 -0400 (Tue, 08 Jun 2010) | 11 lines
Reduce startup time for cdr_tds with large CDR tables.
Since we are just checking for table existence, add a WHERE clause that will
return no rows but will raise an error if the table doesn't exist.
(closes issue #17380)
Reported by: kkwong
Patches:
issue17380-01.patch uploaded by seanbright (license 71)
Tested by: kkwong
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@269007 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r-- | cdr/cdr_tds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cdr/cdr_tds.c b/cdr/cdr_tds.c index 4fcccae62..c615400d3 100644 --- a/cdr/cdr_tds.c +++ b/cdr/cdr_tds.c @@ -357,7 +357,7 @@ static int mssql_connect(void) goto failed; } - if (execute_and_consume(settings->dbproc, "SELECT 1 FROM [%s]", settings->table)) { + if (execute_and_consume(settings->dbproc, "SELECT 1 FROM [%s] WHERE 1 = 0", settings->table)) { ast_log(LOG_ERROR, "Unable to find table '%s'\n", settings->table); goto failed; } |