Commit c4316063 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[ms planner] fix buggy temp table name generation, may generate duplicated...

[ms planner] fix buggy temp table name generation, may generate duplicated unique id with subqueries/union

--HG--
branch : stable
parent f72e3f4666b0
......@@ -1420,9 +1420,7 @@ class MSPlanner(SSPlanner):
steps.append(ppi.build_final_part(minrqlst, solindices, inputmap,
sources, insertedvars))
else:
table = '_T%s%s' % (''.join(sorted(v._ms_table_key() for v in terms)),
''.join(sorted(str(i) for i in solindices)))
table = plan.make_temp_table_name(table)
table = plan.make_temp_table_name('T%s' % make_uid(id(select)))
ppi.build_non_final_part(minrqlst, solindices, sources,
insertedvars, table)
# finally: join parts, deal with aggregat/group/sorts if necessary
......
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