Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.1.12
-
None
-
AlmaLinux 8.7
MariaDB connector ODBC 3.1.12
MariaDB 10.3.35
Description
When using the ODBC connector to run an OPTIMIZE TABLE query no resultset is returned, subsequent queries to the database then result in an "Unknown MySQL error".
When using isql with MariaDB connector ODBC 3.1.12
SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1; |
+-----------+ |
| object_id |
|
+-----------+ |
| 1 |
|
+-----------+ |
SQLRowCount returns 1 |
1 rows fetched |
SQL> OPTIMIZE TABLE bc_bcde_index.object; |
SQLRowCount returns 0 |
SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1; |
[S1000][ma-3.1.12][10.3.35-MariaDB]Unknown MySQL error
|
[ISQL]ERROR: Could not SQLPrepare |
When using isql with MySQL Connector/ODBC 8.0.31
SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1; |
+------------+ |
| object_id |
|
+------------+ |
| 1 |
|
+------------+ |
SQLRowCount returns 1 |
1 rows fetched |
SQL> OPTIMIZE TABLE bc_bcde_index.object; |
+---------------------------------------------------------------------------------------------------------------------------------+-----------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Table | Op | Msg_type | Msg_text | |
+---------------------------------------------------------------------------------------------------------------------------------+-----------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| bc_bcde_index.object | optimize | note | Table does not support optimize, doing recreate + analyze instead | |
| bc_bcde_index.object | optimize | status | OK |
|
+---------------------------------------------------------------------------------------------------------------------------------+-----------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
SQLRowCount returns 2 |
2 rows fetched |
SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1; |
+------------+ |
| object_id |
|
+------------+ |
| 1 |
|
+------------+ |
SQLRowCount returns 1 |
1 rows fetched |
ANALZYE TABLE does not result in the same issue.