Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.0.5
-
None
-
MariaDB 10.2.13 on FreeBSD 11.1, Client Windows 10 with ODBC Connector 3.0.5
Description
We are having issues with the creation of temporary tables through the MariaDB ODBC Connector.
The statements we are issuing:
DROP TABLE IF EXISTS _temp_statistics;
|
CREATE TEMPORARY TABLE _temp_statistics AS (SELECT * FROM INFORMATION_SCHEMA.STATISTICS);
|
SELECT * FROM _temp_statistics;
|
We execute these statements in a single query like so:
using (var connection = new OdbcConnection(connectionString)) |
{
|
connection.Open();
|
using (var command = connection.CreateCommand())
|
{
|
command.CommandText = Resource.CreateAndSelectTempTable;
|
int result = command.ExecuteNonQuery(); |
}
|
}
|
The error we get is:
" ERROR [42S02] [ma-3.0.5][10.2.13-MariaDB-log]Table 'DB._temp_statistics' doesn't exist"
However if we execute this in multiple queries it does work. Like so:
using (var connection = new OdbcConnection(connectionString)) |
{
|
int result; |
connection.Open();
|
using (var command = connection.CreateCommand())
|
{
|
command.CommandText = Resource.DropTempTable;
|
result = command.ExecuteNonQuery();
|
}
|
using (var command = connection.CreateCommand())
|
{
|
command.CommandText = Resource.CreateTempTable;
|
result = command.ExecuteNonQuery();
|
}
|
using (var command = connection.CreateCommand())
|
{
|
command.CommandText = Resource.SelectTempTable;
|
result = command.ExecuteNonQuery();
|
}
|
}
|
Is there a bug concering multiple statements in a single query and temporary tables?
Both versions do work with the mysql connector. I have also attached the general logfile for the case when the command fails.
Like always i am happy to provide more information on this as needed.