~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to sql/sql_delete.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000 MySQL AB
 
1
/*
 
2
   Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
2
3
 
3
4
   This program is free software; you can redistribute it and/or modify
4
5
   it under the terms of the GNU General Public License as published by
11
12
 
12
13
   You should have received a copy of the GNU General Public License
13
14
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
15
17
 
16
18
/*
17
19
  Delete of records and truncate of tables.
51
53
  THD::killed_state killed_status= THD::NOT_KILLED;
52
54
  DBUG_ENTER("mysql_delete");
53
55
  bool save_binlog_row_based;
 
56
  bool skip_record;
54
57
 
55
58
  THD::enum_binlog_query_type query_type=
56
59
    thd->lex->sql_command == SQLCOM_TRUNCATE ?
307
310
  {
308
311
    thd->examined_row_count++;
309
312
    // thd->is_error() is tested to disallow delete row on error
310
 
    if (!(select && select->skip_record())&& ! thd->is_error() )
 
313
    if (!select || (!select->skip_record(thd, &skip_record) && !skip_record))
311
314
    {
312
315
 
313
316
      if (triggers_applicable &&