Skip to content
Permalink
Browse files

Bugfix: DELAYED configuration option not honored for inserts into tca…

…t_captured_phrases
  • Loading branch information...
dentoir committed Jul 2, 2019
1 parent 76c5cb8 commit 1dfc4bf59a36f1e87222dd54c45eb214c57cc802
Showing with 6 additions and 1 deletion.
  1. +6 −1 capture/common/functions.php
@@ -2382,7 +2382,12 @@ function insert_captured_phrase_ids($captured_phrase_ids) {
if (count($captured_phrase_ids) > 3) {
$moresets = count($captured_phrase_ids) / 3 - 1;
}
$sql = "INSERT DELAYED IGNORE INTO tcat_captured_phrases ( tweet_id, phrase_id, created_at ) VALUES ( ?, ?, ? )" . str_repeat(", (?, ?, ?)", $moresets);
if (defined('USE_INSERT_DELAYED') && USE_INSERT_DELAYED) {
$extra = 'DELAYED';
} else {
$extra = '';
}
$sql = "INSERT $extra IGNORE INTO tcat_captured_phrases ( tweet_id, phrase_id, created_at ) VALUES ( ?, ?, ? )" . str_repeat(", (?, ?, ?)", $moresets);
$h = $dbh->prepare($sql);
for ($i = 0; $i < count($captured_phrase_ids); $i++) {
// bindParam() expects its first parameter ( index of the ? placeholder ) to start with 1

0 comments on commit 1dfc4bf

Please sign in to comment.
You can’t perform that action at this time.