~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/delete.cc

Style cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <drizzled/server_includes.h>
22
22
#include <drizzled/show.h>
23
23
#include <drizzled/session.h>
24
24
#include <drizzled/lock.h>
25
25
#include <drizzled/probes.h>
26
26
#include <drizzled/statement/delete.h>
27
27
 
28
 
namespace drizzled
29
 
{
 
28
using namespace drizzled;
30
29
 
31
30
bool statement::Delete::execute()
32
31
{
33
 
  DRIZZLE_DELETE_START(session->getQueryString()->c_str());
 
32
  DRIZZLE_DELETE_START(session->query);
34
33
  TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;
35
34
  TableList *all_tables= session->lex->query_tables;
36
35
  Select_Lex *select_lex= &session->lex->select_lex;
40
39
  unit->set_limit(select_lex);
41
40
  bool need_start_waiting= false;
42
41
 
43
 
  if (! (need_start_waiting= not session->wait_if_global_read_lock(0, 1)))
 
42
  if (! (need_start_waiting= ! wait_if_global_read_lock(session, 0, 1)))
44
43
  {
45
44
    return true;
46
45
  }
53
52
    Release the protection against the global read lock and wake
54
53
    everyone, who might want to set a global read lock.
55
54
  */
56
 
  session->startWaitingGlobalReadLock();
57
 
 
 
55
  start_waiting_global_read_lock(session);
58
56
  return res;
59
57
}
60
 
 
61
 
} /* namespace drizzled */