Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
menu system
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
30 May 2007 at 04:12 UTC
Updated:
15 Jun 2007 at 09:48 UTC
Jump to comment: Most recent file
this patch change 2 parts:
the original query is functioning within mysql, but not oracle friendly. on the other hand, it change the query into a formal format, which also increase cross DB compatibility.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | drupal-6.x-dev-menu_sql_friendly-3.0.diff | 1.22 KB | hswong3i |
| #13 | drupal-6.x-dev-menu_sql_friendly-2.0.diff | 1.13 KB | hswong3i |
| #10 | rollback_tree_data_sql_1.patch | 1.07 KB | pwolanin |
| #7 | rollback_1.patch | 803 bytes | chx |
| drupal-6.x-dev-menu_sql_friendly-1.0.diff | 1.48 KB | hswong3i |
Comments
Comment #1
dries commentedCommitted to CVS HEAD. Thanks.
Comment #2
dries commentedComment #3
Frando commentedThis needs to be rolled back. It breaks HEAD - it causes an infinite loop in menu.inc line 965. (debug credits go to chx).
Comment #4
eaton commentedThis completely broke head and made it impossible to load any pages. The difference between '' and NULL is non-trivial in this case. if it's changed the change will have to include the logic in menu.inc that handles building paths, etc.
Comment #5
eaton commentedComment #6
Frando commentedMarking this RTBC so that the commiters see it. The original patch should simply be rolled back. We can think about an actual solution for this when HEAD is working again. Thanks.
Comment #7
chx commentedOnly one hunk needs to be rolled back, here is the rollback patch.
Comment #8
Frando commentedThis has been rolled back. Marking as CNW as the original issue remains unsolved.
Comment #9
pwolanin commentedOne of the queries in menu.inc is still broken in menu_tree_all_data(), includes/menu.inc line 640
I included a fix as part of the patch here: http://drupal.org/files/issues/book_to_outline_23.patch
or I can roll a separate patch.
Comment #10
pwolanin commentedseparate menu.inc patch. Just reverts the other part - that function is used heavily by the patched book.module and was broken too.
Comment #11
mike2854 commentedthe way for MySQL treating IS NOT NULL differs from Oracle's
They give different results.
no records are resulted in Oracle
as null comparison always give FALSE in Oracle.
Could we have != ' ' instead of != ''
I found the result from MySQL and Oracle are same
Or any other database give different result?
Comment #12
hswong3i commentedmy suggestion is: handle such different within oracle driver, but not changing SQL query in modules. this is because:
as you can see this is not the only problem of menu.inc, but quite normal among other DB... this is oracle only problem (http://www.techonthenet.com/oracle/isnotnull.php):
we may take some preg_replace, change
!= ''intoIS NOT NULL... this may need to preform before mapping any %s/%d, etc. as db_query() become private function right now, we may handle this within it... not the best solution, but at least logically correct ;(any other better suggestion?
Comment #13
hswong3i commentedthis v2.0 patch will handle the 1st invaild SQL query in line 637 of menu.inc. v1.0 face error just because the system.schema change the struct of table menu_links: rename from href to link_path.
i build the patch from CVS HEAD on last night, and test the patch with mysql version, and passed. patch is ready to recommit ;-)
Comment #14
dries commentedCommitted. Thanks.
Comment #15
hswong3i commentedmike just find another SQL which contain the similar problem, under current CVS HEAD. here is the patch.
mike test it with oracle; and i test it with mysql, which directly run menu_tree_page_data() and display correct result ;D
Comment #16
moshe weitzman commentedlooks fine to me.
Comment #17
hswong3i commentedthis patch is now depended on oracle driver version 5.3 for drupal-6.x-dev (please refer to #113), and should be committed before that ;D
Comment #18
dries commentedCommitted. Thanks.
Comment #19
(not verified) commented