Commit 1db19cd3 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Catalog: Properly delimit multiple SQL queries (already fixed in master).

SQL query separator is ';' whereas it is '\0' for ZSQLCatalog. Without
this, "Commands out of sync; you can't run this command now" errors
may happen.
parent a3b87aed
...@@ -61,7 +61,7 @@ WHERE\n ...@@ -61,7 +61,7 @@ WHERE\n
<dtml-in uid>\n <dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n <dtml-var sql_delimiter>\n
<dtml-var "\'\\0\'"><dtml-let document_list="[]">\n <dtml-var "\'\\0\'"><dtml-let document_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if "SearchableText[loop_item]">\n <dtml-if "SearchableText[loop_item]">\n
......
8 9
\ No newline at end of file \ No newline at end of file
...@@ -69,7 +69,7 @@ WHERE\n ...@@ -69,7 +69,7 @@ WHERE\n
<dtml-in uid>\n <dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n <dtml-var sql_delimiter>\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n \n
......
...@@ -56,7 +56,7 @@ getMeasureRowList</string> </value> ...@@ -56,7 +56,7 @@ getMeasureRowList</string> </value>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
DELETE FROM `measure` WHERE\n DELETE FROM `measure` WHERE\n
<dtml-sqltest uid column="resource_uid" type="int" multiple>;\n <dtml-sqltest uid column="resource_uid" type="int" multiple><dtml-var sql_delimiter>\n
\n \n
<dtml-let measure_list="[]">\n <dtml-let measure_list="[]">\n
<dtml-in getMeasureRowList prefix="loop">\n <dtml-in getMeasureRowList prefix="loop">\n
......
...@@ -61,7 +61,7 @@ WHERE\n ...@@ -61,7 +61,7 @@ WHERE\n
<dtml-in uid>\n <dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n <dtml-var sql_delimiter>\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
<dtml-let category_list="[]">\n <dtml-let category_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
......
...@@ -61,7 +61,7 @@ WHERE\n ...@@ -61,7 +61,7 @@ WHERE\n
<dtml-in uid>\n <dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n <dtml-var sql_delimiter>\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
<dtml-let category_list="[]">\n <dtml-let category_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
......
...@@ -63,7 +63,7 @@ WHERE\n ...@@ -63,7 +63,7 @@ WHERE\n
<dtml-in uid>\n <dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n <dtml-var sql_delimiter>\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n \n
......
...@@ -39,7 +39,7 @@ getQuantityUnitConversionDefinitionRowList\r\n ...@@ -39,7 +39,7 @@ getQuantityUnitConversionDefinitionRowList\r\n
\n \n
<dtml-if quantity_unit_conversion_dict>\n <dtml-if quantity_unit_conversion_dict>\n
DELETE FROM `quantity_unit_conversion` WHERE\n DELETE FROM `quantity_unit_conversion` WHERE\n
<dtml-sqltest "quantity_unit_conversion_dict.keys()" column="resource_uid" type="int" multiple>;\n <dtml-sqltest "quantity_unit_conversion_dict.keys()" column="resource_uid" type="int" multiple><dtml-var sql_delimiter>\n
\n \n
\n \n
<dtml-var sql_delimiter>\n <dtml-var sql_delimiter>\n
......
...@@ -89,7 +89,7 @@ WHERE\n ...@@ -89,7 +89,7 @@ WHERE\n
<dtml-in uid>\n <dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n <dtml-var sql_delimiter>\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
<dtml-let row_list="[]" uid_dict="{}">\n <dtml-let row_list="[]" uid_dict="{}">\n
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
DELETE FROM `transformation` WHERE\n DELETE FROM `transformation` WHERE\n
<dtml-sqltest expr="outer_item[\'uid\']" column="uid" type="int">\n <dtml-sqltest expr="outer_item[\'uid\']" column="uid" type="int">\n
AND\n AND\n
<dtml-sqltest expr="outer_item[\'variation_text\']" column="variation_text" type="string">;\n <dtml-sqltest expr="outer_item[\'variation_text\']" column="variation_text" type="string"><dtml-var sql_delimiter>\n
<dtml-var sql_delimiter>\n <dtml-var sql_delimiter>\n
<dtml-call "row_list.extend(outer_item[\'row_dict_list\'])">\n <dtml-call "row_list.extend(outer_item[\'row_dict_list\'])">\n
</dtml-in>\n </dtml-in>\n
......
...@@ -61,7 +61,7 @@ VALUES\n ...@@ -61,7 +61,7 @@ VALUES\n
<dtml-in "_.range(count - 1)">\n <dtml-in "_.range(count - 1)">\n
( <dtml-sqlvar instance_id type="string"> , \'reserved\' ) ,\n ( <dtml-sqlvar instance_id type="string"> , \'reserved\' ) ,\n
</dtml-in>\n </dtml-in>\n
( <dtml-sqlvar instance_id type="string"> , \'reserved\' );\n ( <dtml-sqlvar instance_id type="string"> , \'reserved\' )<dtml-var sql_delimiter>\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n \n
......
263 264
\ No newline at end of file \ No newline at end of file
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