diff options
-rw-r--r-- | mysql-test/suite/innodb_plugin/t/innodb_gis.test | 1 | ||||
-rw-r--r-- | sql/gcalc_slicescan.cc | 2 | ||||
-rw-r--r-- | sql/gcalc_tools.cc | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_gis.test b/mysql-test/suite/innodb_plugin/t/innodb_gis.test index dec0c8bf725..6869f179fd7 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb_gis.test +++ b/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 diff --git a/sql/gcalc_slicescan.cc b/sql/gcalc_slicescan.cc index 3c02bf62e53..9e88f0a00ad 100644 --- a/sql/gcalc_slicescan.cc +++ b/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) { 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); |