When activating on my site that has prefixed table names:

* user warning: Table 'database.variable' doesn't exist query: CREATE TRIGGER `settings_audit_log_variable_update_audit` AFTER UPDATE ON `variable` FOR EACH ROW BEGIN DECLARE connection_uid INT; IF (NEW.value != OLD.value) THEN SELECT COALESCE(uid, 0) INTO connection_uid FROM settings_audit_log_user_db_connection WHERE connection_id = CONNECTION_ID(); INSERT INTO `settings_audit_log_variable_audit_log` (`name`, `old_value`, `new_value`, `event_timestamp`, `uid`) VALUES (NEW.name, OLD.value, NEW.value, UNIX_TIMESTAMP(), connection_uid); END IF; END; in /Users/davidnorman/Sites/sites/all/modules/settings_audit_log/settings_audit_log.install on line 127.
* user warning: Table 'database.variable' doesn't exist query: CREATE TRIGGER `settings_audit_log_variable_insert_audit` AFTER INSERT ON `variable` FOR EACH ROW BEGIN DECLARE connection_uid INT; SELECT COALESCE(uid, 0) INTO connection_uid FROM settings_audit_log_user_db_connection WHERE connection_id = CONNECTION_ID(); INSERT INTO `settings_audit_log_variable_audit_log` (`name`, `old_value`, `new_value`, `event_timestamp`, `uid`) VALUES (NEW.name, NULL, NEW.value, UNIX_TIMESTAMP(), connection_uid); END; in /Users/davidnorman/Sites/sites/all/modules/settings_audit_log/settings_audit_log.install on line 138.

Comments

Anonymous’s picture

subscribe, looking into it.

Anonymous’s picture

Status: Active » Needs review

deekayen - mind testing latest CVS? first attempt at fix committed here:

http://drupal.org/cvs?commit=481224

Anonymous’s picture

and here's the D7 commit:

http://drupal.org/cvs?commit=481254

deekayen’s picture

Status: Needs review » Needs work

I just now updated to settings_audit_log-6.x.-1.x-dev through drush. I backed up my database, then activated the module.

* user warning: Column 'uid' cannot be null query: UPDATE prefix_variable SET value = 'i:0;' WHERE name = 'cache_flush_cache_views' in /Users/davidnorman/Sites/includes/bootstrap.inc on line 609.
* user warning: Column 'uid' cannot be null query: UPDATE prefix_variable SET value = 'i:0;' WHERE name = 'cache_flush_cache_block' in /Users/davidnorman/Sites/includes/bootstrap.inc on line 609.
* user warning: Column 'uid' cannot be null query: UPDATE prefix_variable SET value = 'i:1295011937;' WHERE name = 'cache_flush_cache_page' in /Users/davidnorman/Sites/includes/bootstrap.inc on line 609.
* user warning: Column 'uid' cannot be null query: UPDATE prefix_variable SET value = 'a:0:{}' WHERE name = 'javascript_parsed' in /Users/davidnorman/Sites/includes/bootstrap.inc on line 609.

Then I restored my backup, went back and saved the modules page without changing any module statuses and got no warnings. Then I activated the module again, and got just

user warning: Column 'uid' cannot be null query: UPDATE prefix_variable SET value = 'a:0:{}' WHERE name = 'javascript_parsed' in /Users/davidnorman/Sites/includes/bootstrap.inc on line 609.

Note the first three in the first attempt are cache related and therefore wouldn't execute on every pageload anyway. The last one looks exactly the same.