summaryrefslogtreecommitdiff
path: root/sql/gcalc_tools.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2011-12-16 10:21:46 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2011-12-16 10:21:46 +0400
commit56125a3bceb7a375610d4f4c04c9465fa324d516 (patch)
tree4a0a749af9fd523499b5ccfa32b32f1c2cecd93e /sql/gcalc_tools.cc
parent919f19110fbcfb4326559f48f7ba9fa5c35d904d (diff)
downloadmariadb-git-56125a3bceb7a375610d4f4c04c9465fa324d516.tar.gz
GIS issues fixed.
Failures on SUN Solaris. Buggy compiler there required some extra initialization for variables. Then the 02 optimization leads to bugs when values set through the pointer are not always taken into account. Finally, the (long long) / (long) crashes there, the explicit typeconverstion added. Failing innodb_plunin.innodb_gis.test fixed. per-file comments: mysql-test/suite/innodb_plugin/t/innodb_gis.test GIS issues fixed. sql/gcalc_slicescan.cc GIS issues fixed. sql/gcalc_tools.cc GIS issues fixed.
Diffstat (limited to 'sql/gcalc_tools.cc')
-rw-r--r--sql/gcalc_tools.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/gcalc_tools.cc b/sql/gcalc_tools.cc
index 8af94039c2d..729b322769c 100644
--- a/sql/gcalc_tools.cc
+++ b/sql/gcalc_tools.cc
@@ -1353,6 +1353,10 @@ int Gcalc_operation_reducer::get_result(Gcalc_result_receiver *storage)
GCALC_DBUG_ENTER("Gcalc_operation_reducer::get_result");
*m_res_hook= NULL;
+ /* This is to workaround an old gcc's bug */
+ if (m_res_hook == (Gcalc_dyn_list::Item **) &m_result)
+ goto done;
+
while (m_result)
{
Gcalc_function::shape_type shape= m_result->type;
@@ -1403,6 +1407,7 @@ int Gcalc_operation_reducer::get_result(Gcalc_result_receiver *storage)
}
}
+done:
m_res_hook= (Gcalc_dyn_list::Item **)&m_result;
storage->done();
GCALC_DBUG_RETURN(0);