Closed (duplicate)
Project:
Email Registration
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2012 at 16:34 UTC
Updated:
27 Dec 2012 at 20:53 UTC
When logging in with OpenID to create an account on a Drupal 7 / SQLite site, I get this message after the OpenID provider's authorization:
PDOException : SQLSTATE[HY000]: General error: 1 no such function: REGEXP: SELECT SUBSTRING_INDEX(name,'_',-1) FROM {users} WHERE name REGEXP :search ORDER BY CAST(SUBSTRING_INDEX(name,'_',-1) AS UNSIGNED) DESC LIMIT 0, 1; Array ( [:search] => ^user.name_[0-9]+$ ) dans email_registration_user_insert() (line 27 in /sites/all/modules/email_registration/email_registration.module).
Vanilla SQLite3 doesn't implement REGEXP, and even with sqlite3-pcre installed it doesn't seem to be loaded automatically.
Comments
Comment #1
gregglesThanks for testing. Can you try out the latest 7.x-1.x-dev with the patch in #421078: Abstract name unique check for re-use, make it is cross-database compatible, make it more robust, us it on external names? That should help.
Comment #2
tricasse commentedThis could be of interest to implement REGEXP: http://stackoverflow.com/questions/4663368/custom-regexp-function-to-be-...
Comment #3
gregglesAnd, if you can review that patch by testing it and commenting on what does/doesn't work - it will help it to get committed sooner :)
Comment #4
gregglesLooks like we cross-posted there. I might be open to that stackoverflow idea if the other issue doesn't result in a working solution, but I think we can find some other non-sql solution to the problem.
Comment #5
tricasse commentedAgreed; we just cross-posted and your non-SQL code is way better. I will upgrade to -dev in the next few days and report.