From fda5846704ec9218b78ed5ed06f58b7391369a1a Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Tue, 8 Nov 2022 15:49:52 +0000 Subject: MDEV-29397 CONNECT engine: Fix note turning into error (#2325) * MDEV-29397 Fix note turning into error ODBC Rewind triggered an error with no SQL, but this is sometimes a valid condition (as can be seen with other classes). Setting this to a 0 return stops errors firing when they shouldn't. Also fixes ASAN hits from in MDEV-29687 tabext.cpp. --- storage/connect/odbconn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage/connect/odbconn.cpp') diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 33c2b0aaf70..e83f1b5f04c 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -2582,7 +2582,7 @@ int ODBConn::Rewind(char *sql, ODBCCOL *tocols) int rc, rbuf = -1; if (!m_hstmt) - rbuf = -1; + rbuf = 0; else if (m_Full) rbuf = m_Rows; // No need to "rewind" else if (m_Scrollable) { -- cgit v1.2.1