Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to run bot with a PostgreSQL backend. Visiting the bot/log/ page I get:
PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "REGEXP" LINE 1: SELECT * FROM bot_log WHERE channel REGEXP '#w3( |$)' AND (t... ^: SELECT * FROM {bot_log} WHERE channel REGEXP '#w3( |$)' AND (timestamp >= :date_start AND timestamp <= :date_end) ORDER BY id; Array ( [:date_start] => 1352505600 [:date_end] => 1352592000 ) in bot_log_date() (line 262 of modules/bot/bot_log/bot_log.module).
Comment | File | Size | Author |
---|---|---|---|
#1 | 0001-Avoid-MySQL-specific-REGEXP-match.patch | 1.62 KB | gaas |
Comments
Comment #1
gaas CreditAttribution: gaas commentedI've fixed it here by replacing the REGEXP match with two ORed LIKEs.
Comment #2
steinmb CreditAttribution: steinmb commentedWorks OK for me. Looking good :)
Comment #3
Morbus IffAt first glance, this patch is not equivalent to the REGEXP, which needs to bound by space or end-of-data.The patch does "#channel " or "#channel", which would cause "#drupal-support" logs to show up under a request for "#drupal".
Nevermind. I'm wrong.
Comment #4
Morbus IffComment #5
Morbus IffCommitted.