Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Done
-
3.1.20
-
None
-
Windows .net 4.8
Description
When I try to execute from .NET via ODBC multistatement with PREPARE and EXECUTE, it ends with exception like:
System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
|
at System.Data.Common.UnsafeNativeMethods.SQLMoreResults(OdbcStatementHandle StatementHandle)
|
at System.Data.Odbc.OdbcStatementHandle.MoreResults()
|
at System.Data.Odbc.OdbcDataReader.NextResult(Boolean disposing, Boolean allresults)
|
at System.Data.Odbc.OdbcDataReader.Close(Boolean disposing)
|
at System.Data.Odbc.OdbcDataReader.Dispose(Boolean disposing)
|
at System.Data.Common.DbDataReader.Dispose()
|
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
|
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
|
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
|
at System.Data.Odbc.OdbcCommand.ExecuteReader()
|
Example of query we executed:
SELECT COUNT(*) FROM information_schema.tables |
WHERE TABLE_SCHEMA='information_schema' AND TABLE_NAME='TABLESPACES' |
INTO @tableExists; |
|
SELECT |
IF(@tableExists>0 |
,'SELECT tablespace_name, engine, tablespace_type, logfile_group_name, extent_size FROM information_schema.tablespaces ORDER BY tablespace_name , engine' |
,'SELECT NULL LIMIT 0') |
INTO @query; |
|
PREPARE s FROM @query; |
EXECUTE s; |
|
DEALLOCATE PREPARE s; |
Is supported to use EXECUTE statment via ODBC connector?