Skip to content

Commit

Permalink
Fixed small bug - SQLGetInfo returned a bit wrong value for SQL_DRIVE…
Browse files Browse the repository at this point in the history
…R_NAME info type.

And completely wrong on *nix
  • Loading branch information
lawrinn committed May 24, 2016
1 parent fbd517e commit f347cea
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ma_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ SQLRETURN MADB_DbcGetInfo(MADB_Dbc *Dbc, SQLUSMALLINT InfoType, SQLPOINTER InfoV
case SQL_DRIVER_NAME:
SLen= (SQLSMALLINT)MADB_SetString(isWChar ? &Dbc->charset : NULL,
(void *)InfoValuePtr, BUFFER_CHAR_LEN(BufferLength, isWChar),
isWChar ? "maodbcu.dll" : "maodbca.dll", SQL_NTS, &Dbc->Error);
MADB_DRIVER_NAME, SQL_NTS, &Dbc->Error);
break;
case SQL_DRIVER_ODBC_VER:
{
Expand Down
8 changes: 4 additions & 4 deletions ma_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ SQLRETURN MADB_GetTypeInfo(SQLHSTMT StatementHandle,
{
MADB_Stmt *Stmt= (MADB_Stmt *)StatementHandle;
SQLRETURN ret;
my_bool isFirst= TRUE;
char StmtStr[5120];
char *p= StmtStr;
int i;
my_bool isFirst= TRUE;
char StmtStr[5120];
char *p= StmtStr;
int i;
MADB_TypeInfo *TypeInfo= TypeInfoV3;

if (Stmt->Connection->Environment->OdbcVersion == SQL_OV_ODBC2)
Expand Down
1 change: 1 addition & 0 deletions ma_platform_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

//#define HAVE_UNICODE

#define MADB_DRIVER_NAME "libmaodbc.so"
#define CP_UTF8 65001

#define _strdup strdup
Expand Down
2 changes: 2 additions & 0 deletions ma_platform_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@

#include <windows.h>

#define MADB_DRIVER_NAME "maodbc.dll"

#endif /*_ma_platform_x_h_ */

0 comments on commit f347cea

Please sign in to comment.