diff options
author | Michael Widenius <monty@askmonty.org> | 2012-08-14 19:59:28 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-08-14 19:59:28 +0300 |
commit | b886cac7123bc37d055fecd49d9a30ce0c39da73 (patch) | |
tree | c20877daef97377e843fd3c821a58b6c90f08174 /sql | |
parent | c0f04fa31cd46c2507b2152eeeeb4950e0d5edc9 (diff) | |
download | mariadb-git-b886cac7123bc37d055fecd49d9a30ce0c39da73.tar.gz |
Fixed compiler errors
Updated test to also work on 32 bit
mysql-test/suite/heap/heap.test:
Updated test to also work on 32 bit
Diffstat (limited to 'sql')
-rw-r--r-- | sql/create_options.cc | 5 | ||||
-rw-r--r-- | sql/ha_partition.cc | 2 | ||||
-rw-r--r-- | sql/item_subselect.cc | 21 | ||||
-rw-r--r-- | sql/multi_range_read.cc | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 3 |
6 files changed, 24 insertions, 11 deletions
diff --git a/sql/create_options.cc b/sql/create_options.cc index 9a6f6b5cf7c..e4881388688 100644 --- a/sql/create_options.cc +++ b/sql/create_options.cc @@ -137,7 +137,10 @@ static bool set_one_value(ha_create_table_option *opt, my_option optp= { opt->name, 1, 0, (uchar **)val, 0, 0, GET_ULL, - REQUIRED_ARG, opt->def_value, opt->min_value, opt->max_value, + REQUIRED_ARG, + (longlong) opt->def_value, + (longlong) opt->min_value, + opt->max_value, 0, (long) opt->block_size, 0}; ulonglong orig_val= strtoull(value->str, NULL, 10); diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 0d2b4387327..b3f97d35033 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3837,7 +3837,7 @@ int ha_partition::truncate_partition(Alter_info *alter_info, bool *binlog_stmt) { List_iterator<partition_element> subpart_it(part_elem->subpartitions); - partition_element *sub_elem; + partition_element *sub_elem __attribute__((unused)); uint j= 0, part; do { diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 49d232d31be..8b9904ea260 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -5167,10 +5167,16 @@ Ordered_key::cmp_keys_by_row_data(ha_rows a, ha_rows b) rowid_a= row_num_to_rowid + a * rowid_length; rowid_b= row_num_to_rowid + b * rowid_length; /* Fetch the rows for comparison. */ - error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a); - DBUG_ASSERT(!error); - error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b); - DBUG_ASSERT(!error); + if ((error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a))) + { + tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error + return 0; + } + if ((error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b))) + { + tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error + return 0; + } /* Compare the two rows by the corresponding values of the indexed columns. @@ -5245,8 +5251,11 @@ int Ordered_key::cmp_key_with_search_key(rownum_t row_num) uchar *cur_rowid= row_num_to_rowid + row_num * rowid_length; int error, cmp_res; - error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid); - DBUG_ASSERT(!error); + if ((error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid))) + { + tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error + return 0; + } for (uint i= 0; i < key_column_count; i++) { diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index 7268491c0f4..800602fe9e1 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -1404,7 +1404,7 @@ ha_rows DsMrr_impl::dsmrr_info(uint keyno, uint n_ranges, uint rows, uint key_parts, uint *bufsz, uint *flags, COST_VECT *cost) { - ha_rows res; + ha_rows res __attribute__((unused)); uint def_flags= *flags; uint def_bufsz= *bufsz; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 49014db9505..6f157c89ee2 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1325,7 +1325,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { STATUS_VAR *current_global_status_var; // Big; Don't allocate on stack ulong uptime; - uint length; + uint length __attribute__((unused)); ulonglong queries_per_second1000; char buff[250]; uint buff_len= sizeof(buff); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index da43b4b5e30..165e257d42d 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6408,7 +6408,8 @@ greedy_search(JOIN *join, uint size_remain; // cardinality of remaining_tables POSITION best_pos; JOIN_TAB *best_table; // the next plan node to be added to the curr QEP - uint n_tables; // ==join->tables or # tables in the sj-mat nest we're optimizing + // ==join->tables or # tables in the sj-mat nest we're optimizing + uint n_tables __attribute__((unused)); DBUG_ENTER("greedy_search"); |