Posted by dww on June 23, 2007 at 7:08pm
| Project: | Database Administration |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | smk-ka |
| Status: | closed (won't fix) |
Issue Summary
Polluting patches in both http://drupal.org/node/106576 and http://drupal.org/node/132630 was an important change to fix how we escape blobs when creating backup tables. I ripped the code out of #106576, so it could be fixed separately, since it needs to go into both DRUPAL-4-7 and HEAD.
And so begins the long list of bugs that require totally separate patches due to lame differences between HEAD and DRUPAL-4-7... :(
Here's the patch for DRUPAL-4-7
| Attachment | Size |
|---|---|
| dba_escape_blobs.47x.patch.txt | 1.62 KB |
Comments
#1
And for HEAD...
#2
not having thought about this much or investigated, it's not clear why we're manually trying to escape everything instead of just using db_escape_string()... these patches might need re-doing.
#3
Because creating a textual dump is different from actually executing a query. mysql_real_escape_string() escapes both types of quotes with a backslash, where we only need to double single quotes and leave double quotes unchanged.
Updated patch contains:
- support for NULL values, to be able to 100% recreate a database
- the missing read-in of the table schema.
Tests I've run so far:
1. created a phpMyAdmin reference dump
2. created a site snapshot using Demo module
3. reset site using Demo module
4. created another dump using phpMyAdmin and visually diffed against the first one. Result is 100% the same (except for changed timestamps, of course).
--
Stefan Kudwien
unleashed mind
#4
great, thanks! don't have time to review/test now, but i certainly appreciate the patch. however, since this is a bug, please provide a version for the DRUPAL-4-7 branch, too...
thanks,
-derek
#5
The 5.x branch is no longer supported.