Commit a93d043e authored by Mike Hibler's avatar Mike Hibler
Browse files

Get rid of a left join that was producing an all NULL row for wires.

Mysql 5.7 refuses to load it since it tries to load NULL in a non-NULL field.
Apparently mysql 5.5 was okay with this.
parent b11e7973
...@@ -1019,12 +1019,12 @@ sub DumpDBGoo() ...@@ -1019,12 +1019,12 @@ sub DumpDBGoo()
# interfaces in the inner emulab. Use a temp table again. # interfaces in the inner emulab. Use a temp table again.
# #
DBQueryWarn("create temporary table temp_interfaces ". DBQueryWarn("create temporary table temp_interfaces ".
"select t.* from reserved as r ". "select t.* ".
"left join interfaces as t on t.node_id=r.node_id ". "from reserved as r, interfaces as t, virt_nodes as v where ".
"left join virt_nodes as v on v.vname=r.vname and ". " t.node_id=r.node_id and ".
" v.pid=r.pid and v.eid=r.eid ". " v.vname=r.vname and v.pid=r.pid and v.eid=r.eid and ".
"where r.pid='$pid' and r.eid='$eid' and ". " r.pid='$pid' and r.eid='$eid' and ".
" v.inner_elab_role in ('node','ops','fs','ops+fs')") " v.inner_elab_role in ('node','ops','fs','ops+fs')")
or die("*** $0:\n". or die("*** $0:\n".
" Could not create temporary table temp_interfaces\n"); " Could not create temporary table temp_interfaces\n");
...@@ -1072,13 +1072,13 @@ sub DumpDBGoo() ...@@ -1072,13 +1072,13 @@ sub DumpDBGoo()
# And the wires table. Strip out the control wires; not needed. # And the wires table. Strip out the control wires; not needed.
DBQueryWarn("create temporary table temp_wires ". DBQueryWarn("create temporary table temp_wires ".
"select t.* from reserved as r ". "select t.* ".
"left join virt_nodes as v on v.vname=r.vname and ". "from reserved as r, virt_nodes as v, wires as t where ".
" v.pid=r.pid and v.eid=r.eid ". " v.vname=r.vname and v.pid=r.pid and v.eid=r.eid and ".
"left join wires as t on t.node_id1=r.node_id ". " t.node_id1=r.node_id and ".
($elabinelab_singlenet == 0 ? " and t.type='Node' " : " ") . ($elabinelab_singlenet ? "" : "t.type='Node' and ") .
"where r.pid='$pid' and r.eid='$eid' and ". " r.pid='$pid' and r.eid='$eid' and ".
" v.inner_elab_role in ('node','ops','fs','ops+fs') ") " v.inner_elab_role in ('node','ops','fs','ops+fs')")
or die("*** $0:\n". or die("*** $0:\n".
" Could not create temporary table temp_wires\n"); " Could not create temporary table temp_wires\n");
......
Supports Markdown
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