Skip to content

Fix commitNewEntries query#3357

Merged
Alkarex merged 1 commit intoFreshRSS:masterfrom
candrews:patch-3
Jan 11, 2021
Merged

Fix commitNewEntries query#3357
Alkarex merged 1 commit intoFreshRSS:masterfrom
candrews:patch-3

Conversation

@candrews
Copy link
Contributor

@candrews candrews commented Jan 11, 2021

There was an erroneous '; at the end of the commitNewEntries DELETE query, resulting in an exception during actualization with this output:

FreshRSS starting feeds actualization at 2021-01-11T14:06:09+00:00
FreshRSS actualize candrews...
PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' at line 1 in /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php:45
Stack trace:
#0 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php(45): PDO->exec()
#1 /var/www/localhost/htdocs/FreshRSS/app/Models/EntryDAO.php(167): Minz_Pdo->exec()
#2 /var/www/localhost/htdocs/FreshRSS/app/Controllers/feedController.php(505): FreshRSS_EntryDAO->commitNewEntries()
#3 /var/www/localhost/htdocs/FreshRSS/app/Controllers/feedController.php(548): FreshRSS_feed_Controller::actualizeFeed()
#4 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Dispatcher.php(119): FreshRSS_feed_Controller->actualizeAction()
#5 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Dispatcher.php(47): Minz_Dispatcher->launchAction()
#6 /var/www/localhost/htdocs/FreshRSS/lib/Minz/FrontController.php(81): Minz_Dispatcher->run()
#7 /var/www/localhost/htdocs/FreshRSS/app/actualize_script.php(75): Minz_FrontController->run()
#8 {main}
  thrown in /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php on line 45
Results:

Changes proposed in this pull request:

  • Fix error in SQL query

How to test the feature manually:

  1. Run feed actualization
  2. Note that no errors occur

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written (optional if too hard)
  • documentation updated

Additional information can be found in the documentation.

There was an erroneous '; at the end of the commitNewEntries DELETE query, resulting in an exception during actualization with this output:

```
FreshRSS starting feeds actualization at 2021-01-11T14:06:09+00:00
FreshRSS actualize candrews...
PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' at line 1 in /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php:45
Stack trace:
#0 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php(45): PDO->exec()
FreshRSS#1 /var/www/localhost/htdocs/FreshRSS/app/Models/EntryDAO.php(167): Minz_Pdo->exec()
FreshRSS#2 /var/www/localhost/htdocs/FreshRSS/app/Controllers/feedController.php(505): FreshRSS_EntryDAO->commitNewEntries()
FreshRSS#3 /var/www/localhost/htdocs/FreshRSS/app/Controllers/feedController.php(548): FreshRSS_feed_Controller::actualizeFeed()
FreshRSS#4 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Dispatcher.php(119): FreshRSS_feed_Controller->actualizeAction()
FreshRSS#5 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Dispatcher.php(47): Minz_Dispatcher->launchAction()
FreshRSS#6 /var/www/localhost/htdocs/FreshRSS/lib/Minz/FrontController.php(81): Minz_Dispatcher->run()
FreshRSS#7 /var/www/localhost/htdocs/FreshRSS/app/actualize_script.php(75): Minz_FrontController->run()
FreshRSS#8 {main}
  thrown in /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php on line 45
Results:
```
@aledeg aledeg added this to the 1.18.0 milestone Jan 11, 2021
@Alkarex Alkarex merged commit f9687ea into FreshRSS:master Jan 11, 2021
@Alkarex
Copy link
Member

Alkarex commented Jan 11, 2021

I am wondering how this has not be spotted before... What database+version are you using?

@aledeg
Copy link
Member

aledeg commented Jan 11, 2021

Spotted in the log: MariaDB

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants