NAME
DBIO::MySQL::Storage::MariaDB - MariaDB-specific storage for DBIO
VERSION
version 0.900004
SYNOPSIS
package MyApp::Schema;
use base 'DBIO::Schema';
__PACKAGE__->load_components('MySQL::MariaDB');
my $schema = MyApp::Schema->connect($dsn, $user, $pass);
DESCRIPTION
MariaDB-specific storage backend for DBIO: the DBIO::MySQL::Storage subclass registered for a dbi:MariaDB: DSN (DBD::MariaDB). It overrides no behaviour of its own. It exists as the registration target for the MariaDB DBI driver, and as the class the future_io transport is resolved from by convention (DBIO::MySQL::Storage::MariaDB::Async).
The DBD::MariaDB attribute names -- mariadb_insertid for the last insert id, mariadb_auto_reconnect for the auto-reconnect that is switched off on every connect -- are not chosen here. DBIO::MySQL::Storage reads them off the DBD that owns the handle ("_dbd_attribute" in DBIO::MySQL::Storage). load_components('MySQL') over a dbi:MariaDB: DSN never reaches this class, so a choice made here would miss it. This class used to override _dbh_last_insert_id and _run_connection_actions for them. The second override skipped the parent's _run_connection_actions on purpose, and with it anything the parent added there. Both are gone.
This class is auto-registered for the MariaDB DBI driver and is activated when "connection" in DBIO::MySQL::MariaDB is called.
This class is the DBD, not the engine
Everything above is a DBD::MariaDB fact, and that is the whole of what this subclass is for. It is not a statement about the server at the other end: DBD::MariaDB connects to MySQL servers just as happily, and a MariaDB server reached through a dbi:mysql: DSN lands in the parent class instead.
So no SQL dialect decision is taken here at class level, and none is left: which spelling of an upsert's attempted values the server understands, whether it has RETURNING, which locking-read grammar it has, and which spelling of the replica-status statement it answers are all properties of the engine, and all are decided in DBIO::MySQL::Storage from "_is_mariadb" in DBIO::MySQL::Storage plus the server version -- correct for all four DBD/engine combinations, where a class-level answer here is right for two of them and wrong for the other two.
Two of those are not decided here, and each would be a latent syntax error of that exact shape:
The locking-read grammar is not set by this class's
sql_maker_class(pointing at DBIO::MySQL::SQLMaker::MariaDB purely to spellfor => 'share'asLOCK IN SHARE MODE). A MariaDB server reached through adbi:mysql:DSN never gets here at all and would be handedFOR SHARE, which MariaDB has in no version; a MySQL 8 reached through DBD::MariaDB -- how this dist's live suite reaches MySQL -- does get here and would be handedLOCK IN SHARE MODE OF `t` NOWAIT, which MySQL rejects, because the legacy spelling is precisely the one that carries neitherOFnor a modifier. See "_lock_dialect" in DBIO::MySQL::Storage.The replica-status statement is not overridden here to try
SHOW REPLICA STATUSfirst. The rename is a server fact on both products and they made it at different releases -- and MySQL renamed the output columns with it, so against a MySQL 8.0.22+ replica through DBD::MariaDB the statement would succeed andis_replicatingwould then read aSlave_IO_Runningthat was no longer there. Meanwhile the parent's plainSHOW SLAVE STATUSis a syntax error on MySQL 8.4, which removed it. See "_replication_status_statement" in DBIO::MySQL::Storage.
SEE ALSO
DBIO::MySQL::MariaDB - Schema component that activates this storage
DBIO::MySQL::Storage - MySQL parent class
DBIO::MySQL - Main distribution entry point
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.