Browse Source

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.
pull/843/head
Alexey Botchkov 14 years ago
parent
commit
56125a3bce
  1. 1
      mysql-test/suite/innodb_plugin/t/innodb_gis.test
  2. 2
      sql/gcalc_slicescan.cc
  3. 5
      sql/gcalc_tools.cc

1
mysql-test/suite/innodb_plugin/t/innodb_gis.test

@ -1,3 +1,4 @@
-- source include/have_innodb_plugin.inc
SET storage_engine=innodb;
--source include/gis_generic.inc
--source include/gis_keys.inc

2
sql/gcalc_slicescan.cc

@ -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)
{

5
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);

Loading…
Cancel
Save