[Rt-commit] rt branch, 4.4/mysql-replace-4-bytes-utf8-data, repushed

? sunnavy sunnavy at bestpractical.com
Thu Oct 25 08:18:28 EDT 2018


The branch 4.4/mysql-replace-4-bytes-utf8-data was deleted and repushed:
       was 305c5d0b562ac4bbbb9512083e8411ce68426f05
       now a0a64bece1a7e370e2c35c86a25beb32c4fc292b

1: 69aa0cb99 ! 1: 07d968d82 Remove 4 bytes utf8 data for MySQL utf8 charset
    @@ -2,10 +2,9 @@
     
         Remove 4 bytes utf8 data for MySQL utf8 charset
         
    -    This could be dropped when we updated MySQL charset to utf8mb4.
    +    This could be dropped when we updated MySQL charset to "utf8mb4".
         
    -    Note that we need to protect instances that already have utf8mb4
    -    charset, in which case the character_set_client will be utf8mb4.
    +    Note that we need to protect instances that already migrated to "utf8mb4".
     
     diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
     --- a/lib/RT/Handle.pm
    @@ -15,12 +14,10 @@
              ($version) = $version =~ /^(\d+\.\d+)/;
              $self->dbh->do("SET NAMES 'utf8'") if $version >= 4.1;
     +
    -+        my $sth
    -+          = $self->dbh->prepare(
    -+            "SELECT VARIABLE_VALUE FROM performance_schema.session_variables WHERE VARIABLE_NAME = 'character_set_client'"
    -+          );
    -+        $sth->execute();
    -+        $self->{_unsafe_4bytes_utf8} = 1 unless $sth->fetchrow_array() eq 'utf8mb4';
    ++        if ( $self->dbh->selectrow_arrayref("SHOW TABLES LIKE 'Tickets'") ) {
    ++            $self->{_unsafe_4bytes_utf8} = 1
    ++              unless $self->dbh->selectrow_arrayref("SHOW CREATE TABLE Tickets")->[1] =~ /charset=utf8mb4/i;
    ++        }
          }
          elsif ( $db_type eq 'Pg' ) {
              my $version = $self->DatabaseVersion;
2: f795c8179 = 2: d4ef71f4e Remove duplicated tests
3: 305c5d0b5 = 3: a0a64bece Test 4 bytes utf8 data



More information about the rt-commit mailing list