[Bps-public-commit] dbix-searchbuilder branch, quote-table-names, updated. 1.67-12-g7d20657

Aaron Trevena ast at bestpractical.com
Mon Sep 14 09:08:18 EDT 2020


The branch, quote-table-names has been updated
       via  7d20657706cb822f109a3250d4e2f294bfefc857 (commit)
      from  02c3c01590783c0923873b0f857ac356ab5a76ac (commit)

Summary of changes:
 lib/DBIx/SearchBuilder/Handle/mysql.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 7d20657706cb822f109a3250d4e2f294bfefc857
Author: Aaron Trevena <ast at bestpractical.com>
Date:   Mon Sep 14 14:07:06 2020 +0100

    Update mysql version detection for quoting tablenames
    
    Check for and exclude mariadb when detecting mysql versions requiring quoted
    table names

diff --git a/lib/DBIx/SearchBuilder/Handle/mysql.pm b/lib/DBIx/SearchBuilder/Handle/mysql.pm
index 8e9a783..97a042e 100755
--- a/lib/DBIx/SearchBuilder/Handle/mysql.pm
+++ b/lib/DBIx/SearchBuilder/Handle/mysql.pm
@@ -312,7 +312,10 @@ sub QuoteName {
 
 sub _RequireQuotedTables {
     my $self = shift;
-    if ( substr($self->DatabaseVersion, 0, 1) == 8 ) {
+    my $version = $self->DatabaseVersion;
+    # MariaDB version does not match mysql, and hasn't added new reserved words
+    return 0 if ($version =~ m/mariadb/i);
+    if ( substr($version, 0, 1) == 8 ) {
         return 1;
     }
     return 0;

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list