The Core Updater routine fails when updating to 1.4.0 if Visitor Tracking is not turned off.
Right now, the upgrade documentation only "recommends" that it be turned off, not "requires".
Run the third SQL statement in core\Updates\1.4-rc2.php, which is something along the lines of
UPDATE log_visit
SET location_ip = UNHEX(LPAD(HEX(CONVERT(location_ip, UNSIGNED)), 8, '0'))
When your log_visit
table has both untranslated (i.e. 1.3.x) and newly entered location_ip
values. The new (1.4.0 valid) location location_ip
values will convert to an invalid hex integer, and the database will stop with this error message:
SQLSTATE[HY000]: General error: 1292 Truncated incorrect INTEGER value: ' ( '
Force the user to disable visitor tracking while DB migraitons occur
OR
use this SQL statement instead
UPDATE piwik_log_visit
SET location_ip = UNHEX(LPAD(HEX(CONVERT(location_ip, UNSIGNED)), 8, '0'))
WHERE LENGTH(location_ip) > 4;
(which is what I used to manually complete my Piwik upgrade process, after manually changing my piwik_option version_core
value as well.)