Problem/Motivation

See #2558063: Fix syntax error in filled database dump

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

catch created an issue. See original summary.

jhedstrom’s picture

Assigned: Unassigned » jhedstrom

I'll see if I can track this down.

jhedstrom’s picture

Assigned: jhedstrom » Unassigned
Status: Active » Needs review
StatusFileSize
new2.39 KB
new3.44 KB

This contains a fix, plus an integration test on the dump command, and a unit test on the Variable::export() method.

The last submitted patch, 3: db-dump-syntax-error-2558179-03-TEST-ONLY.patch, failed testing.

dawehner’s picture

+++ b/core/modules/system/src/Tests/Update/DbDumpTest.php
@@ -98,15 +99,20 @@ public function setUp() {
 
+    // Create user account with some potential syntax issues.
+    $account = User::create(['mail' => 'q\'uote$dollar@example.com', 'name' => '$dollar']);
+    $account->save();
+
     // Create a cache table (this will create 'cache_discovery').

Should we check the exactly result in the file?

jhedstrom’s picture

StatusFileSize
new1.07 KB
new4.25 KB

This checks for the exported name and email address in the generated dump.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Great, thank you for the additional test coverage.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

And the fun doesn't stop with upgrade path-related issues. :P

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 5b1e246 on 8.0.x
    Issue #2558179 by jhedstrom, dawehner, catch: Database dump script...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.