From f8da3990b5437e47b7296a6770a3efd215b326d0 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Tue, 2 Apr 2002 10:50:50 +0000 Subject: [HACKERS] Proposed patch for ODBC driver w/ C-a-n-c-e-l From: Bradley McLean Patch against 7,2 submitted for comment. This seems to work just fine; Now, when our users submit a 2 hour query with four million row sorts by accident, then cancel it 30 seconds later, it doesn't bog down the server ... --- src/interfaces/odbc/misc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/interfaces/odbc/misc.c') diff --git a/src/interfaces/odbc/misc.c b/src/interfaces/odbc/misc.c index a7bcaca8d97..df999941759 100644 --- a/src/interfaces/odbc/misc.c +++ b/src/interfaces/odbc/misc.c @@ -279,6 +279,18 @@ my_strcat(char *buf, const char *fmt, const char *s, int len) return NULL; } +char * +schema_strcat(char *buf, const char *fmt, const char *s, int len, const char *tbname, int tbnmlen) +{ + if (!s || 0 == len) + { + if (tbname && (tbnmlen > 0 || tbnmlen == SQL_NTS)) + return my_strcat(buf, fmt, "public", 6); + return NULL; + } + return my_strcat(buf, fmt, s, len); +} + void remove_newlines(char *string) -- cgit v1.2.3