Commit 1c9f5ec4 authored by Alexey Botchkov's avatar Alexey Botchkov

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.
parent bdfb5d10
-- source include/have_innodb_plugin.inc
SET storage_engine=innodb;
--source include/gis_generic.inc
--source include/gis_keys.inc
......
......@@ -432,7 +432,7 @@ void gcalc_mul_coord(Gcalc_internal_coord *result, int result_len,
gcalc_coord2 cur_b= n_b ? b[n_b] : FIRST_DIGIT(b[0]);
gcalc_coord2 mul= cur_a * cur_b + carry + result[n_a + n_b + 1];
result[n_a + n_b + 1]= mul % GCALC_DIG_BASE;
carry= (gcalc_digit_t) (mul / GCALC_DIG_BASE);
carry= (gcalc_digit_t) (mul / (gcalc_coord2) GCALC_DIG_BASE);
} while (n_b--);
if (carry)
{
......
......@@ -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);
......
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