Closed (fixed)
Project:
Bot
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2012 at 05:30 UTC
Updated:
23 Jan 2013 at 01:00 UTC
Jump to comment: Most recent file
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 commentedI've fixed it here by replacing the REGEXP match with two ORed LIKEs.
Comment #2
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.