diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-09-04 12:58:21 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-09-04 12:58:21 +0200 |
commit | cfb109b87f5f930365681b0944e683652903749e (patch) | |
tree | 67a3f71ed7853528a9aae056000b049994dbdd98 | |
parent | 66b1bdd314c25c3485eab86e976b2a05d5c724c1 (diff) | |
download | bugzilla-cfb109b87f5f930365681b0944e683652903749e.tar.gz bugzilla-cfb109b87f5f930365681b0944e683652903749e.tar.xz |
Bug 787687: SQLite doesn't support CHAR_LENGTH natively
r=wicked a=LpSolit
-rw-r--r-- | Bugzilla/DB/Sqlite.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Bugzilla/DB/Sqlite.pm b/Bugzilla/DB/Sqlite.pm index 5564e21df..5810ab4d7 100644 --- a/Bugzilla/DB/Sqlite.pm +++ b/Bugzilla/DB/Sqlite.pm @@ -131,6 +131,7 @@ sub new { # so that's what we use, and I don't know of any way in SQLite to # alias the SQL "substr" function to be called "SUBSTRING". $self->sqlite_create_function('substring', 3, \&CORE::substr); + $self->sqlite_create_function('char_length', 1, sub { length($_[0]) }); $self->sqlite_create_function('mod', 2, \&_sqlite_mod); $self->sqlite_create_function('now', 0, \&_sqlite_now); $self->sqlite_create_function('localtimestamp', 1, \&_sqlite_now); |