summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2016-01-18 23:00:40 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2016-01-18 23:00:40 +0100
commitddd62ba24aa0c6f35b86a53ab6c3c97c67689ee6 (patch)
tree8d259f04007a739e0b371ebc8ab234b4d388d37c /storage
parent3e20a0d8f414124d040fda5a4981cecf533f62a2 (diff)
downloadmariadb-git-ddd62ba24aa0c6f35b86a53ab6c3c97c67689ee6.tar.gz
- Change SQL_NTS to 0 when the string is NULL
modified: storage/connect/odbconn.cpp
Diffstat (limited to 'storage')
-rw-r--r--storage/connect/odbconn.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index 1ccdf231970..3dbbcc845dc 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -2249,7 +2249,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
rc = SQLTables(hstmt, name.ptr(2), name.length(2),
name.ptr(1), name.length(1),
name.ptr(0), name.length(0),
- cap->Pat, SQL_NTS);
+ cap->Pat, cap->Pat ? SQL_NTS : 0);
break;
case CAT_COL:
// rc = SQLSetStmtAttr(hstmt, SQL_ATTR_METADATA_ID,
@@ -2258,7 +2258,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
rc = SQLColumns(hstmt, name.ptr(2), name.length(2),
name.ptr(1), name.length(1),
name.ptr(0), name.length(0),
- cap->Pat, SQL_NTS);
+ cap->Pat, cap->Pat ? SQL_NTS : 0);
break;
case CAT_KEY:
fnc = "SQLPrimaryKeys";