-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t/40server_prepare.t fails #167
Comments
t/40server_prepare.t:
This test is checking if In MariaDB 10.6.2 release notes is written:
In previous versions Could you test this change if it is working with your server version? diff --git a/t/40server_prepare.t b/t/40server_prepare.t
index 6eb2cf1fd78f..d4208cd34953 100644
--- a/t/40server_prepare.t
+++ b/t/40server_prepare.t
@@ -75,7 +75,9 @@ is_deeply($dbh->selectall_arrayref('SELECT id, mydata FROM t3'), [[1, 2]]);
$dbh->{mariadb_server_prepare_disable_fallback} = 1;
my $error_handler_called = 0;
$dbh->{HandleError} = sub { $error_handler_called = 1; die $_[0]; };
-eval { $dbh->prepare("USE " . $dbh->quote_identifier($test_db)) };
+# MariaDB server since version 10.6.2 can prepare all statements except PREPARE, EXECUTE, and DEALLOCATE / DROP PREPARE. Previous MariaDB and Mysql versions cannot prepare USE statement
+my $non_preparable_statement = ($dbh->{mariadb_serverversion} >= 100602) ? q(PREPARE stmt FROM "SELECT 1") : ("USE " . $dbh->quote_identifier($test_db));
+eval { $dbh->prepare($non_preparable_statement); };
$dbh->{HandleError} = undef;
ok($error_handler_called, 'USE is not supported with mariadb_server_prepare_disable_fallback=1');
I hope that |
On Thu, 07 Apr 2022 12:21:52 -0700, pali wrote:
Could you test this change if it is working with your server version?
Works, thank you!
(Both with MariaDB and MySQL.)
|
MariaDB server version 10.6.2 and new can prepare all statements statements except PREPARE, EXECUTE, and DEALLOCATE / DROP PREPARE. So change test case for non-preparable statement to: PREPARE stmt FROM "SELECT 1" Fixes: perl5-dbi#167
New version of DBD::MariaDB with this fix was release on CPAN. |
Upstream changes: 1.23 2023-09-10 - Add a missing break (perl5-dbi/DBD-MariaDB#163) - Signal error if mariadb_db_async_result() fails (perl5-dbi/DBD-MariaDB#162) - Update links to project website, issues and years - Fix compilation with some MariaDB client library 10.2 and 10.3 versions - Fix mariadb_use_result attribute (perl5-dbi/DBD-MariaDB#173) - Fix statements with multiple result sets in asynchronous mode - Fix mariadb_sockfd attribute for Windows - Croaks when changing AutoCommit attribute fails (perl5-dbi/dbi#104) - Various documentation and tests fixes - Fix support for MariaDB Connector/C prior to 3.1.3 version - Fix usage of Win32::GetShortPathName() in Makefile.PL - Build release tarball in TAR format (instead of PAX) - Allow to query and change mariadb_multi_statements attribute - Add connect option mariadb_auth_plugin for specifying auth plugin - Fix support for MySQL 8.0+ client library (perl5-dbi/DBD-MariaDB#191) (perl5-dbi/DBD-mysql#329) - Add Github Actions CI and Cirrus CI (FreeBSD) for automated testing 1.22 2022-04-22 - Disable usage of libmysqld.a from MySQL 8.x series - Install README.pod into DBD/MariaDB/ subdirectory (perl5-dbi/DBD-MariaDB#146) - Do not export driver private C functions - Fix typo in error message - Fix compatibility with new MariaDB client and server versions (perl5-dbi/DBD-MariaDB#164) (perl5-dbi/DBD-MariaDB#167) (perl5-dbi/DBD-mysql#333)
Cloned from #164 to separate the two issues, as proposed by @pali:
Both @Tux on OpenSUSEand and me on Debian see failures in t/40server_prepare.t:
The text was updated successfully, but these errors were encountered: