1DBD::MariaDB(3)       User Contributed Perl Documentation      DBD::MariaDB(3)
2
3
4

NAME

6       DBD::MariaDB - MariaDB and MySQL driver for the Perl5 Database
7       Interface (DBI)
8

SYNOPSIS

10         use DBI;
11
12         my $dsn = "DBI:MariaDB:database=$database;host=$hostname;port=$port";
13         my $dbh = DBI->connect($dsn, $user, $password);
14
15         my $sth = $dbh->prepare(
16             'SELECT id, first_name, last_name FROM authors WHERE last_name = ?'
17         ) or die 'prepare statement failed: ' . $dbh->errstr();
18         $sth->execute('Eggers') or die 'execution failed: ' . $dbh->errstr();
19         print $sth->rows() . " rows found.\n";
20         while (my $ref = $sth->fetchrow_hashref()) {
21             print "Found a row: id = $ref->{'id'}, fn = $ref->{'first_name'}\n";
22         }
23

EXAMPLE

25         #!/usr/bin/perl
26
27         use strict;
28         use warnings;
29         use DBI;
30
31         # Connect to the database.
32         my $dbh = DBI->connect('DBI:MariaDB:database=test;host=localhost',
33                                'joe', q(joe's password),
34                                { RaiseError => 1, PrintError => 0 });
35
36         # Drop table 'foo'. This may fail, if 'foo' doesn't exist
37         # Thus we put an eval around it.
38         eval {
39             $dbh->do('DROP TABLE foo');
40         } or do {
41             print 'Dropping foo failed: ' . $dbh->errstr() . "\n";
42         };
43
44         # Create a new table 'foo'. This must not fail, thus we don't
45         # catch errors.
46         $dbh->do('CREATE TABLE foo (id INTEGER, name VARCHAR(20))');
47
48         # INSERT some data into 'foo' using placeholders
49         $dbh->do('INSERT INTO foo VALUES (?, ?)', undef, 2, 'Jochen');
50
51         # now retrieve data from the table.
52         my $sth = $dbh->prepare('SELECT * FROM foo');
53         $sth->execute();
54         while (my $ref = $sth->fetchrow_hashref()) {
55             print "Found a row: id = $ref->{'id'}, name = $ref->{'name'}\n";
56         }
57
58         # Disconnect from the database.
59         $dbh->disconnect();
60

DESCRIPTION

62       DBD::MariaDB is the Perl5 Database Interface driver for MariaDB and
63       MySQL databases. In other words: DBD::MariaDB is an interface between
64       the Perl programming language and the MariaDB/MySQL programming API
65       that comes with the MariaDB/MySQL relational database management
66       system. Most functions provided by this programming API are supported.
67       Some rarely used functions are missing, mainly because no-one ever
68       requested them. :-)
69
70       In what follows we first discuss the use of DBD::MariaDB, because this
71       is what you will need the most. For installation, see the separate
72       document DBD::MariaDB::INSTALL. See "EXAMPLE" for a simple example
73       above.
74
75       From perl you activate the interface with the statement
76
77         use DBI;
78
79       After that you can connect to multiple MariaDB and MySQL database
80       servers and send multiple queries to any of them via a simple object
81       oriented interface. Two types of objects are available: database
82       handles and statement handles. Perl returns a database handle to the
83       connect method like so:
84
85         my $dbh = DBI->connect("DBI:MariaDB:database=$db;host=$host",
86                                $user, $password,
87                                { RaiseError => 1, PrintError => 0 });
88
89       Once you have connected to a database, you can execute SQL statements
90       with:
91
92         $dbh->do('INSERT INTO foo VALUES (?, ?)', undef, $number, $name);
93
94       See DBI do method for details. See also the bind_param method in DBI.
95       See "DATABASE HANDLES" below for more details on database handles.
96
97       If you want to retrieve results, you need to create a so-called
98       statement handle with:
99
100         my $sth = $dbh->prepare('SELECT * FROM ' . $dbh->quote_identifier($table));
101         $sth->execute();
102
103       This statement handle can be used for multiple things. First of all you
104       can retrieve a row of data:
105
106         my $row = $sth->fetchrow_hashref();
107
108       If your table has columns "ID" and "NAME", then $row will be hash ref
109       with keys "ID" and "NAME". See "STATEMENT HANDLES" below for more
110       details on statement handles.
111
112       But now for a more formal approach:
113
114   Class Methods
115       connect
116             use DBI;
117
118             my $dsn = "DBI:MariaDB:$database";
119             my $dsn = "DBI:MariaDB:database=$database;host=$hostname";
120             my $dsn = "DBI:MariaDB:database=$database;host=$hostname;port=$port";
121             my $dsn = "DBI:MariaDB:database=$database;mariadb_socket=$socket";
122
123             my $dbh = DBI->connect($dsn, $user, $password);
124
125           The database is not a required attribute, but please note that
126           MariaDB and MySQL has no such thing as a default database. If you
127           don't specify the database at connection time your active database
128           will be null and you'd need to prefix your tables with the database
129           name; i.e. "SELECT * FROM mydb.mytable".
130
131           This is similar to the behavior of the "mariadb" or "mysql" command
132           line client. Also, "SELECT DATABASE()" will return the current
133           database active for the handle.
134
135           host
136           port
137               The host, if not specified or specified as empty string or
138               "localhost", will default to a MariaDB or MySQL server running
139               on the local machine using the default for the UNIX socket. To
140               connect to a MariaDB or MySQL server on the local machine via
141               TCP, you must specify the loopback IP address 127.0.0.1 as the
142               host.
143
144               Should the MariaDB or MySQL server be running on a non-standard
145               port number, you may explicitly state the "port number" to
146               connect to in the host argument, by concatenating the
147               "hostname" and "port number" together separated by a colon
148               (":") character or by using the port argument.
149
150               To connect to a MariaDB or MySQL server on localhost using
151               TCP/IP, you must specify the host as 127.0.0.1 with the
152               optional port, e.g. 3306.
153
154               When connecting to a MariaDB or MySQL Server with IPv6, a
155               bracketed IPv6 address should be used. Example DSN:
156
157                 my $dsn = 'DBI:MariaDB:;host=[1a12:2800:6f2:85::f20:8cf];port=3306';
158
159           mariadb_client_found_rows
160               Enables (logical true value) or disables (logical false value)
161               the flag "CLIENT_FOUND_ROWS" while connecting to the MariaDB or
162               MySQL server. This has a somewhat funny effect. Without
163               mariadb_client_found_rows, if you perform a query like
164
165                 UPDATE t SET id = 1 WHERE id = 1;
166
167               then the MariaDB or MySQL engine will always return 0, because
168               no rows have changed. With mariadb_client_found_rows however,
169               it will return the number of rows that have an id 1, as some
170               people are expecting. At least for compatibility to other
171               engines.
172
173               By default mariadb_client_found_rows is enabled.
174
175           mariadb_compression
176               If your DSN contains the option "mariadb_compression=1", then
177               the communication between client and server will be compressed.
178
179           mariadb_connect_timeout
180               If your DSN contains the option "mariadb_connect_timeout=##",
181               the connect request to the server will timeout if it has not
182               been successful after the given number of seconds. Zero value
183               means infinite timeout.
184
185           mariadb_write_timeout
186               If your DSN contains the option "mariadb_write_timeout=##", the
187               write operation to the server will timeout if it has not been
188               successful after the given number of seconds. Zero value means
189               infinite timeout.
190
191           mariadb_read_timeout
192               If your DSN contains the option "mariadb_read_timeout=##", the
193               read operation to the server will timeout if it has not been
194               successful after the given number of seconds. Zero value means
195               infinite timeout.
196
197           mariadb_init_command
198               If your DSN contains the option "mariadb_init_command=SQL",
199               then this "SQL" statement is executed when connecting to the
200               MariaDB or MySQL server. It is automatically re-executed if
201               reconnection occurs.
202
203           mariadb_skip_secure_auth
204               This option is for older MySQL databases that don't have secure
205               auth set.
206
207           mariadb_read_default_file
208           mariadb_read_default_group
209               These options can be used to read a config file like
210               /etc/my.cnf or ~/.my.cnf. By default MariaDB's and MySQL's C
211               client library doesn't use any config files unlike the client
212               programs (mysql, mysqladmin, ...) that do, but outside of the C
213               client library. Thus you need to explicitly request reading a
214               config file, as in
215
216                 my $dsn = 'DBI:MariaDB:test;mariadb_read_default_file=/home/joe/my.cnf';
217                 my $dbh = DBI->connect($dsn, $user, $password);
218
219               The option mariadb_read_default_group can be used to specify
220               the default group in the config file: Usually this is the
221               "client" group, but see the following example:
222
223                 [client]
224                 host=localhost
225
226                 [perl]
227                 host=perlhost
228
229               (Note the order of the entries! The example won't work, if you
230               reverse the "[client]" and "[perl]" sections!)
231
232               If you read this config file, then you'll be typically
233               connected to "localhost". However, by using
234
235                 my $dsn = 'DBI:MariaDB:test;mariadb_read_default_group=perl;'
236                         . 'mariadb_read_default_file=/home/joe/my.cnf';
237                 my $dbh = DBI->connect($dsn, $user, $password);
238
239               you'll be connected to "perlhost". Note that if you specify a
240               default group and do not specify a file, then the default
241               config files will all be read. See the documentation of the C
242               function "mysql_options()" for details.
243
244           mariadb_socket
245               It is possible to choose the Unix socket that is used for
246               connecting to the server. This is done, for example, with
247
248                 my $dsn = 'DBI:MariaDB:database=test;'
249                         . 'mariadb_socket=/var/run/mysqld/mysqld.sock';
250
251               Usually there's no need for this option, unless you are using
252               another location for the socket than that built into the
253               client.
254
255           mariadb_ssl
256               A true value turns on the "CLIENT_SSL" flag when connecting to
257               the MariaDB or MySQL server and enforce SSL encryption. A false
258               value (which is default) disable SSL encryption with the
259               MariaDB or MySQL server.
260
261               When enabling SSL encryption you should set also other SSL
262               options, at least mariadb_ssl_ca_file or mariadb_ssl_ca_path.
263
264                 my $dsn = 'DBI:MariaDB:database=test;host=hostname;port=3306;'
265                         . 'mariadb_ssl=1;mariadb_ssl_verify_server_cert=1;'
266                         . 'mariadb_ssl_ca_file=/path/to/ca_cert.pem';
267
268               This means that your communication with the server will be
269               encrypted.
270
271           mariadb_ssl_ca_file
272               The path to a file in PEM format that contains a list of
273               trusted SSL certificate authorities.
274
275               When set MariaDB or MySQL server certificate is checked that it
276               is signed by some CA certificate in the list. Common Name value
277               is not verified unless mariadb_ssl_verify_server_cert is
278               enabled.
279
280           mariadb_ssl_ca_path
281               The path to a directory that contains trusted SSL certificate
282               authority certificates in PEM format.
283
284               When set MariaDB or MySQL server certificate is checked that it
285               is signed by some CA certificate in the list. Common Name value
286               is not verified unless mariadb_ssl_verify_server_cert is
287               enabled.
288
289               Please note that this option is supported only if your MariaDB
290               or MySQL client was compiled with OpenSSL library, and not with
291               default yaSSL library.
292
293           mariadb_ssl_verify_server_cert
294               Checks the server's Common Name value in the certificate that
295               the server sends to the client. The client verifies that name
296               against the host name the client uses for connecting to the
297               server, and the connection fails if there is a mismatch. For
298               encrypted connections, this option helps prevent man-in-the-
299               middle attacks.
300
301               Verification of the host name is disabled by default.
302
303           mariadb_ssl_client_key
304               The name of the SSL key file in PEM format to use for
305               establishing a secure connection.
306
307           mariadb_ssl_client_cert
308               The name of the SSL certificate file in PEM format to use for
309               establishing a secure connection.
310
311           mariadb_ssl_cipher
312               A list of permissible ciphers to use for connection encryption.
313               If no cipher in the list is supported, encrypted connections
314               will not work.
315
316                 mariadb_ssl_cipher=AES128-SHA
317                 mariadb_ssl_cipher=DHE-RSA-AES256-SHA:AES128-SHA
318
319           mariadb_ssl_optional
320               Setting mariadb_ssl_optional to true disables strict SSL
321               enforcement and makes SSL connection optional. This option
322               opens security hole for man-in-the-middle attacks. Default
323               value is false which means that mariadb_ssl set to true
324               enforces SSL encryption.
325
326               Due to The BACKRONYM <http://backronym.fail/> and The Riddle
327               <https://riddle.link/> vulnerabilities in libmariadb and
328               libmysqlclient libraries, enforcement of SSL encryption was not
329               possible and therefore "mariadb_ssl_optional=1" was effectively
330               set for old DBD::mysql driver prior DBD::MariaDB fork was
331               created. DBD::MariaDB with "mariadb_ssl=1" could refuse
332               connection to MariaDB or MySQL server if underlying libmariadb
333               or libmysqlclient library is vulnerable. Option
334               mariadb_ssl_optional can be used to make SSL connection
335               vulnerable.
336
337           mariadb_local_infile
338               The "LOCAL" capability for "LOAD DATA" may be disabled in the
339               MariaDB or MySQL client library by default. If your DSN
340               contains the option "mariadb_local_infile=1", "LOAD DATA LOCAL"
341               will be enabled. However, this option is ineffective if the
342               server has also been configured to disallow "LOCAL".
343
344           mariadb_multi_statements
345               Support for multiple statements separated by a semicolon (";")
346               may be enabled by using this option. Enabling this option may
347               cause problems if server-side prepared statements are also
348               enabled.
349
350           mariadb_server_prepare
351               This option is used to enable server side prepared statements.
352               By default prepared statements are not used and placeholder
353               replacement is done by DBD::MariaDB prior to sending SQL
354               statement to MariaDB or MySQL server.
355
356               This default behavior may change in the future.
357
358               To use server side prepared statements, all you need to do is
359               set the variable mariadb_server_prepare in the connect:
360
361                 my $dbh = DBI->connect(
362                     'DBI:MariaDB:database=test;host=localhost;mariadb_server_prepare=1',
363                     'user',
364                     'password',
365                     { RaiseError => 1, PrintError => 0 },
366                 );
367
368               or:
369
370                 my $dbh = DBI->connect(
371                     'DBI:MariaDB:database=test;host=localhost',
372                     'user',
373                     'password',
374                     { RaiseError => 1, PrintError => 0, mariadb_server_prepare => 1 },
375                 );
376
377               There are many benefits to using server side prepare
378               statements, mostly if you are using SQL statements with
379               placeholders or performing many inserts because of that fact
380               that a single statement is prepared to accept multiple insert
381               values.
382
383               Please note that MariaDB or MySQL server cannot prepare or
384               execute some prepared statements. In this case DBD::MariaDB
385               fallbacks to normal non-prepared statement and tries again.
386
387           mariadb_server_prepare_disable_fallback
388               This option disable fallback to normal non-prepared statement
389               when MariaDB or MySQL server does not support execution of
390               current statement as prepared.
391
392               Useful when you want to be sure that the statement is going to
393               be executed as server side prepared. Error message and code in
394               case of failure is propagated back to DBI.
395
396               This default behavior may change in the future.
397
398           mariadb_embedded_options
399               The option mariadb_embedded_options can be used to pass command
400               line options to the embedded server. When you want to start and
401               connect embedded server, use "host=embedded" in dsn as
402               connection parameter.
403
404               Example:
405
406                 use DBI;
407                 my $datadir = '/var/lib/mysql/';
408                 my $langdir = '/usr/share/mysql/english';
409                 my $dsn = 'DBI:MariaDB:host=embedded;database=test;'
410                         . "mariadb_embedded_options=--datadir=$datadir,--language=$langdir";
411                 my $dbh = DBI->connect($dsn, undef, undef);
412
413               This would start embedded server with language directory
414               $langdir, database directory $datadir and connects to database
415               "test". Embedded server does not have to be supported by
416               configured MariaDB or MySQL library. In that case
417               "DBI->connect()" returns an error.
418
419           mariadb_embedded_groups
420               The option mariadb_embedded_groups can be used to specify the
421               groups in the config file (my.cnf) which will be used to get
422               options for the embedded server. If not specified "[server]"
423               and "[embedded]" groups will be used.
424
425               Example:
426
427                 my $dsn = 'DBI:MariaDB:host=embedded;database=test;'
428                         . 'mariadb_embedded_groups=embedded_server,common';
429
430           mariadb_conn_attrs
431               The option mariadb_conn_attrs is a hash of attribute names and
432               values which can be used to send custom connection attributes
433               to the server. Some attributes like "_os", "_platform",
434               "_client_name" and "_client_version" are added by libmariadb or
435               libmysqlclient.
436
437               You can then later read these attributes from the performance
438               schema tables which can be quite helpful for profiling your
439               database or creating statistics.  You'll have to use both
440               server and client at least in version MariaDB 10.0.5 or MySQL
441               5.6 to leverage this feature. It is a good idea to provides
442               additional "program_name" attribute.
443
444                 my $dbh= DBI->connect($dsn, $user, $password, {
445                     AutoCommit => 0,
446                     mariadb_conn_attrs => {
447                         program_name => $0,
448                         foo => 'bar',
449                         wiz => 'bang'
450                     },
451                 });
452
453               Now you can select the results from the performance schema
454               tables. You can do this in the same session, but also
455               afterwards. It can be very useful to answer questions like
456               which script sent this query?
457
458                 my $results = $dbh->selectall_hashref(
459                     'SELECT * FROM performance_schema.session_connect_attrs',
460                     'ATTR_NAME'
461                 );
462
463               This returns:
464
465                 $result = {
466                     '_client_name' => {
467                         'ATTR_VALUE'       => 'libmysql',
468                         'ATTR_NAME'        => '_client_name',
469                         'ORDINAL_POSITION' => '1',
470                         'PROCESSLIST_ID'   => '3',
471                     },
472                     '_client_version' => {
473                         'ATTR_VALUE'       => '5.6.24',
474                         'ATTR_NAME'        => '_client_version',
475                         'ORDINAL_POSITION' => '7',
476                         'PROCESSLIST_ID'   => '3',
477                     },
478                     '_os' => {
479                         'ATTR_VALUE'       => 'osx10.8',
480                         'ATTR_NAME'        => '_os',
481                         'ORDINAL_POSITION' => '0',
482                         'PROCESSLIST_ID'   => '3',
483                     },
484                     '_pid' => {
485                         'ATTR_VALUE'       => '59860',
486                         'ATTR_NAME'        => '_pid',
487                         'ORDINAL_POSITION' => '2',
488                         'PROCESSLIST_ID'   => '3',
489                     },
490                     '_platform' => {
491                         'ATTR_VALUE'       => 'x86_64',
492                         'ATTR_NAME'        => '_platform',
493                         'ORDINAL_POSITION' => '4',
494                         'PROCESSLIST_ID'   => '3',
495                     },
496                     'foo' => {
497                         'ATTR_NAME'        => 'foo',
498                         'ATTR_VALUE'       => 'bar',
499                         'ORDINAL_POSITION' => '6',
500                         'PROCESSLIST_ID'   => '3',
501                     },
502                     'program_name' => {
503                         'ATTR_VALUE'       => './foo.pl',
504                         'ATTR_NAME'        => 'program_name',
505                         'ORDINAL_POSITION' => '5',
506                         'PROCESSLIST_ID'   => '3',
507                     },
508                     'wiz' => {
509                         'ATTR_VALUE'       => 'bang',
510                         'ATTR_NAME'        => 'wiz',
511                         'ORDINAL_POSITION' => '3',
512                         'PROCESSLIST_ID'   => '3',
513                     },
514                 };
515
516       data_sources
517             use DBI;
518             my @dsns = DBI->data_sources('MariaDB', {
519                 host => $hostname,
520                 port => $port,
521                 user => $username,
522                 password => $password,
523                 ...
524             });
525
526           Returns a list of all databases in dsn format suitable for connect
527           method, managed by the MariaDB or MySQL server. It accepts all
528           attributes from connect method.
529

DATABASE HANDLES

531       The DBD::MariaDB driver supports the following attributes of database
532       handles (read only):
533
534         my $errno = $dbh->{'mariadb_errno'};
535         my $error = $dbh->{'mariadb_error'};
536         my $hostinfo = $dbh->{'mariadb_hostinfo'};
537         my $info = $dbh->{'mariadb_info'};
538         my $insertid = $dbh->{'mariadb_insertid'};
539         my $protoinfo = $dbh->{'mariadb_protoinfo'};
540         my $serverinfo = $dbh->{'mariadb_serverinfo'};
541         my $ssl_cipher = $dbh->{'mariadb_ssl_cipher'};
542         my $stat = $dbh->{'mariadb_stat'};
543         my $thread_id = $dbh->{'mariadb_thread_id'};
544
545       These correspond to "mysql_errno()", "mysql_error()",
546       "mysql_get_host_info()", "mysql_info()", "mysql_insert_id()",
547       "mysql_get_proto_info()", "mysql_get_server_info()", "mysql_stat()",
548       "mysql_get_ssl_cipher()" and "mysql_thread_id()" respectively.
549
550       Portable DBI applications should not use them. Instead they should use
551       standard DBI methods: "$dbh->err()" and "$dbh->errstr()" for error
552       number and string, "$dbh->get_info($GetInfoType{SQL_SERVER_NAME})" for
553       server host name, "$dbh->get_info($GetInfoType{SQL_DBMS_NAME})" and
554       "$dbh->get_info($GetInfoType{SQL_DBMS_VER})" for server database name
555       and version, "$dbh->last_insert_id()" or "$sth->last_insert_id()" for
556       insert id.
557
558       mariadb_clientinfo
559       mariadb_clientversion
560         List information of the MariaDB or MySQL client library that
561         DBD::MariaDB was built against:
562
563           print "$dbh->{mariadb_clientinfo}\n";
564
565           5.2.0-MariaDB
566
567           print "$dbh->{mariadb_clientversion}\n";
568
569           50200
570
571         Portable DBI applications should not be interested in version of
572         underlying client library. DBD::MariaDB is there to hide any possible
573         incompatibility and works correctly with any available version.
574
575       mariadb_serverversion
576           print "$dbh->{mariadb_serverversion}\n";
577
578           50200
579
580         Portable DBI applications should use
581         "$dbh->get_info($GetInfoType{SQL_DBMS_NAME})" and
582         "$dbh->get_info($GetInfoType{SQL_DBMS_VER})" for server database name
583         and version instead.
584
585       mariadb_ssl_cipher
586         Returns the SSL encryption cipher used for the given connection to
587         the server.  In case SSL encryption was not enabled with mariadb_ssl
588         or was not established returns "undef".
589
590           my $ssl_cipher = $dbh->{mariadb_ssl_cipher};
591           if (defined $ssl_cipher) {
592               print "Connection with server is encrypted with cipher: $ssl_cipher\n";
593           } else {
594               print "Connection with server is not encrypted\n";
595           }
596
597       mariadb_dbd_stats
598           my $info_hashref = $dbh->{mariadb_dbd_stats};
599
600         DBD::MariaDB keeps track of some statistics in the mariadb_dbd_stats
601         attribute. The following stats are being maintained:
602
603         auto_reconnects_ok
604                 The number of times that DBD::MariaDB successfully
605                 reconnected to the MariaDB or MySQL server.
606
607         auto_reconnects_failed
608                 The number of times that DBD::MariaDB tried to reconnect to
609                 MariaDB or MySQL but failed.
610
611       The DBD::MariaDB driver also supports the following attributes of
612       database handles (read/write):
613
614       mariadb_auto_reconnect
615           This attribute determines whether DBD::MariaDB will automatically
616           reconnect to MariaDB or MySQL server if the connection be lost.
617           This feature defaults to off.  Setting mariadb_auto_reconnect to 1
618           is not advised if "LOCK TABLES" is used because if DBD::MariaDB
619           reconnect to MariaDB or MySQL server all table locks will be lost.
620           This attribute is ignored when AutoCommit is turned off, and when
621           AutoCommit is turned off, DBD::MariaDB will not automatically
622           reconnect to the server.
623
624           It is also possible to set the default value of the
625           mariadb_auto_reconnect attribute for the $dbh by passing it in the
626           "\%attr" hash for "DBI->connect".
627
628             $dbh->{mariadb_auto_reconnect} = 1;
629
630           or
631
632             my $dbh = DBI->connect($dsn, $user, $password, {
633                 mariadb_auto_reconnect => 1,
634             });
635
636           Note that if you are using a module or framework that performs
637           reconnections for you (for example DBIx::Connector in fixup mode),
638           this value must be set to 0.
639
640       mariadb_use_result
641           This attribute forces the driver to use "mysql_use_result()" rather
642           than "mysql_store_result()" library function. The former is faster
643           and less memory consuming, but tends to block other processes.
644           "mysql_store_result()" is the default due to that fact storing the
645           result is expected behavior with most applications.
646
647           It is possible to set the default value of the mariadb_use_result
648           attribute for the $dbh via the DSN:
649
650             my $dbh = DBI->connect('DBI:MariaDB:test;mariadb_use_result=1', $user, $pass);
651
652           You can also set it after creation of the database handle:
653
654             $dbh->{mariadb_use_result} = 0; # disable
655             $dbh->{mariadb_use_result} = 1; # enable
656
657           You can also set or unset the mariadb_use_result setting on your
658           statement handle, when creating the statement handle or after it
659           has been created. See "STATEMENT HANDLES".
660
661       mariadb_bind_type_guessing
662           This attribute causes the driver (emulated prepare statements) to
663           attempt to guess if a value being bound is a numeric value, and if
664           so, doesn't quote the value. This was created by Dragonchild and is
665           one way to deal with the performance issue of using quotes in a
666           statement that is inserting or updating a large numeric value.
667
668           CAVEAT: Even though you can insert an integer value into a
669           character column, if this column is indexed, if you query that
670           column with the integer value not being quoted, it will not use the
671           index:
672
673             MariaDB [test]> explain select * from test where value0 = '3' \G
674             *************************** 1. row ***************************
675                        id: 1
676               select_type: SIMPLE
677                     table: test
678                      type: ref
679             possible_keys: value0
680                       key: value0
681                   key_len: 13
682                       ref: const
683                      rows: 1
684                     Extra: Using index condition
685             1 row in set (0.00 sec)
686
687             MariaDB [test]> explain select * from test where value0 = 3
688                 -> \G
689             *************************** 1. row ***************************
690                        id: 1
691               select_type: SIMPLE
692                     table: test
693                      type: ALL
694             possible_keys: value0
695                       key: NULL
696                   key_len: NULL
697                       ref: NULL
698                      rows: 6
699                     Extra: Using where
700             1 row in set (0.00 sec)
701
702           See bug: <https://rt.cpan.org/Public/Bug/Display.html?id=43822>
703
704           mariadb_bind_type_guessing can be turned on via
705
706           - through DSN
707
708             my $dbh = DBI->connect('DBI:MariaDB:test', 'username', 'pass', {
709                 mariadb_bind_type_guessing => 1
710             });
711
712           - OR after handle creation
713
714             $dbh->{mariadb_bind_type_guessing} = 1;
715
716       mariadb_bind_comment_placeholders
717           This attribute causes the driver (emulated prepare statements) will
718           cause any placeholders in comments to be bound. This is not correct
719           prepared statement behavior, but some developers have come to
720           depend on this behavior.
721
722       mariadb_no_autocommit_cmd
723           This attribute causes the driver to not issue "SET AUTOCOMMIT"
724           either through explicit or using "mysql_autocommit()". This is
725           particularly useful in the case of using MySQL Proxy.
726
727           See the bug report:
728           <https://rt.cpan.org/Public/Bug/Display.html?id=46308>
729
730           mariadb_no_autocommit_cmd can be turned on when creating the
731           database handle:
732
733             my $dbh = DBI->connect('DBI:MariaDB:test', 'username', 'pass', {
734                 mariadb_no_autocommit_cmd => 1
735             });
736
737           or using an existing database handle:
738
739             $dbh->{mariadb_no_autocommit_cmd} = 1;
740
741       mariadb_max_allowed_packet
742           This attribute controls the maximum size of one packet, any
743           generated or intermediate string and any bind parameter. Default
744           value depends on client MariaDB/MySQL library and should be 1GB.
745
746             $dbh->{mariadb_max_allowed_packet} = 32*1024*1024; # limit max size to 32MB
747
748       Documentation for some DBD::MariaDB methods of database handles:
749
750       ping
751         This can be used to send a ping to the server. See DBI ping.
752
753           my $rc = $dbh->ping();
754
755       get_info
756         This method can be used to retrieve information about MariaDB or
757         MySQL server.  See DBI get_info. Some useful information:
758         "SQL_DBMS_NAME" returns server database name, either "MariaDB" or
759         "MySQL". "SQL_DBMS_VER" returns server database version and
760         "SQL_SERVER_NAME" returns server host name.
761
762           use DBI::Const::GetInfoType;
763
764           print $dbh->get_info($GetInfoType{SQL_DBMS_NAME});
765
766           MariaDB
767
768           print $dbh->get_info($GetInfoType{SQL_DBMS_VER});
769
770           10.01.2600
771
772           print $dbh->get_info($GetInfoType{SQL_SERVER_NAME});
773
774           Localhost via UNIX socket
775

STATEMENT HANDLES

777       The statement handles of DBD::MariaDB support a number of attributes.
778       You access these by using, for example,
779
780         my $numFields = $sth->{NUM_OF_FIELDS};
781
782       Note, that most attributes are valid only after a successful execute.
783       An "undef" value will returned otherwise. The most important exception
784       is the mariadb_use_result attribute.
785
786       To set the mariadb_use_result attribute on statement handle $sth, use
787       either of the following:
788
789         my $sth = $dbh->prepare($sql, { mariadb_use_result => 1});
790
791       or
792
793         my $sth = $dbh->prepare($sql);
794         $sth->{mariadb_use_result} = 1;
795
796       Column dependent attributes, for example NAME, the column names, are
797       returned as a reference to an array. The array indices are
798       corresponding to the indices of the arrays returned by fetchrow and
799       similar methods. For example the following code will print a header of
800       table names together with all rows:
801
802         my $sth = $dbh->prepare('SELECT * FROM t')
803             or die 'Error: ' . $dbh->errstr() . "\n";
804
805         $sth->execute()
806             or die 'Error: ' . $sth->errstr() . "\n";
807
808         my $names = $sth->{NAME};
809         my $numFields = $sth->{'NUM_OF_FIELDS'} - 1;
810         for my $i ( 0..$numFields ) {
811             printf('%s%s', $i ? ',' : '', $$names[$i]);
812         }
813         print "\n";
814         while (my $ref = $sth->fetchrow_arrayref()) {
815             for my $i ( 0..$numFields ) {
816                 printf('%s%s', $i ? ',' : '', $$ref[$i]);
817             }
818             print "\n";
819         }
820
821       For portable applications you should restrict yourself to attributes
822       with capitalized or mixed case names. Lower case attribute names are
823       private to DBD::MariaDB. The attribute list includes:
824
825       ChopBlanks
826           This attribute determines whether a fetchrow will chop preceding
827           and trailing blanks off the column values. Chopping blanks does not
828           have impact on the mariadb_max_length attribute.
829
830       mariadb_insertid
831           If the statement you executed performs an "INSERT", and there is an
832           "AUTO_INCREMENT" column in the table you inserted in, this
833           attribute holds the value stored into the "AUTO_INCREMENT" column,
834           if that value is automatically generated, by storing "NULL" or 0 or
835           was specified as an explicit value.
836
837           Typically, you'd access the value via "$sth->{mariadb_insertid}".
838           The value can also be accessed via "$dbh->{mariadb_insertid}" but
839           this can easily produce incorrect results in case one database
840           handle is shared.
841
842           Portable DBI applications should not use mariadb_insertid. Instead
843           they should use DBI method "$dbh->last_insert_id()" or statement
844           DBI method "$sth->last_insert_id()". Statement method was
845           introduced in DBI version 1.642, but DBD::MariaDB implements it
846           also for older DBI versions.
847
848       mariadb_is_blob
849           Reference to an array of boolean values; Logical true value
850           indicates, that the respective column is a blob.
851
852       mariadb_is_key
853           Reference to an array of boolean values; Logical true value
854           indicates, that the respective column is a key.
855
856       mariadb_is_num
857           Reference to an array of boolean values; Logical true value
858           indicates, that the respective column contains numeric values.
859
860       mariadb_is_pri_key
861           Reference to an array of boolean values; Logical true value
862           indicates, that the respective column is a primary key.
863
864       mariadb_is_auto_increment
865           Reference to an array of boolean values; Logical true value
866           indicates that the respective column is an "AUTO_INCREMENT" column.
867
868       mariadb_length
869       mariadb_max_length
870           A reference to an array of maximum column sizes. The
871           mariadb_max_length is the maximum physically present in the result
872           table, mariadb_length gives the theoretically possible maximum.
873
874           For string orientated variable types (char, varchar, text and
875           similar types) both attributes return value in bytes. If you are
876           interested in number of characters then instead of mariadb_length
877           use "COLUMN_SIZE" via standard DBI method column_info and instead
878           of mariadb_max_length issue SQL query "SELECT
879           MAX(CHAR_LENGTH(...))". Example:
880
881             my $ci_sth = $dbh->column_info(undef, undef, $table, $column);
882             my $ci_ref = $ci_sth->fetchall_arrayref({});
883             my $mariadb_char_length = $ci_ref->[0]->{COLUMN_SIZE};
884
885             my $mariadb_char_max_length = $dbh->selectrow_array(sprintf(
886                                               'SELECT MAX(CHAR_LENGTH(%s)) FROM %s',
887                                               $dbh->quote_identifier($column),
888                                               $dbh->quote_identifier($table),
889                                           ));
890
891       NAME
892           A reference to an array of column names.
893
894       NULLABLE
895           A reference to an array of boolean values; Logical true value
896           indicates that this column may contain "NULL"'s.
897
898       NUM_OF_FIELDS
899           Number of fields returned by a "SELECT" statement. You may use this
900           for checking whether a statement returned a result: A zero value
901           indicates a non-"SELECT" statement like "INSERT", "DELETE" or
902           "UPDATE".
903
904       mariadb_table
905           A reference to an array of table names, useful in a "JOIN" result.
906
907       TYPE
908           A reference to an array of column types. The engine's native column
909           types are mapped to portable types like "DBI::SQL_INTEGER()" or
910           "DBI::SQL_VARCHAR()", as good as possible. Not all native types
911           have a meaningful equivalent. If you need the native column types,
912           use mariadb_type. See below.
913
914       mariadb_type
915           A reference to an array of MySQL's native column types, for example
916           "DBD::MariaDB::TYPE_SHORT()" or "DBD::MariaDB::TYPE_STRING()". Use
917           the TYPE attribute, if you want portable types like
918           "DBI::SQL_SMALLINT()" or "DBI::SQL_VARCHAR()".
919
920       mariadb_type_name
921           Similar to mariadb_type, but type names and not numbers are
922           returned. Whenever possible, the ANSI SQL name is preferred.
923
924       mariadb_warning_count
925           The number of warnings generated during execution of the SQL
926           statement. This attribute is available on both statement handles
927           and database handles.
928

UNICODE SUPPORT

930       All string orientated variable types (char, varchar, text and similar
931       types) are represented by the DBD::MariaDB as Unicode strings according
932       to the standard Perl Unicode model. It means that Perl scalars contain
933       Unicode code points and not UTF-8 bytes. Internally the DBD::MariaDB
934       uses the MySQL's "utf8mb4" charset for the network communication with
935       MariaDB and MySQL servers. It automatically transforms the network
936       MySQL's "utf8mb4" charset to the Unicode Perl scalars and vice-versa.
937
938       MySQL's "utf8mb4" charset for the network communication is configured
939       by "MYSQL_SET_CHARSET_NAME" libmariadb/libmysqlclient C library API
940       which is a requirement to have working quote method and an emulated
941       client side placeholders replacement.
942
943       Do not try to change network charset (e.g. via SQL command "SET NAMES"
944       manually) to anything different then UTF-8 as it would confuse
945       underlying C library and DBD::MariaDB would misbehave (e.g. would lead
946       to broken/insecure quote method or an emulated client side placeholders
947       replacement).
948
949       Using a non-UTF-8 charset for a column, table or database is fine
950       because MariaDB or MySQL server automatically transforms the storage
951       charset to the charset used by the network protocol ("utf8mb4"). Note
952       that when DBD::MariaDB is connecting to the MariaDB or MySQL server it
953       calls SQL command "SET character_set_server = 'utf8mb4'" to ensure that
954       the default charset for new databases would be UTF-8. Beware that a
955       default charset for new tables is set from a database charset.
956
957       In the case MySQL server does not support MySQL's "utf8mb4" charset for
958       a network protocol then DBD::MariaDB would try to use MySQL's "utf8"
959       charset which is a subset of UTF-8 encoding restricted to the 3 byte
960       UTF-8 sequences.  Support for MySQL's "utf8mb4" charset was introduced
961       in MySQL server version 5.5.3.
962
963   Working with binary data
964       Perl scalars do not distinguish between binary byte orientated buffers
965       and Unicode orientated strings. In Perl it is always up to the caller
966       and the callee to define in its API if functions and methods expect
967       byte buffers or Unicode strings. It is not possible (or rather Perl
968       application should not try) to distinguish if Perl scalar contains a
969       byte buffer or Unicode string.
970
971       When fetching data from MariaDB and MySQL servers, DBD::MariaDB treats
972       all fields marked with MySQL's charset "utf8mb4" (and also "utf8") as
973       Unicode strings. Everything else is treated as binary byte oriented
974       buffers.  Therefore, the only difference is that UTF-8 fields are
975       automatically decoded to Unicode. Binary blob fields remain untouched
976       and corresponding Perl scalars would contain just ordinals 0..255
977       (classic sequence of bytes). Unicode string scalars would contain
978       sequence of Unicode code points.
979
980       There is a small problem with input data, more preciously with SQL
981       statements and their bind parameters. By definition a SQL statement is
982       a string and therefore it is expected and handled by DBD::MariaDB as a
983       Unicode string (not byte oriented buffer). There is no way to treat a
984       SQL statement as a binary, but this is not a problem. All SQL commands
985       are encoded in ASCII and all ASCII characters are invariants in UTF-8
986       (have the same representation as a sequence of Unicode code points and
987       also when UTF-8 encoded in a byte buffer). For the remaining part of a
988       SQL statement, placeholders with bind parameters can and should be
989       used.
990
991   Binary parameters
992       Unfortunately, neither MariaDB nor MySQL server provide any type
993       information for prepared SQL statements; therefore, DBD::MariaDB has
994       absolutely no way to know if a particular bind parameter for a
995       placeholder should be treated as Unicode string or as byte oriented
996       buffer. So Perl applications which use DBD::MariaDB must provide
997       information about the correct type.
998
999       Moreover, DBI API for do, execute and all select* methods binds all
1000       parameters as "SQL_VARCHAR" type. Currently it is an API limitation
1001       which does not allow one to specify the bind type. Varchar is a string
1002       and so DBD::MariaDB treats all of them as Unicode strings.
1003
1004       The only way how to specify a type in DBI is via the bind_param method.
1005       Its third argument takes "SQL_*" constant which defines a type for the
1006       passed bind parameter.
1007
1008       Following type constants are treated as binary by DBD::MariaDB:
1009       "SQL_BIT", "SQL_BLOB", "SQL_BINARY", "SQL_VARBINARY",
1010       "SQL_LONGVARBINARY".
1011
1012       This approach of handling binary data was implemented in DBD::MariaDB
1013       because it does not violate how Perl's Unicode model is working,
1014       follows exactly DBI API documentation, and, more importantly, is how
1015       other DBI drivers (including DBD::Pg and DBD::SQLite) in their recent
1016       versions work. This ensures good compatibility for Perl applications
1017       which use multiple database backends and several DBI drivers.
1018
1019       Please note that the old DBD::mysql driver in version 4.041 works
1020       differently and has completely broken Unicode support.
1021
1022       To illustrate the usage, see the following example:
1023
1024         # Prepare statement
1025         my $sth = $dbh->prepare(
1026             'INSERT INTO users (id, name, picture) VALUES (?, ?, ?)'
1027         );
1028
1029         # Bind number, 7-bit ASCII values are always in Unicode and binary context
1030         $sth->bind_param(1, 10);
1031
1032         # Bind name, may contains Unicode character, in this case U+00E9
1033         $sth->bind_param(2, "Andr\x{E9}");
1034
1035         # Bind picture, it is a sequence of binary bytes, not Unicode code points
1036         $sth->bind_param(3, "\x{D8}\x{A0}\x{39}\x{F8}", DBI::SQL_BINARY);
1037
1038         # Execute statement with bind parameters
1039         $sth->execute();
1040
1041       Explanation: In this case number 10 and name "Andr\x{E9}" would be
1042       automatically encoded from Perl Unicode string scalars to MySQL's
1043       "utf8mb4" network charset and picture would not be touched as it was
1044       bound with the "DBI::SQL_BINARY" type. Note that 7-bit ASCII values are
1045       invariants in UTF-8, they have the same representations in UTF-8, so
1046       both the encoding and decoding operations are just identity functions.
1047
1048       This is the preferred and safe way how to work with binary data. It is
1049       also supported by other DBI drivers, including DBD::Pg and DBD::SQLite
1050       (see above).
1051
1052       In DBD::MariaDB, there's another specific way how to create a SQL
1053       statement with binary data: to call the quote method while specifying a
1054       binary type. This method takes a bind parameter and properly quotes +
1055       escapes it. For binary types it converts argument to MySQL's HEX syntax
1056       ("X'...'") which is a pure 7-bit ASCII and therefore invariant for
1057       UTF-8. See the following example:
1058
1059         my $param1 = 10;
1060         my $param2 = "Andr\x{E9}";
1061         my $param3 = "\x{D8}\x{A0}\x{39}\x{F8}";
1062         my $query = 'INSERT INTO users (id, name, picture) VALUES (' .
1063                       $dbh->quote($param1) . ' ,' .
1064                       $dbh->quote($param2) . ' ,' .
1065                       $dbh->quote($param3, DBI::SQL_BINARY) .
1066                     ')';
1067         $dbh->do($query);
1068
1069       The first two parameters are quoted and escaped for a later UTF-8
1070       encoding (to MySQL's "utf8mb4" charset) and the third parameter is
1071       quoted and escaped as a binary buffer to MySQL's HEX syntax for binary
1072       blobs.
1073
1074       This method is not recommended, because quoting, escaping and similar
1075       methods can easily get written incorrectly and lead to SQL injections
1076       and other security problems.
1077

TRANSACTION SUPPORT

1079       The transaction support works as follows:
1080
1081       ·   By default AutoCommit mode is on, following the DBI specifications.
1082
1083       ·   If you execute
1084
1085             $dbh->{AutoCommit} = 0;
1086
1087           or
1088
1089             $dbh->{AutoCommit} = 1;
1090
1091           then the driver will set the MariaDB or MySQL server variable
1092           autocommit to 0 or 1, respectively. Switching from 0 to 1 will also
1093           issue a "COMMIT", following the DBI specifications.
1094
1095       ·   The methods
1096
1097             $dbh->rollback();
1098             $dbh->commit();
1099
1100           will issue the commands "ROLLBACK" and "COMMIT", respectively. A
1101           "ROLLBACK" will also be issued if AutoCommit mode is off and the
1102           database handles DESTROY method is called. Again, this is following
1103           the DBI specifications.
1104
1105       Given the above, you should note the following:
1106
1107       ·   You should never change the server variable AutoCommit manually,
1108           unless you are ignoring DBI's transaction support.
1109
1110       ·   Switching AutoCommit mode from on to off or vice versa may fail.
1111           You should always check for errors when changing AutoCommit mode.
1112           The suggested way of doing so is using the DBI flag RaiseError. If
1113           you don't like RaiseError, you have to use code like the following:
1114
1115             $dbh->{AutoCommit} = 0;
1116             if ($dbh->{AutoCommit}) {
1117                 # An error occurred!
1118             }
1119
1120       ·   If you detect an error while changing the AutoCommit mode, you
1121           should no longer use the database handle. In other words, you
1122           should disconnect and reconnect again, because the transaction mode
1123           is unpredictable.  Alternatively you may verify the transaction
1124           mode by checking the value of the server variable autocommit.
1125           However, such behaviour isn't portable.
1126
1127       ·   DBD::MariaDB has a reconnect feature that handles the so-called
1128           MySQL morning bug: If the server has disconnected, most probably
1129           due to a timeout, then by default the driver will reconnect and
1130           attempt to execute the same SQL statement again. However, this
1131           behaviour is disabled when AutoCommit is off: Otherwise the
1132           transaction state would be completely unpredictable after a
1133           reconnect.
1134
1135       ·   The reconnect feature of DBD::MariaDB can be toggled by using the
1136           mariadb_auto_reconnect attribute. This behaviour should be turned
1137           off in code that uses LOCK TABLE because if the database server
1138           time out and DBD::MariaDB reconnect, table locks will be lost
1139           without any indication of such loss.
1140

MULTIPLE RESULT SETS

1142       DBD::MariaDB supports multiple result sets, thanks to Guy Harrison!
1143
1144       The basic usage of multiple result sets is
1145
1146         do {
1147             while (my @row = $sth->fetchrow_array()) {
1148                 do stuff;
1149             }
1150         } while ($sth->more_results);
1151
1152       An example would be:
1153
1154         $dbh->do('drop procedure if exists someproc')
1155             or print $DBI::errstr;
1156
1157         $dbh->do('create procedure someproc() deterministic
1158             begin
1159                 declare a,b,c,d int;
1160                 set a=1;
1161                 set b=2;
1162                 set c=3;
1163                 set d=4;
1164                 select a, b, c, d;
1165                 select d, c, b, a;
1166                 select b, a, c, d;
1167                 select c, b, d, a;
1168             end'
1169         ) or die "$DBI::err: $DBI::errstr";
1170
1171         my $sth = $dbh->prepare('call someproc()')
1172             or die "$DBI::err: $DBI::errstr";
1173
1174         $sth->execute()
1175             or die "$DBI::err: $DBI::errstr";
1176
1177         my $i=0;
1178         do {
1179             print "\nRowset ".++$i."\n---------------------------------------\n\n";
1180             foreach my $colno (0..$sth->{NUM_OF_FIELDS}-1) {
1181                 print $sth->{NAME}->[$colno]."\t";
1182             }
1183             print "\n";
1184             while (my @row = $sth->fetchrow_array())  {
1185                 foreach $field (0..$#row) {
1186                     print $row[$field]."\t";
1187                 }
1188                 print "\n";
1189             }
1190         } while ($sth->more_results);
1191
1192   Issues with multiple result sets
1193       Please be aware there could be issues if your result sets are jagged,
1194       meaning the number of columns of your results vary. Varying numbers of
1195       columns could result in your script crashing.
1196

MULTITHREADING

1198       The multithreading capabilities of DBD::MariaDB depend completely on
1199       the underlying C libraries. The modules are working with handle data
1200       only, no global variables are accessed or (to the best of my knowledge)
1201       thread unsafe functions are called. Thus DBD::MariaDB is believed to be
1202       completely thread safe, if the C libraries are thread safe and you
1203       don't share handles among threads.
1204
1205       The obvious question is: Are the C libraries thread safe? In the case
1206       of MySQL the answer is yes, since MySQL 5.5 it is. Older versions C
1207       library needs to be compiled with "--with-thread-safe-client" or
1208       "--enable-thread-safe-client" configure options.
1209

ASYNCHRONOUS QUERIES

1211       You can make a single asynchronous query per MySQL connection; this
1212       allows you to submit a long-running query to the server and have an
1213       event loop inform you when it's ready. An asynchronous query is started
1214       by either setting the mariadb_async attribute to a true value in the do
1215       method, or in the prepare method. Statements created with mariadb_async
1216       set to true in prepare always run their queries asynchronously when
1217       execute is called. The driver also offers three additional methods:
1218       "mariadb_async_result()", "mariadb_async_ready()", and
1219       "mariadb_sockfd()". "mariadb_async_result()" returns what do or execute
1220       would have; that is, the number of rows affected.
1221       "mariadb_async_ready()" returns true if "mariadb_async_result()" will
1222       not block, and zero otherwise. They both return "undef" if that handle
1223       was not created with mariadb_async set to true or if an asynchronous
1224       query was not started yet. "mariadb_sockfd()" returns the file
1225       descriptor number for the MySQL connection; you can use this in an
1226       event loop.
1227
1228       Here's an example of how to use the asynchronous query interface:
1229
1230         use feature 'say';
1231         $dbh->do('SELECT SLEEP(10)', { mariadb_async => 1 });
1232         until($dbh->mariadb_async_ready()) {
1233             say 'not ready yet!';
1234             sleep 1;
1235         }
1236         my $rows = $dbh->mariadb_async_result();
1237

INSTALLATION

1239       See DBD::MariaDB::INSTALL.
1240

AUTHORS

1242       Originally, there was a non-DBI driver, Mysql, which was much like PHP
1243       drivers such as mysql and mysqli. The Mysql module was originally
1244       written by Andreas König (koenig@kulturbox.de) who still, to this day,
1245       contributes patches to DBD::mysql. An emulated version of Mysql was
1246       provided to DBD::mysql from Jochen Wiedmann, but eventually deprecated
1247       as it was another bundle of code to maintain.
1248
1249       The first incarnation of DBD::mysql was developed by Alligator
1250       Descartes, who was also aided and abetted by Gary Shea, Andreas König
1251       and Tim Bunce.
1252
1253       The current incarnation of DBD::mysql was written by Jochen Wiedmann,
1254       then numerous changes and bug-fixes were added by Rudy Lippan. Next,
1255       prepared statement support was added by Patrick Galbraith and Alexy
1256       Stroganov (who also solely added embedded server support).
1257
1258       Since 2004 DBD::mysql has been maintained by Patrick Galbraith
1259       (patg@patg.net), and since 2013 with the great help of Michiel Beijen
1260       (michiel.beijen@gmail.com), along with the entire community of Perl
1261       developers who keep sending patches to help continue improving
1262       DBD::mysql.
1263
1264       In 2018 unreleased version 4.042_01 of DBD::mysql was forked and
1265       DBD::MariaDB was created to fix long standing Unicode bugs and MariaDB
1266       support. Currently it is developed in GoodData and maintained by Pali
1267       (pali@cpan.org).
1268

CONTRIBUTIONS

1270       Anyone who desires to contribute to this project is encouraged to do
1271       so.  Currently, the source code for this project can be found at
1272       Github:
1273
1274       <https://github.com/gooddata/DBD-MariaDB>
1275
1276       Either fork this repository and produce a branch with your changeset
1277       that the maintainer can merge to his tree, or create a diff with git.
1278       The maintainer is more than glad to take contributions from the
1279       community as many features and fixes from DBD::MariaDB have come from
1280       the community.
1281
1283       This module is
1284
1285       ·   Large Portions Copyright (c) 2018 GoodData Corporation
1286
1287       ·   Large Portions Copyright (c) 2015-2017 Pali Rohár
1288
1289       ·   Large Portions Copyright (c) 2004-2017 Patrick Galbraith
1290
1291       ·   Large Portions Copyright (c) 2013-2017 Michiel Beijen
1292
1293       ·   Large Portions Copyright (c) 2004-2007 Alexey Stroganov
1294
1295       ·   Large Portions Copyright (c) 2003-2005 Rudolf Lippan
1296
1297       ·   Large Portions Copyright (c) 1997-2003 Jochen Wiedmann, with code
1298           portions
1299
1300       ·   Copyright (c)1994-1997 their original authors
1301

LICENSE

1303       This module is released under the same license as Perl itself. See Perl
1304       Licensing <https://dev.perl.org/licenses/> for details.
1305

MAILING LIST SUPPORT

1307       This module is maintained and supported on a mailing list, dbi-users.
1308
1309       To subscribe to this list, send an email to
1310
1311       "dbi-users-subscribe@perl.org" <mailto:dbi-users-subscribe@perl.org>
1312
1313       Mailing list archives are at
1314
1315       <http://groups.google.com/group/perl.dbi.users?hl=en&lr=>
1316

ADDITIONAL DBI INFORMATION

1318       Additional information on the DBI project can be found on the World
1319       Wide Web at the following URL:
1320
1321       <http://dbi.perl.org>
1322
1323       where documentation, pointers to the mailing lists and mailing list
1324       archives and pointers to the most current versions of the modules can
1325       be used.
1326
1327       Information on the DBI interface itself can be gained by typing:
1328
1329         perldoc DBI
1330
1331       Information on DBD::MariaDB specifically can be gained by typing:
1332
1333         perldoc DBD::MariaDB
1334
1335       (this will display the document you're currently reading)
1336

BUG REPORTING, ENHANCEMENT/FEATURE REQUESTS

1338       Please report bugs, including all the information needed such as
1339       DBD::MariaDB version, MariaDB/MySQL version, OS type/version, etc to
1340       this link:
1341
1342       <https://github.com/gooddata/DBD-MariaDB/issues>
1343
1344       In past for DBD::mysql, MySQL/Sun/Oracle responded to bugs and assisted
1345       in fixing bugs which many thanks should be given for their help! This
1346       driver is outside the realm of the numerous components they support,
1347       and the maintainer and community solely support DBD::mysql and
1348       DBD::MariaDB.
1349
1350
1351
1352perl v5.32.0                      2020-07-28                   DBD::MariaDB(3)
Impressum