Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in DB migrations from 1.3.0 to 1.4.0 #2423

Closed
anonymous-matomo-user opened this issue May 11, 2011 · 1 comment
Closed

Error in DB migrations from 1.3.0 to 1.4.0 #2423

anonymous-matomo-user opened this issue May 11, 2011 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously.
Milestone

Comments

@anonymous-matomo-user
Copy link

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".

Steps to Reproduce

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: ' ( '

Possible Fixes

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.)

@robocoder
Copy link
Contributor

Thanks. Already fixed in trunk.

@anonymous-matomo-user anonymous-matomo-user added this to the 1.5 - Piwik 1.5 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants