Skip to content

Commit

Permalink
Merge pull request #15960 from uberbrady/improve_restore_cleaner_utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe authored Dec 12, 2024
2 parents ab6363a + a0e7dcf commit 4d1d2fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Console/Commands/RestoreFromBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public function parse_sql(string $line): string {
/* we *could* have made the ^INSERT INTO blah VALUES$ turn on the capturing state, and closed it with
a ^(blahblah);$ but it's cleaner to not have to manage the state machine. We're just going to
assume that (blahblah), or (blahblah); are values for INSERT and are always acceptable. */
"<^/\*!40101 SET NAMES '?[a-zA-Z0-9_-]+'? \*/;$>" => false, //using weird delimiters (<,>) for readability. allow quoted or unquoted charsets
"<^/\*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' \*/;$>" => false, //same, now handle zero-values
];

foreach($allowed_statements as $statement => $statechange) {
Expand Down

0 comments on commit 4d1d2fe

Please sign in to comment.