Underscore is a SQL wildcard that actually represents any single character, so util_uninstall() may delete all variables starting with 'util'.

This line in util_uninstall():

  db_query("DELETE FROM {variable} WHERE name LIKE '%s%%'", 'util_');

Would have to be replace into something like this:

  db_query("DELETE FROM {variable} WHERE name LIKE '%s%%'", 'util\_');

Here, underscore is escaped with a backslash so it is treated by the SQL server as a literal character, not a wildcard character.

CommentFileSizeAuthor
#2 util.install.patch376 bytesmarkus_petrux

Comments

markus_petrux’s picture

Priority: Normal » Critical

Setting to critical as it may delete data that belongs to other modules.

markus_petrux’s picture

Status: Active » Needs review
StatusFileSize
new376 bytes

The patch

nancydru’s picture

Status: Needs review » Fixed

Somewhere along the line, this was committed. Thanks.

Status: Fixed » Closed (fixed)

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