Browse Source

branches/zip: Merge revision 4358 from branches/5.1 (resolving a conflict):

------------------------------------------------------------------------
  r4358 | vasil | 2009-03-05 21:21:10 +0200 (Thu, 05 Mar 2009) | 21 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
  
  branches/5.1:
  
  Merge a change from MySQL:
  
    ------------------------------------------------------------
    revno: 2728.19.1
    committer: Alfranio Correia <alfranio.correia@sun.com>
    branch nick: mysql-5.1-bugteam
    timestamp: Tue 2009-02-03 11:36:46 +0000
    message:
      BUG#42445 Warning messages in innobase/handler/ha_innodb.cc
            
      There was a type casting problem in the storage/innobase/handler/ha_innodb.cc,
      (int ha_innobase::write_row(...)). Innobase uses has an internal error variable
      of type 'ulint' while mysql uses an 'int'. 
            
      To fix the problem the function manipulates an error variable of
      type 'ulint' and only casts it into 'int' when needs to return the value.
    modified:
      storage/innobase/handler/ha_innodb.cc
  
  ------------------------------------------------------------------------
pull/374/head
vasil 17 years ago
parent
commit
86fab45ad1
  1. 13
      handler/ha_innodb.cc

13
handler/ha_innodb.cc

@ -4113,7 +4113,8 @@ ha_innobase::write_row(
/* out: error code */
uchar* record) /* in: a row in MySQL format */
{
int error = 0;
ulint error = 0;
int error_result= 0;
ibool auto_inc_used= FALSE;
ulint sql_command;
trx_t* trx = thd_to_trx(user_thd);
@ -4229,6 +4230,7 @@ no_commit:
}
/* MySQL errors are passed straight back. */
error_result = (int) error;
goto func_exit;
}
@ -4321,7 +4323,7 @@ set_max_autoinc:
err = innobase_set_max_autoinc(auto_inc);
if (err != DB_SUCCESS) {
error = (int) err;
error = err;
}
}
break;
@ -4331,13 +4333,14 @@ set_max_autoinc:
innodb_srv_conc_exit_innodb(prebuilt->trx);
report_error:
error = convert_error_code_to_mysql(error, prebuilt->table->flags,
user_thd);
error_result = convert_error_code_to_mysql((int) error,
prebuilt->table->flags,
user_thd);
func_exit:
innobase_active_small();
DBUG_RETURN(error);
DBUG_RETURN(error_result);
}
/**************************************************************************

Loading…
Cancel
Save