~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-proposed

« back to all changes in this revision

Viewing changes to sql/sql_prepare.cc

  • Committer: Package Import Robot
  • Author(s): Dave Chiluk, Eduardo Damato
  • Date: 2014-01-09 09:44:14 UTC
  • mfrom: (18.1.5 precise-security)
  • Revision ID: package-import@ubuntu.com-20140109094414-ght3gi7yvzsyvhm5
Tags: 5.5.34-0ubuntu0.12.04.2
[ Eduardo Damato ]
Fix upstart script to account for datadir disk shortage (LP: #1121874) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
 
1
/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
   This program is free software; you can redistribute it and/or modify
4
4
   it under the terms of the GNU General Public License as published by
113
113
#include <mysql_com.h>
114
114
#endif
115
115
#include "lock.h"                               // MYSQL_OPEN_FORCE_SHARED_MDL
 
116
#include "transaction.h"                        // trans_rollback_implicit
116
117
 
117
118
/**
118
119
  A result class used to send cursor rows using the binary protocol.
3297
3298
 
3298
3299
  close_thread_tables(thd);
3299
3300
  thd->mdl_context.rollback_to_savepoint(mdl_savepoint);
 
3301
 
 
3302
  /*
 
3303
    Transaction rollback was requested since MDL deadlock was discovered
 
3304
    while trying to open tables. Rollback transaction in all storage
 
3305
    engines including binary log and release all locks.
 
3306
 
 
3307
    Once dynamic SQL is allowed as substatements the below if-statement
 
3308
    has to be adjusted to not do rollback in substatement.
 
3309
  */
 
3310
  DBUG_ASSERT(! thd->in_sub_stmt);
 
3311
  if (thd->transaction_rollback_request)
 
3312
  {
 
3313
    trans_rollback_implicit(thd);
 
3314
    thd->mdl_context.release_transactional_locks();
 
3315
  }
 
3316
 
3300
3317
  lex_end(lex);
3301
3318
  cleanup_stmt();
3302
3319
  thd->restore_backup_statement(this, &stmt_backup);