diff options
author | montellese <montellese@xbmc.org> | 2014-03-04 23:50:02 +0100 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2014-03-08 22:34:12 +0100 |
commit | 9cb621e0027773f9411879b34380bfb6b297a287 (patch) | |
tree | ab295934d68e73785580cbf73d33797e8d1a5d88 | |
parent | dc5fff940f8e3e484c0b916ebe489fd78b4c0483 (diff) |
mysql: replace all "cast(foo as integer)" to "cast(foo as signed integer)" and not just the first one
-rw-r--r-- | xbmc/dbwrappers/mysqldataset.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/dbwrappers/mysqldataset.cpp b/xbmc/dbwrappers/mysqldataset.cpp index c186fdf20b..b85cbf31ba 100644 --- a/xbmc/dbwrappers/mysqldataset.cpp +++ b/xbmc/dbwrappers/mysqldataset.cpp @@ -1484,7 +1484,7 @@ bool MysqlDataset::query(const char *query) { size_t loc; // mysql doesn't understand CAST(foo as integer) => change to CAST(foo as signed integer) - if ((loc = ci_find(qry, "as integer)")) != string::npos) + while ((loc = ci_find(qry, "as integer)")) != string::npos) qry = qry.insert(loc + 3, "signed "); MYSQL_RES *stmt = NULL; |