Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/DBD/mysql.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ In this case DBD::mysql fallbacks to normal non-prepared statement and tries aga
=item mysql_server_prepare_disable_fallback
This option disable fallback to normal non-prepared statement when mysql server
This option disables fallback to normal non-prepared statement when mysql server
does not support execution of current statement as prepared.
Useful when you want to be sure that statement is going to be executed as
Expand Down
6 changes: 3 additions & 3 deletions t/40server_prepare.t
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ my $dbname = $dbh->selectrow_arrayref("SELECT DATABASE()")->[0];
$dbh->{mysql_server_prepare_disable_fallback} = 1;
my $error_handler_called = 0;
$dbh->{HandleError} = sub { $error_handler_called = 1; die $_[0]; };
eval { $dbh->prepare("USE $dbname") };
eval { $dbh->prepare('PREPARE stmt FROM "SELECT 1"') };
$dbh->{HandleError} = undef;
ok($error_handler_called, 'USE is not supported with mysql_server_prepare_disable_fallback=1');
ok($error_handler_called, 'PREPARE statement is not supported with mysql_server_prepare_disable_fallback=1');

$dbh->{mysql_server_prepare_disable_fallback} = 0;
my $sth4;
ok($sth4 = $dbh->prepare("USE $dbname"), 'USE is supported with mysql_server_prepare_disable_fallback=0');
ok($sth4 = $dbh->prepare('PREPARE stmt FROM "SELECT 1"'), 'PREPARE statement is supported with mysql_server_prepare_disable_fallback=0');
ok($sth4->execute());
ok($sth4->finish());

Expand Down
4 changes: 4 additions & 0 deletions t/99compression.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ if ($dbh->{mysql_serverversion} < 80000) {
plan skip_all => "test requires 8.x or newer";
}

if ($dbh->{'mysql_serverinfo'} =~ 'MariaDB') {
plan skip_all => "No zstd or Compression_algorithm on MariaDB";
}

foreach my $compression ( "zlib", "zstd", "0", "1" ) {
my ($dbh, $sth, $row);

Expand Down