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

Reuse SQL result for module history #6683

Merged
merged 1 commit into from Oct 14, 2016

Conversation

Projects
None yet
4 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Oct 13, 2016

Questions Answers
Branch? develop
Description? Instead of executing the same sql request more than 50 times, reuse the results.
Type? improvement
Category? BO
BC breaks? Nope
Deprecations? Nope
Fixed ticket? /
How to test? Look at the debug bar at the bottom of the module page > Installed module tab

Before:
capture d ecran 2016-10-13 a 22 46 49

After:
capture d ecran 2016-10-13 a 22 46 19

Show outdated Hide outdated src/Adapter/Module/ModuleDataProvider.php Outdated

@aleeks aleeks merged commit c87d842 into PrestaShop:develop Oct 14, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@aleeks

This comment has been minimized.

Show comment
Hide comment
@aleeks

aleeks Oct 14, 2016

Contributor

Thank you @Quetzacoalt91 !

Contributor

aleeks commented Oct 14, 2016

Thank you @Quetzacoalt91 !

@jonathanparentlevesque

This comment has been minimized.

Show comment
Hide comment
@jonathanparentlevesque

jonathanparentlevesque Feb 27, 2017

After updating my table name prefix and config.php. My queries seems fine pretty much everywhere, but I keep recieving this error when accessing the module page:

Unexpected exception on module dashactivity. An exception occurred while executing \'SELECT v0_.id AS id_0, v0_.id_employee AS id_employee_1, v0_.id_module AS id_module_2, v0_.date_add AS date_add_3, v0_.date_upd AS date_upd_4 FROM v2v_psmodule_history v0_ WHERE v0_.id_employee = ?\' with params [1]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table \'woot.v2v_psmodule_history\' doesn\'t exist

PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'woot.v2v_psmodule_history' doesn't exist in C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:91 
Stack trace: 
#0 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php(91): PDOStatement->execute(NULL) 
#1 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(847): Doctrine\DBAL\Driver\PDOStatement->execute() 
#2 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(899): Doctrine\DBAL\Connection->executeQuery('SELECT v0_.id A...', Array, Array) 
#3 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(830): Doctrine\DBAL\Connection->executeCacheQuery('SELECT v0_.id A...', Array, Array, Object(Doctrine\DBAL\Cache\QueryCacheProfile)) 
#4 C:\xampp\htdocs\woot\vendor\doctrine\orm\lib\Doctrine\ORM\Query\Exec\SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT v0_.id A...', Array, Array, Ob in C:\xampp\htdocs\woot\app\bootstrap.php.cache on line 3216

jonathanparentlevesque commented Feb 27, 2017

After updating my table name prefix and config.php. My queries seems fine pretty much everywhere, but I keep recieving this error when accessing the module page:

Unexpected exception on module dashactivity. An exception occurred while executing \'SELECT v0_.id AS id_0, v0_.id_employee AS id_employee_1, v0_.id_module AS id_module_2, v0_.date_add AS date_add_3, v0_.date_upd AS date_upd_4 FROM v2v_psmodule_history v0_ WHERE v0_.id_employee = ?\' with params [1]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table \'woot.v2v_psmodule_history\' doesn\'t exist

PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'woot.v2v_psmodule_history' doesn't exist in C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:91 
Stack trace: 
#0 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php(91): PDOStatement->execute(NULL) 
#1 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(847): Doctrine\DBAL\Driver\PDOStatement->execute() 
#2 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(899): Doctrine\DBAL\Connection->executeQuery('SELECT v0_.id A...', Array, Array) 
#3 C:\xampp\htdocs\woot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(830): Doctrine\DBAL\Connection->executeCacheQuery('SELECT v0_.id A...', Array, Array, Object(Doctrine\DBAL\Cache\QueryCacheProfile)) 
#4 C:\xampp\htdocs\woot\vendor\doctrine\orm\lib\Doctrine\ORM\Query\Exec\SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT v0_.id A...', Array, Array, Ob in C:\xampp\htdocs\woot\app\bootstrap.php.cache on line 3216

@Quetzacoalt91 Quetzacoalt91 deleted the Quetzacoalt91:module-page-reuse-request branch Feb 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment