summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2009-06-17 15:54:01 +0200
committerStaale Smedseng <staale.smedseng@sun.com>2009-06-17 15:54:01 +0200
commit3b0e6e41098557dab9fe7ca5c59f2863fd671b94 (patch)
treeb8fb3c1fb387986cd39d4dc291845cd51d2796e5 /sql/sql_insert.cc
parent689901f36f13b0ad5fe908998625493814ed33fa (diff)
downloadmariadb-git-3b0e6e41098557dab9fe7ca5c59f2863fd671b94.tar.gz
Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2 Compiling MySQL with gcc 4.3.2 and later produces a number of warnings, many of which are new with the recent compiler versions. This bug will be resolved in more than one patch to limit the size of changesets. This is the second patch, fixing more of the warnings.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 6d63a0907df..28b8bcd320d 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -413,7 +413,7 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type,
bool is_multi_insert)
{
if (duplic == DUP_UPDATE ||
- duplic == DUP_REPLACE && *lock_type == TL_WRITE_CONCURRENT_INSERT)
+ (duplic == DUP_REPLACE && *lock_type == TL_WRITE_CONCURRENT_INSERT))
{
*lock_type= TL_WRITE_DEFAULT;
return;
@@ -887,7 +887,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
if (changed)
query_cache_invalidate3(thd, table_list, 1);
}
- if (changed && error <= 0 || thd->transaction.stmt.modified_non_trans_table
+ if ((changed && error <= 0)
+ || thd->transaction.stmt.modified_non_trans_table
|| was_insert_delayed)
{
if (mysql_bin_log.is_open())
@@ -3016,8 +3017,8 @@ bool select_insert::send_eof()
We must invalidate the table in the query cache before binlog writing
and ha_autocommit_or_rollback
*/
-
- if (changed= (info.copied || info.deleted || info.updated))
+ changed= (info.copied || info.deleted || info.updated);
+ if (changed)
{
query_cache_invalidate3(thd, table, 1);
if (thd->transaction.stmt.modified_non_trans_table)