summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2011-11-04 12:41:27 +0200
committerunknown <sanja@askmonty.org>2011-11-04 12:41:27 +0200
commit755cd443f95f8e6d064b18af3fb0c496b82abfe7 (patch)
treee210bf658169c43e9674da1b42741ac8e4185800 /sql
parentf2b6f4e3df2a41e15b155d6019dfa81982181e91 (diff)
parent26387734fd16e45333b26dabb78740473052cb36 (diff)
downloadmariadb-git-755cd443f95f8e6d064b18af3fb0c496b82abfe7.tar.gz
Merge of gcc 4.6 fixes
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_show.cc4
-rw-r--r--sql/sql_update.cc4
-rw-r--r--sql/table.cc2
3 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index fb0a6f23261..09db1b20393 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1272,7 +1272,7 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
handler *file= table->file;
TABLE_SHARE *share= table->s;
HA_CREATE_INFO create_info;
- bool show_table_options= FALSE;
+ bool show_table_options __attribute__ ((unused))= FALSE;
bool foreign_db_mode= (thd->variables.sql_mode & (MODE_POSTGRESQL |
MODE_ORACLE |
MODE_MSSQL |
@@ -1505,7 +1505,9 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
packet->append(STRING_WITH_LEN("\n)"));
if (!(thd->variables.sql_mode & MODE_NO_TABLE_OPTIONS) && !foreign_db_mode)
{
+#ifdef WITH_PARTITION_STORAGE_ENGINE
show_table_options= TRUE;
+#endif
/*
Get possible table space definitions and append them
to the CREATE TABLE statement
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 70572b406e5..c6f413e754e 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -2081,8 +2081,8 @@ int multi_update::do_updates()
err:
{
thd->fatal_error();
- prepare_record_for_error_message(local_error, table);
- table->file->print_error(local_error,MYF(0));
+ prepare_record_for_error_message(local_error, err_table);
+ err_table->file->print_error(local_error,MYF(0));
}
err2:
diff --git a/sql/table.cc b/sql/table.cc
index 21575e419da..bf7265e974f 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -5484,7 +5484,7 @@ int update_virtual_fields(THD *thd, TABLE *table, bool for_write)
{
DBUG_ENTER("update_virtual_fields");
Field **vfield_ptr, *vfield;
- int error= 0;
+ int error __attribute__ ((unused))= 0;
if (!table || !table->vfield)
DBUG_RETURN(0);