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

greggles’s picture

Status: Active » Closed (duplicate)

Thanks 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.

tricasse’s picture

Status: Closed (duplicate) » Active
greggles’s picture

Status: Active » Closed (duplicate)

And, 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 :)

greggles’s picture

Looks 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.

tricasse’s picture

Agreed; we just cross-posted and your non-SQL code is way better. I will upgrade to -dev in the next few days and report.