Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5b6acff

Browse files
committed
Ignore leading whitespace when trying to determine statement type,
so that ODBC driver doesn't go belly up by failing to recognize aSELECT as such.
1 parentd08741e commit5b6acff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/interfaces/odbc/statement.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
#include"qresult.h"
2323
#include"convert.h"
2424
#include"environ.h"
25+
2526
#include<stdio.h>
2627
#include<string.h>
28+
#include<ctype.h>
2729

2830
#ifndefWIN32
2931
#include"iodbc.h"
@@ -353,6 +355,10 @@ statement_type(char *statement)
353355
{
354356
inti;
355357

358+
/* ignore leading whitespace in query string */
359+
while (*statement&&isspace((unsignedchar)*statement))
360+
statement++;
361+
356362
for (i=0;Statement_Type[i].s;i++)
357363
if ( !strnicmp(statement,Statement_Type[i].s,strlen(Statement_Type[i].s)))
358364
returnStatement_Type[i].type;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp