Merge lp:~trond-norbye/drizzle/dtrace-macosx-support into lp:~drizzle-trunk/drizzle/development

Proposed by Trond Norbye
Status: Merged
Approved by: Jay Pipes
Approved revision: 1151
Merged at revision: not available
Proposed branch: lp:~trond-norbye/drizzle/dtrace-macosx-support
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: None lines
To merge this branch: bzr merge lp:~trond-norbye/drizzle/dtrace-macosx-support
Reviewer Review Type Date Requested Status
Padraig O'Sullivan (community) Approve
Review via email: mp+11883@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Trond Norbye (trond-norbye) wrote :

Hi,

I couldn't resist to test this today and I noticed that it was so simple that I thought I should send you a patch :-)

With this patch you can add --enable-dtrace on Mac OSX as well :-)

Cheers,

Trond

Revision history for this message
Padraig O'Sullivan (posulliv) wrote :

Cool, looks good to me! Should I merge this in to my branch or will I just let Monty or Jay pull it in one of their captain branches?

-Padraig

review: Approve
Revision history for this message
Trond Norbye (trond-norbye) wrote :

On 17. sep.. 2009, at 02.15, Padraig O'Sullivan wrote:

> Review: Approve
> Cool, looks good to me! Should I merge this in to my branch or will
> I just let Monty or Jay pull it in one of their captain branches?
>

It was for your branch... I had written something wrong in the text
field so it complained to me and when I then resubmitted the field it
had toggled it back to lp:drizzle instead of just you :(

Cheers

Trond

Revision history for this message
Padraig O'Sullivan (posulliv) wrote :

I'll merge it in to my branch and re-submit my branch.

Thanks again,
Padraig

Revision history for this message
Jay Pipes (jaypipes) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'drizzled/Makefile.am'
--- drizzled/Makefile.am 2009-08-27 00:39:15 +0000
+++ drizzled/Makefile.am 2009-09-16 13:51:30 +0000
@@ -18,10 +18,16 @@
1818
19DTRACEFILES = handler.o \19DTRACEFILES = handler.o \
20 filesort.o \20 filesort.o \
21 drizzled.o \
22 session.o \
21 sql_delete.o \23 sql_delete.o \
22 sql_insert.o \24 sql_insert.o \
23 sql_select.o \25 sql_select.o \
24 sql_update.o26 sql_update.o \
27 sql_parse.o \
28 statement/delete.o \
29 statement/insert.o \
30 statement/insert_select.o
2531
26drizzledincludedir = ${includedir}/drizzled32drizzledincludedir = ${includedir}/drizzled
27nobase_dist_drizzledinclude_HEADERS = \33nobase_dist_drizzledinclude_HEADERS = \
@@ -694,10 +700,6 @@
694 util/convert.cc \700 util/convert.cc \
695 xid.cc701 xid.cc
696702
697if HAVE_DTRACE
698drizzled_SOURCES += probes.d
699endif
700
701libserialutil_la_SOURCES = db.cc table_proto_write.cc703libserialutil_la_SOURCES = db.cc table_proto_write.cc
702libserialutil_la_CXXFLAGS= ${AM_CXXFLAGS} ${PROTOSKIP_WARNINGS}704libserialutil_la_CXXFLAGS= ${AM_CXXFLAGS} ${PROTOSKIP_WARNINGS}
703705
@@ -725,7 +727,7 @@
725BUILT_SOURCES = $(BUILT_MAINT_SRC) \727BUILT_SOURCES = $(BUILT_MAINT_SRC) \
726 symbol_hash.h \728 symbol_hash.h \
727 function_hash.h \729 function_hash.h \
728 $(PCHHEADERS)730 $(PCHHEADERS)
729731
730EXTRA_DIST = \732EXTRA_DIST = \
731 $(BUILT_MAINT_SRC) \733 $(BUILT_MAINT_SRC) \
@@ -744,16 +746,29 @@
744 $(PCHHEADERS) \746 $(PCHHEADERS) \
745 $(nodist_drizzled_SOURCES)747 $(nodist_drizzled_SOURCES)
746748
749if DTRACE_NEEDS_OBJECTS
750drizzled_SOURCES += probes.d
751endif
752
753if HAVE_DTRACE
754BUILT_SOURCES += generated_probes.h
755CLEANFILES += generated_probes.h
756endif
757
758
747DISTCLEANFILES = $(EXTRA_PROGRAMS) \759DISTCLEANFILES = $(EXTRA_PROGRAMS) \
748 $(BUILT_MAINT_SRC)760 $(BUILT_MAINT_SRC)
749761
750MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC)762MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC)
751763
752probes.h: probes.d764generated_probes.h : probes.d
753 $(DTRACE) $(DTRACEFLAGS) -h -s probes.d765 $(DTRACE) $(DTRACEFLAGS) -h -s probes.d -o generated_probes.h
754 mv probes.h probes.h.bak766 mv generated_probes.h generated_probes.h.bak
755 sed "s/#include <unistd.h>//g" probes.h.bak > probes.h767 sed "s/#include <unistd.h>//g" generated_probes.h.bak > generated_probes.h
756 rm probes.h.bak768 rm generated_probes.h.bak
769 sed -e 's,void \*,const void \*,g' generated_probes.h | \
770 sed -e 's,char \*,const char \*,g' | tr '\t' ' ' > dtrace_probes.tmp
771 mv dtrace_probes.tmp generated_probes.h
757772
758773
759SUFFIXES = .d .gch .gperf .stamp-h774SUFFIXES = .d .gch .gperf .stamp-h
760775
=== modified file 'drizzled/drizzled.cc'
--- drizzled/drizzled.cc 2009-08-24 14:57:56 +0000
+++ drizzled/drizzled.cc 2009-09-13 04:30:14 +0000
@@ -45,6 +45,7 @@
45#include <drizzled/scheduling.h>45#include <drizzled/scheduling.h>
46#include "drizzled/temporal_format.h" /* For init_temporal_formats() */46#include "drizzled/temporal_format.h" /* For init_temporal_formats() */
47#include "drizzled/slot/listen.h"47#include "drizzled/slot/listen.h"
48#include "drizzled/probes.h"
4849
49#include <google/protobuf/stubs/common.h>50#include <google/protobuf/stubs/common.h>
5051
@@ -456,6 +457,7 @@
456 tmp= *it;457 tmp= *it;
457 tmp->killed= Session::KILL_CONNECTION;458 tmp->killed= Session::KILL_CONNECTION;
458 tmp->scheduler->killSession(tmp);459 tmp->scheduler->killSession(tmp);
460 DRIZZLE_CONNECTION_DONE(tmp->thread_id);
459 if (tmp->mysys_var)461 if (tmp->mysys_var)
460 {462 {
461 tmp->mysys_var->abort=1;463 tmp->mysys_var->abort=1;
@@ -766,6 +768,7 @@
766 {768 {
767 statistic_increment(killed_threads, &LOCK_status);769 statistic_increment(killed_threads, &LOCK_status);
768 session->scheduler->killSessionNow(session);770 session->scheduler->killSessionNow(session);
771 DRIZZLE_CONNECTION_DONE(session->thread_id);
769 }772 }
770 return;773 return;
771}774}
772775
=== modified file 'drizzled/filesort.cc'
--- drizzled/filesort.cc 2009-08-20 20:29:18 +0000
+++ drizzled/filesort.cc 2009-09-13 01:09:19 +0000
@@ -114,7 +114,7 @@
114 TableList *tab= table->pos_in_table_list;114 TableList *tab= table->pos_in_table_list;
115 Item_subselect *subselect= tab ? tab->containing_subselect() : 0;115 Item_subselect *subselect= tab ? tab->containing_subselect() : 0;
116116
117 DRIZZLE_FILESORT_START();117 DRIZZLE_FILESORT_START(table->s->db.str, table->s->table_name.str);
118118
119 /*119 /*
120 Release InnoDB's adaptive hash index latch (if holding) before120 Release InnoDB's adaptive hash index latch (if holding) before
@@ -324,8 +324,8 @@
324 (uint32_t) records, &LOCK_status);324 (uint32_t) records, &LOCK_status);
325 *examined_rows= param.examined_rows;325 *examined_rows= param.examined_rows;
326 memcpy(&table->sort, &table_sort, sizeof(filesort_info_st));326 memcpy(&table->sort, &table_sort, sizeof(filesort_info_st));
327 DRIZZLE_FILESORT_END();327 DRIZZLE_FILESORT_DONE(error, records);
328 return(error ? HA_POS_ERROR : records);328 return (error ? HA_POS_ERROR : records);
329} /* filesort */329} /* filesort */
330330
331331
332332
=== modified file 'drizzled/handler.cc'
--- drizzled/handler.cc 2009-08-23 01:10:19 +0000
+++ drizzled/handler.cc 2009-09-14 01:25:59 +0000
@@ -2696,9 +2696,9 @@
2696 We cache the table flags if the locking succeeded. Otherwise, we2696 We cache the table flags if the locking succeeded. Otherwise, we
2697 keep them as they were when they were fetched in ha_open().2697 keep them as they were when they were fetched in ha_open().
2698 */2698 */
2699 DRIZZLE_EXTERNAL_LOCK(lock_type);
27002699
2701 int error= external_lock(session, lock_type);2700 int error= external_lock(session, lock_type);
2701
2702 if (error == 0)2702 if (error == 0)
2703 cached_table_flags= table_flags();2703 cached_table_flags= table_flags();
2704 return error;2704 return error;
@@ -2729,7 +2729,6 @@
2729int handler::ha_write_row(unsigned char *buf)2729int handler::ha_write_row(unsigned char *buf)
2730{2730{
2731 int error;2731 int error;
2732 DRIZZLE_INSERT_ROW_START();
27332732
2734 /* 2733 /*
2735 * If we have a timestamp column, update it to the current time 2734 * If we have a timestamp column, update it to the current time
@@ -2743,12 +2742,13 @@
2743 mark_trx_read_write();2742 mark_trx_read_write();
27442743
2745 if (unlikely(error= write_row(buf)))2744 if (unlikely(error= write_row(buf)))
2745 {
2746 return error;2746 return error;
2747 }
27472748
2748 if (unlikely(log_row_for_replication(table, 0, buf)))2749 if (unlikely(log_row_for_replication(table, 0, buf)))
2749 return HA_ERR_RBR_LOGGING_FAILED; /* purecov: inspected */2750 return HA_ERR_RBR_LOGGING_FAILED; /* purecov: inspected */
27502751
2751 DRIZZLE_INSERT_ROW_END();
2752 return 0;2752 return 0;
2753}2753}
27542754
@@ -2766,7 +2766,9 @@
2766 mark_trx_read_write();2766 mark_trx_read_write();
27672767
2768 if (unlikely(error= update_row(old_data, new_data)))2768 if (unlikely(error= update_row(old_data, new_data)))
2769 {
2769 return error;2770 return error;
2771 }
27702772
2771 if (unlikely(log_row_for_replication(table, old_data, new_data)))2773 if (unlikely(log_row_for_replication(table, old_data, new_data)))
2772 return HA_ERR_RBR_LOGGING_FAILED;2774 return HA_ERR_RBR_LOGGING_FAILED;
27732775
=== modified file 'drizzled/probes.d'
--- drizzled/probes.d 2008-11-01 00:46:20 +0000
+++ drizzled/probes.d 2009-09-14 20:44:27 +0000
@@ -1,7 +1,7 @@
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *3 *
4 * Copyright (C) 2008 Sun Microsystems4 * Copyright (C) 2009 Sun Microsystems
5 *5 *
6 * This program is free software; you can redistribute it and/or modify6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by7 * it under the terms of the GNU General Public License as published by
@@ -17,18 +17,107 @@
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */18 */
1919
20/*
21 The actual probe names in DTrace scripts will replace '__' by '-'. Thus
22 insert__row__start will be insert-row-start.
23
24 Recommendations for adding new probes:
25
26 - each probe should have the minimal set of arguments required to
27 unambiguously identify the context in which the probe fires. Redundant
28 probes (i.e. the ones that can be obtained in user scripts from previous
29 probes' arguments or otherwise) may be added for convenience.
30
31 - try to avoid computationally expensive probe arguments. If impossible,
32 use *_ENABLED() macros to check if the probe is activated before
33 performing expensive calculations for a probe argument.
34
35 - all *-done probes should have a status argument wherever applicable to make
36 it possible for user scripts to figure out whether the completed operation
37 was successful or not.
38
39 - for all status arguments, a non-zero value should be returned on error or
40 failure, 0 should be returned on success.
41*/
42
20provider drizzle {43provider drizzle {
21probe external_lock(int);44
22probe insert_row_start();45 /* The following ones fire when creating or closing a client connection */
23probe insert_row_end();46 probe connection__start(unsigned long conn_id);
24probe filesort_start();47 probe connection__done(unsigned long conn_id);
25probe filesort_end();48
26probe delete_start();49 /*
27probe delete_end();50 * Fire at the start/end of any client command processing (including SQL
28probe insert_start();51 * queries).
29probe insert_end();52 */
30probe select_start();53 probe command__start(unsigned long conn_id, int command);
31probe select_end();54 probe command__done(int status);
32probe update_start();55
33probe update_end();56 /*
57 * The following probes fire at the start/end of any SQL query processing,
58 * respectively.
59 *
60 * query_start() has a lot of parameters that can be used to pick up
61 * parameters for a lot of other probes here. For simplicity reasons we also
62 * add the query string to most other DTrace probes as well. Hostname is
63 * either the hostname or the IP address of the Drizzle client.
64 */
65 probe query__start(const char *query,
66 unsigned long conn_id,
67 const char *db_name);
68 probe query__done(int status);
69
70 /* Fire at the start/end of SQL query parsing */
71 probe query__parse__start(const char *query);
72 probe query__parse__done(int status);
73
74 /*
75 * This probe fires when the actual query execution starts
76 */
77 probe query__exec__start(const char *query,
78 unsigned long connid,
79 const char *db_name);
80 probe query__exec__done(int status);
81
82 /* These probes fire when performing write operations towards any handler */
83 probe insert__row__start(const char *db, const char *table);
84 probe insert__row__done(int status);
85 probe update__row__start(const char *db, const char *table);
86 probe update__row__done(int status);
87 probe delete__row__start(const char *db, const char *table);
88 probe delete__row__done(int status);
89
90 /*
91 * These probes fire when calling external_lock for any handler
92 * depending on the lock type being acquired or released.
93 */
94 probe handler__rdlock__start(const char *db, const char *table);
95 probe handler__wrlock__start(const char *db, const char *table);
96 probe handler__unlock__start(const char *db, const char *table);
97 probe handler__rdlock__done(int status);
98 probe handler__wrlock__done(int status);
99 probe handler__unlock__done(int status);
100
101 /*
102 * These probes fire when a filesort activity happens in a query.
103 */
104 probe filesort__start(const char *db, const char *table);
105 probe filesort__done(int status, unsigned long rows);
106 /*
107 * The query types SELECT, INSERT, INSERT AS SELECT, UPDATE, DELETE
108 * are all probed.
109 * The start probe always contains the query text.
110 */
111 probe select__start(const char *query);
112 probe select__done(int status, unsigned long rows);
113 probe insert__start(const char *query);
114 probe insert__done(int status, unsigned long rows);
115 probe insert__select__start(const char *query);
116 probe insert__select__done(int status, unsigned long rows);
117 probe update__start(const char *query);
118 probe update__done(int status,
119 unsigned long rowsmatches, unsigned long rowschanged);
120 probe delete__start(const char *query);
121 probe delete__done(int status, unsigned long rows);
122
34};123};
35124
=== added file 'drizzled/probes.h'
--- drizzled/probes.h 1970-01-01 00:00:00 +0000
+++ drizzled/probes.h 2009-09-14 20:12:21 +0000
@@ -0,0 +1,97 @@
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *
4 * Copyright (C) 2009 Sun Microsystems
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef DRIZZLED_PROBES_H
22#define DRIZZLED_PROBES_H
23
24#ifdef HAVE_DTRACE
25#include "drizzled/generated_probes.h"
26#else
27#define DRIZZLE_COMMAND_DONE(arg0)
28#define DRIZZLE_COMMAND_DONE_ENABLED() (0)
29#define DRIZZLE_COMMAND_START(arg0, arg1)
30#define DRIZZLE_COMMAND_START_ENABLED() (0)
31#define DRIZZLE_CONNECTION_DONE(arg0)
32#define DRIZZLE_CONNECTION_DONE_ENABLED() (0)
33#define DRIZZLE_CONNECTION_START(arg0)
34#define DRIZZLE_CONNECTION_START_ENABLED() (0)
35#define DRIZZLE_DELETE_DONE(arg0, arg1)
36#define DRIZZLE_DELETE_DONE_ENABLED() (0)
37#define DRIZZLE_DELETE_ROW_DONE(arg0)
38#define DRIZZLE_DELETE_ROW_DONE_ENABLED() (0)
39#define DRIZZLE_DELETE_ROW_START(arg0, arg1)
40#define DRIZZLE_DELETE_ROW_START_ENABLED() (0)
41#define DRIZZLE_DELETE_START(arg0)
42#define DRIZZLE_DELETE_START_ENABLED() (0)
43#define DRIZZLE_FILESORT_DONE(arg0, arg1)
44#define DRIZZLE_FILESORT_DONE_ENABLED() (0)
45#define DRIZZLE_FILESORT_START(arg0, arg1)
46#define DRIZZLE_FILESORT_START_ENABLED() (0)
47#define DRIZZLE_HANDLER_RDLOCK_DONE(arg0)
48#define DRIZZLE_HANDLER_RDLOCK_DONE_ENABLED() (0)
49#define DRIZZLE_HANDLER_RDLOCK_START(arg0, arg1)
50#define DRIZZLE_HANDLER_RDLOCK_START_ENABLED() (0)
51#define DRIZZLE_HANDLER_UNLOCK_DONE(arg0)
52#define DRIZZLE_HANDLER_UNLOCK_DONE_ENABLED() (0)
53#define DRIZZLE_HANDLER_UNLOCK_START(arg0, arg1)
54#define DRIZZLE_HANDLER_UNLOCK_START_ENABLED() (0)
55#define DRIZZLE_HANDLER_WRLOCK_DONE(arg0)
56#define DRIZZLE_HANDLER_WRLOCK_DONE_ENABLED() (0)
57#define DRIZZLE_HANDLER_WRLOCK_START(arg0, arg1)
58#define DRIZZLE_HANDLER_WRLOCK_START_ENABLED() (0)
59#define DRIZZLE_INSERT_DONE(arg0, arg1)
60#define DRIZZLE_INSERT_DONE_ENABLED() (0)
61#define DRIZZLE_INSERT_ROW_DONE(arg0)
62#define DRIZZLE_INSERT_ROW_DONE_ENABLED() (0)
63#define DRIZZLE_INSERT_ROW_START(arg0, arg1)
64#define DRIZZLE_INSERT_ROW_START_ENABLED() (0)
65#define DRIZZLE_INSERT_SELECT_DONE(arg0, arg1)
66#define DRIZZLE_INSERT_SELECT_DONE_ENABLED() (0)
67#define DRIZZLE_INSERT_SELECT_START(arg0)
68#define DRIZZLE_INSERT_SELECT_START_ENABLED() (0)
69#define DRIZZLE_INSERT_START(arg0)
70#define DRIZZLE_INSERT_START_ENABLED() (0)
71#define DRIZZLE_QUERY_DONE(arg0)
72#define DRIZZLE_QUERY_DONE_ENABLED() (0)
73#define DRIZZLE_QUERY_EXEC_DONE(arg0)
74#define DRIZZLE_QUERY_EXEC_DONE_ENABLED() (0)
75#define DRIZZLE_QUERY_EXEC_START(arg0, arg1, arg2)
76#define DRIZZLE_QUERY_EXEC_START_ENABLED() (0)
77#define DRIZZLE_QUERY_PARSE_DONE(arg0)
78#define DRIZZLE_QUERY_PARSE_DONE_ENABLED() (0)
79#define DRIZZLE_QUERY_PARSE_START(arg0)
80#define DRIZZLE_QUERY_PARSE_START_ENABLED() (0)
81#define DRIZZLE_QUERY_START(arg0, arg1, arg2)
82#define DRIZZLE_QUERY_START_ENABLED() (0)
83#define DRIZZLE_SELECT_DONE(arg0, arg1)
84#define DRIZZLE_SELECT_DONE_ENABLED() (0)
85#define DRIZZLE_SELECT_START(arg0)
86#define DRIZZLE_SELECT_START_ENABLED() (0)
87#define DRIZZLE_UPDATE_DONE(arg0, arg1, arg2)
88#define DRIZZLE_UPDATE_DONE_ENABLED() (0)
89#define DRIZZLE_UPDATE_ROW_DONE(arg0)
90#define DRIZZLE_UPDATE_ROW_DONE_ENABLED() (0)
91#define DRIZZLE_UPDATE_ROW_START(arg0, arg1)
92#define DRIZZLE_UPDATE_ROW_START_ENABLED() (0)
93#define DRIZZLE_UPDATE_START(arg0)
94#define DRIZZLE_UPDATE_START_ENABLED() (0)
95#endif
96
97#endif /* DRIZZLED_PROBES_H */
098
=== removed file 'drizzled/probes.h'
--- drizzled/probes.h 2009-05-21 17:05:14 +0000
+++ drizzled/probes.h 1970-01-01 00:00:00 +0000
@@ -1,250 +0,0 @@
1/*
2 * Generated by dtrace(1M).
3 */
4
5#ifndef _PROBES_H
6#define _PROBES_H
7
8
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#if _DTRACE_VERSION
15
16#define DRIZZLE_DELETE_END() \
17 __dtrace_drizzle___delete_end()
18#ifndef __sparc
19#define DRIZZLE_DELETE_END_ENABLED() \
20 __dtraceenabled_drizzle___delete_end()
21#else
22#define DRIZZLE_DELETE_END_ENABLED() \
23 __dtraceenabled_drizzle___delete_end(0)
24#endif
25#define DRIZZLE_DELETE_START() \
26 __dtrace_drizzle___delete_start()
27#ifndef __sparc
28#define DRIZZLE_DELETE_START_ENABLED() \
29 __dtraceenabled_drizzle___delete_start()
30#else
31#define DRIZZLE_DELETE_START_ENABLED() \
32 __dtraceenabled_drizzle___delete_start(0)
33#endif
34#define DRIZZLE_EXTERNAL_LOCK(arg0) \
35 __dtrace_drizzle___external_lock(arg0)
36#ifndef __sparc
37#define DRIZZLE_EXTERNAL_LOCK_ENABLED() \
38 __dtraceenabled_drizzle___external_lock()
39#else
40#define DRIZZLE_EXTERNAL_LOCK_ENABLED() \
41 __dtraceenabled_drizzle___external_lock(0)
42#endif
43#define DRIZZLE_FILESORT_END() \
44 __dtrace_drizzle___filesort_end()
45#ifndef __sparc
46#define DRIZZLE_FILESORT_END_ENABLED() \
47 __dtraceenabled_drizzle___filesort_end()
48#else
49#define DRIZZLE_FILESORT_END_ENABLED() \
50 __dtraceenabled_drizzle___filesort_end(0)
51#endif
52#define DRIZZLE_FILESORT_START() \
53 __dtrace_drizzle___filesort_start()
54#ifndef __sparc
55#define DRIZZLE_FILESORT_START_ENABLED() \
56 __dtraceenabled_drizzle___filesort_start()
57#else
58#define DRIZZLE_FILESORT_START_ENABLED() \
59 __dtraceenabled_drizzle___filesort_start(0)
60#endif
61#define DRIZZLE_INSERT_END() \
62 __dtrace_drizzle___insert_end()
63#ifndef __sparc
64#define DRIZZLE_INSERT_END_ENABLED() \
65 __dtraceenabled_drizzle___insert_end()
66#else
67#define DRIZZLE_INSERT_END_ENABLED() \
68 __dtraceenabled_drizzle___insert_end(0)
69#endif
70#define DRIZZLE_INSERT_ROW_END() \
71 __dtrace_drizzle___insert_row_end()
72#ifndef __sparc
73#define DRIZZLE_INSERT_ROW_END_ENABLED() \
74 __dtraceenabled_drizzle___insert_row_end()
75#else
76#define DRIZZLE_INSERT_ROW_END_ENABLED() \
77 __dtraceenabled_drizzle___insert_row_end(0)
78#endif
79#define DRIZZLE_INSERT_ROW_START() \
80 __dtrace_drizzle___insert_row_start()
81#ifndef __sparc
82#define DRIZZLE_INSERT_ROW_START_ENABLED() \
83 __dtraceenabled_drizzle___insert_row_start()
84#else
85#define DRIZZLE_INSERT_ROW_START_ENABLED() \
86 __dtraceenabled_drizzle___insert_row_start(0)
87#endif
88#define DRIZZLE_INSERT_START() \
89 __dtrace_drizzle___insert_start()
90#ifndef __sparc
91#define DRIZZLE_INSERT_START_ENABLED() \
92 __dtraceenabled_drizzle___insert_start()
93#else
94#define DRIZZLE_INSERT_START_ENABLED() \
95 __dtraceenabled_drizzle___insert_start(0)
96#endif
97#define DRIZZLE_SELECT_END() \
98 __dtrace_drizzle___select_end()
99#ifndef __sparc
100#define DRIZZLE_SELECT_END_ENABLED() \
101 __dtraceenabled_drizzle___select_end()
102#else
103#define DRIZZLE_SELECT_END_ENABLED() \
104 __dtraceenabled_drizzle___select_end(0)
105#endif
106#define DRIZZLE_SELECT_START() \
107 __dtrace_drizzle___select_start()
108#ifndef __sparc
109#define DRIZZLE_SELECT_START_ENABLED() \
110 __dtraceenabled_drizzle___select_start()
111#else
112#define DRIZZLE_SELECT_START_ENABLED() \
113 __dtraceenabled_drizzle___select_start(0)
114#endif
115#define DRIZZLE_UPDATE_END() \
116 __dtrace_drizzle___update_end()
117#ifndef __sparc
118#define DRIZZLE_UPDATE_END_ENABLED() \
119 __dtraceenabled_drizzle___update_end()
120#else
121#define DRIZZLE_UPDATE_END_ENABLED() \
122 __dtraceenabled_drizzle___update_end(0)
123#endif
124#define DRIZZLE_UPDATE_START() \
125 __dtrace_drizzle___update_start()
126#ifndef __sparc
127#define DRIZZLE_UPDATE_START_ENABLED() \
128 __dtraceenabled_drizzle___update_start()
129#else
130#define DRIZZLE_UPDATE_START_ENABLED() \
131 __dtraceenabled_drizzle___update_start(0)
132#endif
133
134
135extern void __dtrace_drizzle___delete_end(void);
136#ifndef __sparc
137extern int __dtraceenabled_drizzle___delete_end(void);
138#else
139extern int __dtraceenabled_drizzle___delete_end(long);
140#endif
141extern void __dtrace_drizzle___delete_start(void);
142#ifndef __sparc
143extern int __dtraceenabled_drizzle___delete_start(void);
144#else
145extern int __dtraceenabled_drizzle___delete_start(long);
146#endif
147extern void __dtrace_drizzle___external_lock(int);
148#ifndef __sparc
149extern int __dtraceenabled_drizzle___external_lock(void);
150#else
151extern int __dtraceenabled_drizzle___external_lock(long);
152#endif
153extern void __dtrace_drizzle___filesort_end(void);
154#ifndef __sparc
155extern int __dtraceenabled_drizzle___filesort_end(void);
156#else
157extern int __dtraceenabled_drizzle___filesort_end(long);
158#endif
159extern void __dtrace_drizzle___filesort_start(void);
160#ifndef __sparc
161extern int __dtraceenabled_drizzle___filesort_start(void);
162#else
163extern int __dtraceenabled_drizzle___filesort_start(long);
164#endif
165extern void __dtrace_drizzle___insert_end(void);
166#ifndef __sparc
167extern int __dtraceenabled_drizzle___insert_end(void);
168#else
169extern int __dtraceenabled_drizzle___insert_end(long);
170#endif
171extern void __dtrace_drizzle___insert_row_end(void);
172#ifndef __sparc
173extern int __dtraceenabled_drizzle___insert_row_end(void);
174#else
175extern int __dtraceenabled_drizzle___insert_row_end(long);
176#endif
177extern void __dtrace_drizzle___insert_row_start(void);
178#ifndef __sparc
179extern int __dtraceenabled_drizzle___insert_row_start(void);
180#else
181extern int __dtraceenabled_drizzle___insert_row_start(long);
182#endif
183extern void __dtrace_drizzle___insert_start(void);
184#ifndef __sparc
185extern int __dtraceenabled_drizzle___insert_start(void);
186#else
187extern int __dtraceenabled_drizzle___insert_start(long);
188#endif
189extern void __dtrace_drizzle___select_end(void);
190#ifndef __sparc
191extern int __dtraceenabled_drizzle___select_end(void);
192#else
193extern int __dtraceenabled_drizzle___select_end(long);
194#endif
195extern void __dtrace_drizzle___select_start(void);
196#ifndef __sparc
197extern int __dtraceenabled_drizzle___select_start(void);
198#else
199extern int __dtraceenabled_drizzle___select_start(long);
200#endif
201extern void __dtrace_drizzle___update_end(void);
202#ifndef __sparc
203extern int __dtraceenabled_drizzle___update_end(void);
204#else
205extern int __dtraceenabled_drizzle___update_end(long);
206#endif
207extern void __dtrace_drizzle___update_start(void);
208#ifndef __sparc
209extern int __dtraceenabled_drizzle___update_start(void);
210#else
211extern int __dtraceenabled_drizzle___update_start(long);
212#endif
213
214#else
215
216#define DRIZZLE_DELETE_END()
217#define DRIZZLE_DELETE_END_ENABLED() (0)
218#define DRIZZLE_DELETE_START()
219#define DRIZZLE_DELETE_START_ENABLED() (0)
220#define DRIZZLE_EXTERNAL_LOCK(arg0)
221#define DRIZZLE_EXTERNAL_LOCK_ENABLED() (0)
222#define DRIZZLE_FILESORT_END()
223#define DRIZZLE_FILESORT_END_ENABLED() (0)
224#define DRIZZLE_FILESORT_START()
225#define DRIZZLE_FILESORT_START_ENABLED() (0)
226#define DRIZZLE_INSERT_END()
227#define DRIZZLE_INSERT_END_ENABLED() (0)
228#define DRIZZLE_INSERT_ROW_END()
229#define DRIZZLE_INSERT_ROW_END_ENABLED() (0)
230#define DRIZZLE_INSERT_ROW_START()
231#define DRIZZLE_INSERT_ROW_START_ENABLED() (0)
232#define DRIZZLE_INSERT_START()
233#define DRIZZLE_INSERT_START_ENABLED() (0)
234#define DRIZZLE_SELECT_END()
235#define DRIZZLE_SELECT_END_ENABLED() (0)
236#define DRIZZLE_SELECT_START()
237#define DRIZZLE_SELECT_START_ENABLED() (0)
238#define DRIZZLE_UPDATE_END()
239#define DRIZZLE_UPDATE_END_ENABLED() (0)
240#define DRIZZLE_UPDATE_START()
241#define DRIZZLE_UPDATE_START_ENABLED() (0)
242
243#endif
244
245
246#ifdef __cplusplus
247}
248#endif
249
250#endif /* _PROBES_H */
2510
=== modified file 'drizzled/session.cc'
--- drizzled/session.cc 2009-08-16 14:14:39 +0000
+++ drizzled/session.cc 2009-09-13 04:30:14 +0000
@@ -37,6 +37,7 @@
37#include <drizzled/item/empty_string.h>37#include <drizzled/item/empty_string.h>
38#include <drizzled/show.h>38#include <drizzled/show.h>
39#include <drizzled/scheduling.h>39#include <drizzled/scheduling.h>
40#include "drizzled/probes.h"
4041
41#include <algorithm>42#include <algorithm>
4243
@@ -481,6 +482,7 @@
481 if (state_to_set != Session::KILL_QUERY)482 if (state_to_set != Session::KILL_QUERY)
482 {483 {
483 scheduler->killSession(this);484 scheduler->killSession(this);
485 DRIZZLE_CONNECTION_DONE(thread_id);
484 }486 }
485 if (mysys_var)487 if (mysys_var)
486 {488 {
@@ -620,6 +622,7 @@
620622
621 if (scheduler->addSession(this))623 if (scheduler->addSession(this))
622 {624 {
625 DRIZZLE_CONNECTION_START(thread_id);
623 char error_message_buff[DRIZZLE_ERRMSG_SIZE];626 char error_message_buff[DRIZZLE_ERRMSG_SIZE];
624627
625 killed= Session::KILL_CONNECTION;628 killed= Session::KILL_CONNECTION;
626629
=== modified file 'drizzled/sql_delete.cc'
--- drizzled/sql_delete.cc 2009-08-06 16:51:53 +0000
+++ drizzled/sql_delete.cc 2009-09-13 04:30:14 +0000
@@ -25,6 +25,7 @@
25#include <drizzled/sql_parse.h>25#include <drizzled/sql_parse.h>
26#include <drizzled/sql_base.h>26#include <drizzled/sql_base.h>
27#include <drizzled/lock.h>27#include <drizzled/lock.h>
28#include "drizzled/probes.h"
2829
29/**30/**
30 Implement DELETE SQL word.31 Implement DELETE SQL word.
@@ -50,10 +51,14 @@
50 uint32_t usable_index= MAX_KEY;51 uint32_t usable_index= MAX_KEY;
51 Select_Lex *select_lex= &session->lex->select_lex;52 Select_Lex *select_lex= &session->lex->select_lex;
52 Session::killed_state killed_status= Session::NOT_KILLED;53 Session::killed_state killed_status= Session::NOT_KILLED;
54 int res= 0;
5355
5456
55 if (session->openTablesLock(table_list))57 if (session->openTablesLock(table_list))
58 {
59 DRIZZLE_DELETE_DONE(1, 0);
56 return true;60 return true;
61 }
5762
58 table= table_list->table;63 table= table_list->table;
59 assert(table);64 assert(table);
@@ -162,14 +167,14 @@
162 delete select;167 delete select;
163 free_underlaid_joins(session, select_lex);168 free_underlaid_joins(session, select_lex);
164 session->row_count_func= 0;169 session->row_count_func= 0;
165 DRIZZLE_DELETE_END();170 DRIZZLE_DELETE_DONE(0, 0);
166 session->my_ok((ha_rows) session->row_count_func);171 session->my_ok((ha_rows) session->row_count_func);
167 /*172 /*
168 We don't need to call reset_auto_increment in this case, because173 We don't need to call reset_auto_increment in this case, because
169 mysql_truncate always gives a NULL conds argument, hence we never174 mysql_truncate always gives a NULL conds argument, hence we never
170 get here.175 get here.
171 */176 */
172 return(0); // Nothing to delete177 return 0; // Nothing to delete
173 }178 }
174179
175 /* If running in safe sql mode, don't allow updates without keys */180 /* If running in safe sql mode, don't allow updates without keys */
@@ -322,17 +327,18 @@
322 assert(transactional_table || !deleted || session->transaction.stmt.modified_non_trans_table);327 assert(transactional_table || !deleted || session->transaction.stmt.modified_non_trans_table);
323 free_underlaid_joins(session, select_lex);328 free_underlaid_joins(session, select_lex);
324329
325 DRIZZLE_DELETE_END();330 res= (error >= 0 || session->is_error());
331 DRIZZLE_DELETE_DONE(res, deleted);
326 if (error < 0 || (session->lex->ignore && !session->is_fatal_error))332 if (error < 0 || (session->lex->ignore && !session->is_fatal_error))
327 {333 {
328 session->row_count_func= deleted;334 session->row_count_func= deleted;
329 session->my_ok((ha_rows) session->row_count_func);335 session->my_ok((ha_rows) session->row_count_func);
330 }336 }
331 return(error >= 0 || session->is_error());337 return (error >= 0 || session->is_error());
332338
333err:339err:
334 DRIZZLE_DELETE_END();340 DRIZZLE_DELETE_DONE(1, 0);
335 return(true);341 return true;
336}342}
337343
338344
339345
=== modified file 'drizzled/sql_insert.cc'
--- drizzled/sql_insert.cc 2009-08-24 14:57:56 +0000
+++ drizzled/sql_insert.cc 2009-09-13 04:30:14 +0000
@@ -240,7 +240,10 @@
240 values_list.elements > 1);240 values_list.elements > 1);
241241
242 if (session->openTablesLock(table_list))242 if (session->openTablesLock(table_list))
243 {
244 DRIZZLE_INSERT_DONE(1, 0);
243 return true;245 return true;
246 }
244247
245 lock_type= table_list->lock_type;248 lock_type= table_list->lock_type;
246249
@@ -466,8 +469,8 @@
466 info.copied + info.deleted + info.touched, id, buff);469 info.copied + info.deleted + info.touched, id, buff);
467 }470 }
468 session->abort_on_warning= 0;471 session->abort_on_warning= 0;
469 DRIZZLE_INSERT_END();472 DRIZZLE_INSERT_DONE(0, session->row_count_func);
470 return(false);473 return false;
471474
472abort:475abort:
473 if (table != NULL)476 if (table != NULL)
@@ -475,8 +478,8 @@
475 if (!joins_freed)478 if (!joins_freed)
476 free_underlaid_joins(session, &session->lex->select_lex);479 free_underlaid_joins(session, &session->lex->select_lex);
477 session->abort_on_warning= 0;480 session->abort_on_warning= 0;
478 DRIZZLE_INSERT_END();481 DRIZZLE_INSERT_DONE(1, 0);
479 return(true);482 return true;
480}483}
481484
482485
@@ -1336,7 +1339,8 @@
1336 if (error)1339 if (error)
1337 {1340 {
1338 table->file->print_error(error,MYF(0));1341 table->file->print_error(error,MYF(0));
1339 return(1);1342 DRIZZLE_INSERT_SELECT_DONE(error, 0);
1343 return 1;
1340 }1344 }
1341 char buff[160];1345 char buff[160];
1342 if (info.ignore)1346 if (info.ignore)
@@ -1354,7 +1358,8 @@
1354 (info.copied ? autoinc_value_of_last_inserted_row : 0));1358 (info.copied ? autoinc_value_of_last_inserted_row : 0));
1355 session->my_ok((ulong) session->row_count_func,1359 session->my_ok((ulong) session->row_count_func,
1356 info.copied + info.deleted + info.touched, id, buff);1360 info.copied + info.deleted + info.touched, id, buff);
1357 return(0);1361 DRIZZLE_INSERT_SELECT_DONE(0, session->row_count_func);
1362 return 0;
1358}1363}
13591364
1360void select_insert::abort() {1365void select_insert::abort() {
@@ -1393,6 +1398,11 @@
1393 table->file->ha_release_auto_increment();1398 table->file->ha_release_auto_increment();
1394 }1399 }
13951400
1401 if (DRIZZLE_INSERT_SELECT_DONE_ENABLED())
1402 {
1403 DRIZZLE_INSERT_SELECT_DONE(0, info.copied + info.deleted + info.updated);
1404 }
1405
1396 return;1406 return;
1397}1407}
13981408
13991409
=== modified file 'drizzled/sql_parse.cc'
--- drizzled/sql_parse.cc 2009-08-27 01:04:45 +0000
+++ drizzled/sql_parse.cc 2009-09-14 04:21:55 +0000
@@ -35,6 +35,7 @@
35#include <drizzled/lock.h>35#include <drizzled/lock.h>
36#include <drizzled/select_send.h>36#include <drizzled/select_send.h>
37#include <drizzled/statement.h>37#include <drizzled/statement.h>
38#include "drizzled/probes.h"
3839
39#include <bitset>40#include <bitset>
40#include <algorithm>41#include <algorithm>
@@ -166,7 +167,10 @@
166 bool error= 0;167 bool error= 0;
167 Query_id &query_id= Query_id::get_query_id();168 Query_id &query_id= Query_id::get_query_id();
168169
169 session->command=command;170 DRIZZLE_COMMAND_START(session->thread_id,
171 command);
172
173 session->command= command;
170 session->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */174 session->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
171 session->set_time();175 session->set_time();
172 session->query_id= query_id.value();176 session->query_id= query_id.value();
@@ -204,6 +208,9 @@
204 {208 {
205 if (! session->readAndStoreQuery(packet, packet_length))209 if (! session->readAndStoreQuery(packet, packet_length))
206 break; // fatal error is set210 break; // fatal error is set
211 DRIZZLE_QUERY_START(session->query,
212 session->thread_id,
213 (char *) (session->db ? session->db : ""));
207 const char* end_of_stmt= NULL;214 const char* end_of_stmt= NULL;
208215
209 mysql_parse(session, session->query, session->query_length, &end_of_stmt);216 mysql_parse(session, session->query, session->query_length, &end_of_stmt);
@@ -295,15 +302,25 @@
295302
296 /* Store temp state for processlist */303 /* Store temp state for processlist */
297 session->set_proc_info("cleaning up");304 session->set_proc_info("cleaning up");
298 session->command=COM_SLEEP;305 session->command= COM_SLEEP;
299 memset(session->process_list_info, 0, PROCESS_LIST_WIDTH);306 memset(session->process_list_info, 0, PROCESS_LIST_WIDTH);
300 session->query=0;307 session->query= 0;
301 session->query_length=0;308 session->query_length= 0;
302309
303 session->set_proc_info(NULL);310 session->set_proc_info(NULL);
304 session->packet.shrink(session->variables.net_buffer_length); // Reclaim some memory311 session->packet.shrink(session->variables.net_buffer_length); // Reclaim some memory
305 free_root(session->mem_root,MYF(MY_KEEP_PREALLOC));312 free_root(session->mem_root,MYF(MY_KEEP_PREALLOC));
306 return(error);313
314 if (DRIZZLE_QUERY_DONE_ENABLED() || DRIZZLE_COMMAND_DONE_ENABLED())
315 {
316 if (command == COM_QUERY)
317 {
318 DRIZZLE_QUERY_DONE(session->is_error());
319 }
320 DRIZZLE_COMMAND_DONE(session->is_error());
321 }
322
323 return error;
307}324}
308325
309326
@@ -759,8 +776,12 @@
759 if (*found_semicolon &&776 if (*found_semicolon &&
760 (session->query_length= (ulong)(*found_semicolon - session->query)))777 (session->query_length= (ulong)(*found_semicolon - session->query)))
761 session->query_length--;778 session->query_length--;
779 DRIZZLE_QUERY_EXEC_START(session->query,
780 session->thread_id,
781 (char *) (session->db ? session->db : ""));
762 /* Actually execute the query */782 /* Actually execute the query */
763 mysql_execute_command(session);783 mysql_execute_command(session);
784 DRIZZLE_QUERY_EXEC_DONE(0);
764 }785 }
765 }786 }
766 }787 }
@@ -1819,6 +1840,8 @@
1819{1840{
1820 assert(session->m_lip == NULL);1841 assert(session->m_lip == NULL);
18211842
1843 DRIZZLE_QUERY_PARSE_START(session->query);
1844
1822 /* Set Lex_input_stream. */1845 /* Set Lex_input_stream. */
18231846
1824 session->m_lip= lip;1847 session->m_lip= lip;
@@ -1835,6 +1858,8 @@
18351858
1836 session->m_lip= NULL;1859 session->m_lip= NULL;
18371860
1861 DRIZZLE_QUERY_PARSE_DONE(mysql_parse_status || session->is_fatal_error);
1862
1838 /* That's it. */1863 /* That's it. */
18391864
1840 return mysql_parse_status || session->is_fatal_error;1865 return mysql_parse_status || session->is_fatal_error;
18411866
=== modified file 'drizzled/sql_select.cc'
--- drizzled/sql_select.cc 2009-08-20 21:45:52 +0000
+++ drizzled/sql_select.cc 2009-09-13 01:44:36 +0000
@@ -124,7 +124,7 @@
124{124{
125 bool res;125 bool res;
126 register Select_Lex *select_lex= &lex->select_lex;126 register Select_Lex *select_lex= &lex->select_lex;
127 DRIZZLE_SELECT_START();127 DRIZZLE_SELECT_START(session->query);
128128
129 if (select_lex->master_unit()->is_union() ||129 if (select_lex->master_unit()->is_union() ||
130 select_lex->master_unit()->fake_select_lex)130 select_lex->master_unit()->fake_select_lex)
@@ -157,8 +157,8 @@
157 if (unlikely(res))157 if (unlikely(res))
158 result->abort();158 result->abort();
159159
160 DRIZZLE_SELECT_END();160 DRIZZLE_SELECT_DONE(res, session->limit_found_rows);
161 return(res);161 return res;
162}162}
163163
164/*164/*
165165
=== modified file 'drizzled/sql_update.cc'
--- drizzled/sql_update.cc 2009-08-20 20:29:18 +0000
+++ drizzled/sql_update.cc 2009-09-13 04:30:14 +0000
@@ -138,10 +138,14 @@
138 uint64_t id;138 uint64_t id;
139 List<Item> all_fields;139 List<Item> all_fields;
140 Session::killed_state killed_status= Session::NOT_KILLED;140 Session::killed_state killed_status= Session::NOT_KILLED;
141 int res= 0;
141142
142 DRIZZLE_UPDATE_START();143 DRIZZLE_UPDATE_START(session->query);
143 if (session->openTablesLock(table_list))144 if (session->openTablesLock(table_list))
145 {
146 DRIZZLE_UPDATE_DONE(1, 0, 0);
144 return 1;147 return 1;
148 }
145149
146 session->set_proc_info("init");150 session->set_proc_info("init");
147 table= table_list->table;151 table= table_list->table;
@@ -179,8 +183,8 @@
179 if (select_lex->inner_refs_list.elements &&183 if (select_lex->inner_refs_list.elements &&
180 fix_inner_refs(session, all_fields, select_lex, select_lex->ref_pointer_array))184 fix_inner_refs(session, all_fields, select_lex, select_lex->ref_pointer_array))
181 {185 {
182 DRIZZLE_UPDATE_END();186 DRIZZLE_UPDATE_DONE(1, 0, 0);
183 return(-1);187 return -1;
184 }188 }
185189
186 if (conds)190 if (conds)
@@ -215,9 +219,9 @@
215 free_underlaid_joins(session, select_lex);219 free_underlaid_joins(session, select_lex);
216 if (error)220 if (error)
217 goto abort; // Error in where221 goto abort; // Error in where
218 DRIZZLE_UPDATE_END();222 DRIZZLE_UPDATE_DONE(0, 0, 0);
219 session->my_ok(); // No matching records223 session->my_ok(); // No matching records
220 return(0);224 return 0;
221 }225 }
222 if (!select && limit != HA_POS_ERROR)226 if (!select && limit != HA_POS_ERROR)
223 {227 {
@@ -627,7 +631,6 @@
627 id= session->arg_of_last_insert_id_function ?631 id= session->arg_of_last_insert_id_function ?
628 session->first_successful_insert_id_in_prev_stmt : 0;632 session->first_successful_insert_id_in_prev_stmt : 0;
629633
630 DRIZZLE_UPDATE_END();
631 if (error < 0)634 if (error < 0)
632 {635 {
633 char buff[STRING_BUFFER_USUAL_SIZE];636 char buff[STRING_BUFFER_USUAL_SIZE];
@@ -638,7 +641,9 @@
638 }641 }
639 session->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */642 session->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
640 session->abort_on_warning= 0;643 session->abort_on_warning= 0;
641 return((error >= 0 || session->is_error()) ? 1 : 0);644 res= (error >= 0 || session->is_error()) ? 1 : 0;
645 DRIZZLE_UPDATE_DONE(res, found, updated);
646 return ((error >= 0 || session->is_error()) ? 1 : 0);
642647
643err:648err:
644 delete select;649 delete select;
@@ -651,8 +656,8 @@
651 session->abort_on_warning= 0;656 session->abort_on_warning= 0;
652657
653abort:658abort:
654 DRIZZLE_UPDATE_END();659 DRIZZLE_UPDATE_DONE(1, 0, 0);
655 return(1);660 return 1;
656}661}
657662
658/*663/*
659664
=== modified file 'drizzled/statement/delete.cc'
--- drizzled/statement/delete.cc 2009-08-10 18:03:39 +0000
+++ drizzled/statement/delete.cc 2009-09-13 04:30:14 +0000
@@ -22,12 +22,14 @@
22#include <drizzled/show.h>22#include <drizzled/show.h>
23#include <drizzled/session.h>23#include <drizzled/session.h>
24#include <drizzled/lock.h>24#include <drizzled/lock.h>
25#include <drizzled/probes.h>
25#include <drizzled/statement/delete.h>26#include <drizzled/statement/delete.h>
2627
27using namespace drizzled;28using namespace drizzled;
2829
29bool statement::Delete::execute()30bool statement::Delete::execute()
30{31{
32 DRIZZLE_DELETE_START(session->query);
31 TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;33 TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;
32 TableList *all_tables= session->lex->query_tables;34 TableList *all_tables= session->lex->query_tables;
33 Select_Lex *select_lex= &session->lex->select_lex;35 Select_Lex *select_lex= &session->lex->select_lex;
3436
=== modified file 'drizzled/statement/insert.cc'
--- drizzled/statement/insert.cc 2009-08-26 23:47:28 +0000
+++ drizzled/statement/insert.cc 2009-09-13 04:30:14 +0000
@@ -22,6 +22,7 @@
22#include <drizzled/show.h>22#include <drizzled/show.h>
23#include <drizzled/lock.h>23#include <drizzled/lock.h>
24#include <drizzled/session.h>24#include <drizzled/session.h>
25#include <drizzled/probes.h>
25#include <drizzled/statement/insert.h>26#include <drizzled/statement/insert.h>
2627
27using namespace drizzled;28using namespace drizzled;
@@ -43,6 +44,8 @@
43 return true;44 return true;
44 }45 }
4546
47 DRIZZLE_INSERT_START(session->query);
48
46 bool res= mysql_insert(session, 49 bool res= mysql_insert(session,
47 all_tables, 50 all_tables,
48 session->lex->field_list, 51 session->lex->field_list,
4952
=== modified file 'drizzled/statement/insert_select.cc'
--- drizzled/statement/insert_select.cc 2009-08-27 00:39:15 +0000
+++ drizzled/statement/insert_select.cc 2009-09-13 04:30:14 +0000
@@ -22,6 +22,7 @@
22#include <drizzled/show.h>22#include <drizzled/show.h>
23#include <drizzled/lock.h>23#include <drizzled/lock.h>
24#include <drizzled/session.h>24#include <drizzled/session.h>
25#include <drizzled/probes.h>
25#include <drizzled/statement/insert_select.h>26#include <drizzled/statement/insert_select.h>
2627
27using namespace drizzled;28using namespace drizzled;
@@ -54,6 +55,7 @@
5455
55 if (! (res= session->openTablesLock(all_tables)))56 if (! (res= session->openTablesLock(all_tables)))
56 {57 {
58 DRIZZLE_INSERT_SELECT_START(session->query);
57 /* Skip first table, which is the table we are inserting in */59 /* Skip first table, which is the table we are inserting in */
58 TableList *second_table= first_table->next_local;60 TableList *second_table= first_table->next_local;
59 select_lex->table_list.first= (unsigned char*) second_table;61 select_lex->table_list.first= (unsigned char*) second_table;
6062
=== modified file 'm4/pandora_64bit.m4'
--- m4/pandora_64bit.m4 2009-08-04 17:58:31 +0000
+++ m4/pandora_64bit.m4 2009-09-14 18:37:34 +0000
@@ -23,7 +23,7 @@
23 AS_IF([test "$isainfo_b" != "x"],[23 AS_IF([test "$isainfo_b" != "x"],[
2424
25 isainfo_k=`${ISAINFO} -k` 25 isainfo_k=`${ISAINFO} -k`
26 DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}"26 DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}"
2727
28 AS_IF([test "x$ac_enable_64bit" = "xyes"],[28 AS_IF([test "x$ac_enable_64bit" = "xyes"],[
2929