Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
database system
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
7 Aug 2007 at 08:22 UTC
Updated:
17 Sep 2007 at 17:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
dries commentedCommitted to CVS HEAD. Thanks! :)
Comment #2
Rok Žlender commentedI think this patch broke at least user access rules on mysql. Now masks like '%block%' do not work anymore. If you switch back to "text LIKE column" it works again.
I tested this on mysql 5.0.19
Example:
mask = %block%
SELECT * FROM `access` WHERE mask LIKE 'tblockt'
returns 0 results
SELECT * FROM `access` WHERE 'tblockt' LIKE mask
returns the correct result
Comment #3
hswong3i commentedBTW, when i test with following SQL, on MySQL 5.0.32-Debian_7etch1, it works fine:
i test it with Oracle 10gR2, and the result is similar: case 1 comes with empty result set, where case 2 returns values. so at least, it is not an issue with my MySQL server; on the other hand, it is also not an issue for Oracle. as this patch is mainly target for DB2, so surly it is also functioning with it :)
Comment #4
hswong3i commented@Rok Žlender: as there is no further update from you, and this patch is fully tested in both MySQL/Oracle/DB2/MSSQL, i will assume this issue as closed. if you still face some other problems, please feel free to attach more information, and i will try my best to repeat your case for testing :)
Comment #5
hswong3i commented@Zlender: thanks for your bug report, and i will solve that bugs within other issue: http://drupal.org/node/168403, and so this issue will make as duplicated :)
Comment #6
mooffie commented>
> SELECT t.tid, t.* FROM {term_data} t WHERE WHERE LOWER('%s') LIKE LOWER(t.name)
>
Isn't this weird? Why not simply do
WHERE LOWER('%s') = LOWER(t.name)?I tried to trace the history of this line[1]. It seems that in those days the taxonomy module was quite different than what it is today[2] and the use of LIKE invaded this line as well. (Do you want me to prepare a patch that removes this LIKE?)
[1] http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/taxonomy/taxonomy....
[2] http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/taxonomy/taxonomy....
Comment #7
hswong3i commented@mooffie: sorry that i can't find the line that you point out, from latest CVS HEAD. would you mind to have a double check?
Comment #8
mooffie commented>
> i can't find the line that you point out
I quoted this line from your patch. It's in one of the two lines that you've changed.
(I didn't criticize your code but the code of our "forefathers" :-)
Comment #9
chx commentedThe must be rolled back as it broke MySQL. @hswong3i: replacing a trivial but critical bugfix with a complicated feature request is not a duplicate!
Comment #10
hswong3i commented@chx: thanks about this patch. as i am now working for same thing, you save my time for duplicate work, many thanks :)
P.S. i can SIMPLIFY that implementation (http://drupal.org/node/168403) into VERY simple, or even lossy than current implementation. but will you accept for something like that? i don't really think so. i think we will not accept something that don't give any improvement, and that's why i try to extend it. and the result is not too bad: feature is extended, with no performance drop, and cross database compatible.
so why not accepting it? surly because it is something too late. i will postpone that extension into D7, so would you feel much better about that?
Comment #11
dries commentedCommitted to CVS HEAD. Thanks.
Comment #12
(not verified) commented