There are a couple of update functions - system_update_6034, system_update_6039, system_update_6045 - in system.install that update the value of the 'perm' field in the permissions table. They both include the altered string directly in the UPDATE statement without escaping it. When I was upgrading my database from 5 to 6, this resulted in a MySQL syntax error, because some of the existing permission names included a possessive apostrophe ("access others' lists of watched posts" from the Watcher module).
I changed the queries to call db_escape_string and that fixed it. A patch of that change is attached.
| Comment | File | Size | Author |
|---|---|---|---|
| system.install.quotes.patch | 1.76 KB | brad.bulger |
Comments