Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

getTablesInstalled: underscore in prefix matches any character #1480

Closed
robocoder opened this Issue · 3 comments

2 participants

Anthon Pang Matthieu Aubry
Anthon Pang
Collaborator

Just as the '%' matches 0 or more characters in a LIKE expression, the '_' matches any character in a LIKE expression.

Create database with table prefix "piwik2".
Delete the config.ini.php.
Rerun installer this time using the table prefix "piwik_".
After submitting the "database setup" form:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'piwik.piwik_site' doesn't exist
Backtrace:

#0 /home/apang/work/piwik/dev/trunk/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/apang/work/piwik/dev/trunk/libs/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /home/apang/work/piwik/dev/trunk/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT idsite F...', Array)
#3 /home/apang/work/piwik/dev/trunk/libs/Zend/Db/Adapter/Abstract.php(706): Zend_Db_Adapter_Pdo_Abstract->query('SELECT idsite F...', Array)
#4 /home/apang/work/piwik/dev/trunk/core/PluginsFunctions/Sql.php(46): Zend_Db_Adapter_Abstract->fetchAll('SELECT idsite F...', Array)
#5 /home/apang/work/piwik/dev/trunk/core/PluginsFunctions/Sql.php(98): Piwik_Sql::fetchAll('SELECT idsite F...', Array)
#6 /home/apang/work/piwik/dev/trunk/plugins/SitesManager/API.php(117): Piwik_FetchAll('SELECT idsite F...')
#7 /home/apang/work/piwik/dev/trunk/core/Access.php(179): Piwik_SitesManager_API->getAllSitesId()
#8 /home/apang/work/piwik/dev/trunk/core/Access.php(191): Piwik_Access->reloadAccessSuperUser()
#9 /home/apang/work/piwik/dev/trunk/core/Piwik.php(1069): Piwik_Access->setSuperUser(true)
#10 /home/apang/work/piwik/dev/trunk/plugins/Installation/Controller.php(327): Piwik::setUserIsSuperUser()
#11 /home/apang/work/piwik/dev/trunk/plugins/Installation/Installation.php(72): Piwik_Installation_Controller->tablesCreation('The configurati...')
#12 [internal function]: Piwik_Installation->dispatch(Object(Piwik_Event_Notification))
#13 /home/apang/work/piwik/dev/trunk/libs/Event/Dispatcher.php(213): call_user_func_array(Array, Array)
#14 /home/apang/work/piwik/dev/trunk/core/PluginsManager.php(389): Event_Dispatcher->addObserver(Array, 'FrontController...')
#15 /home/apang/work/piwik/dev/trunk/core/PluginsManager.php(272): Piwik_PluginsManager->addPluginObservers(Object(Piwik_Installation))
#16 /home/apang/work/piwik/dev/trunk/core/PluginsManager.php(180): Piwik_PluginsManager->reloadPlugins()
#17 /home/apang/work/piwik/dev/trunk/core/FrontController.php(208): Piwik_PluginsManager->loadPlugins(Array)
#18 /home/apang/work/piwik/dev/trunk/index.php(58): Piwik_FrontController->init()
#19 {main}
Anthon Pang
Collaborator

Not a regression.

Anthon Pang
Collaborator

(In [2512]) fixes #1480

Matthieu Aubry
Owner

nice one! this bug has been there forever and could never understand where this 'piwik_site already exist' error came from. kuddos!

Anthon Pang robocoder added this to the Piwik 0.6.4 milestone
Anthon Pang robocoder self-assigned this
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.