Commit 76a6bed4 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Change to make mysql 5.X happy. The gist of this change is this that

there is a query (by Mike I think) that has this form:

          SELECT * FROM t1, t2 JOIN t3 ON  ...

Prior to 5.X, the comma operator had the same precedence as join, and
so it was evaluated left to right. Well, now comma is lower then join
and this query breaks cause the right side is evaluated before the
left side. The solution is simply:

          SELECT * FROM (t1, t2) JOIN t3 ON  ...

but as the manual points out, why not just use:

          SELECT * FROM t1 JOIN t2 JOIN t3 ON ...

and avoid precedence issues.
parent ed2a0478
......@@ -417,7 +417,7 @@ if ($query_result->numrows) {
#
$query_result =
DBQueryFatal("select v.member,v.vname,i.mac,ve.mac,l.iface".
" from reserved as r, virt_lans as v".
" from (reserved as r, virt_lans as v)".
" left join interfaces as i".
" on v.ip=i.IP and r.node_id=i.node_id".
" left join linkdelays as l".
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment