Merge lp:~trond-norbye/drizzle/dtrace-macosx-support into lp:~drizzle-trunk/drizzle/development
- dtrace-macosx-support
- Merge into development
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Padraig O'Sullivan (community) | Approve | ||
Review via email: mp+11883@code.launchpad.net |
Commit message
Description of the change
Trond Norbye (trond-norbye) wrote : | # |
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
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
Padraig O'Sullivan (posulliv) wrote : | # |
I'll merge it in to my branch and re-submit my branch.
Thanks again,
Padraig
Jay Pipes (jaypipes) wrote : | # |
This is now proposed for merging via lp:~jaypipes/drizzle/captain-20090915-01:
https:/
Preview Diff
1 | === modified file 'drizzled/Makefile.am' | |||
2 | --- drizzled/Makefile.am 2009-08-27 00:39:15 +0000 | |||
3 | +++ drizzled/Makefile.am 2009-09-16 13:51:30 +0000 | |||
4 | @@ -18,10 +18,16 @@ | |||
5 | 18 | 18 | ||
6 | 19 | DTRACEFILES = handler.o \ | 19 | DTRACEFILES = handler.o \ |
7 | 20 | filesort.o \ | 20 | filesort.o \ |
8 | 21 | drizzled.o \ | ||
9 | 22 | session.o \ | ||
10 | 21 | sql_delete.o \ | 23 | sql_delete.o \ |
11 | 22 | sql_insert.o \ | 24 | sql_insert.o \ |
12 | 23 | sql_select.o \ | 25 | sql_select.o \ |
14 | 24 | sql_update.o | 26 | sql_update.o \ |
15 | 27 | sql_parse.o \ | ||
16 | 28 | statement/delete.o \ | ||
17 | 29 | statement/insert.o \ | ||
18 | 30 | statement/insert_select.o | ||
19 | 25 | 31 | ||
20 | 26 | drizzledincludedir = ${includedir}/drizzled | 32 | drizzledincludedir = ${includedir}/drizzled |
21 | 27 | nobase_dist_drizzledinclude_HEADERS = \ | 33 | nobase_dist_drizzledinclude_HEADERS = \ |
22 | @@ -694,10 +700,6 @@ | |||
23 | 694 | util/convert.cc \ | 700 | util/convert.cc \ |
24 | 695 | xid.cc | 701 | xid.cc |
25 | 696 | 702 | ||
26 | 697 | if HAVE_DTRACE | ||
27 | 698 | drizzled_SOURCES += probes.d | ||
28 | 699 | endif | ||
29 | 700 | |||
30 | 701 | libserialutil_la_SOURCES = db.cc table_proto_write.cc | 703 | libserialutil_la_SOURCES = db.cc table_proto_write.cc |
31 | 702 | libserialutil_la_CXXFLAGS= ${AM_CXXFLAGS} ${PROTOSKIP_WARNINGS} | 704 | libserialutil_la_CXXFLAGS= ${AM_CXXFLAGS} ${PROTOSKIP_WARNINGS} |
32 | 703 | 705 | ||
33 | @@ -725,7 +727,7 @@ | |||
34 | 725 | BUILT_SOURCES = $(BUILT_MAINT_SRC) \ | 727 | BUILT_SOURCES = $(BUILT_MAINT_SRC) \ |
35 | 726 | symbol_hash.h \ | 728 | symbol_hash.h \ |
36 | 727 | function_hash.h \ | 729 | function_hash.h \ |
38 | 728 | $(PCHHEADERS) | 730 | $(PCHHEADERS) |
39 | 729 | 731 | ||
40 | 730 | EXTRA_DIST = \ | 732 | EXTRA_DIST = \ |
41 | 731 | $(BUILT_MAINT_SRC) \ | 733 | $(BUILT_MAINT_SRC) \ |
42 | @@ -744,16 +746,29 @@ | |||
43 | 744 | $(PCHHEADERS) \ | 746 | $(PCHHEADERS) \ |
44 | 745 | $(nodist_drizzled_SOURCES) | 747 | $(nodist_drizzled_SOURCES) |
45 | 746 | 748 | ||
46 | 749 | if DTRACE_NEEDS_OBJECTS | ||
47 | 750 | drizzled_SOURCES += probes.d | ||
48 | 751 | endif | ||
49 | 752 | |||
50 | 753 | if HAVE_DTRACE | ||
51 | 754 | BUILT_SOURCES += generated_probes.h | ||
52 | 755 | CLEANFILES += generated_probes.h | ||
53 | 756 | endif | ||
54 | 757 | |||
55 | 758 | |||
56 | 747 | DISTCLEANFILES = $(EXTRA_PROGRAMS) \ | 759 | DISTCLEANFILES = $(EXTRA_PROGRAMS) \ |
57 | 748 | $(BUILT_MAINT_SRC) | 760 | $(BUILT_MAINT_SRC) |
58 | 749 | 761 | ||
59 | 750 | MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC) | 762 | MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC) |
60 | 751 | 763 | ||
66 | 752 | probes.h: probes.d | 764 | generated_probes.h : probes.d |
67 | 753 | $(DTRACE) $(DTRACEFLAGS) -h -s probes.d | 765 | $(DTRACE) $(DTRACEFLAGS) -h -s probes.d -o generated_probes.h |
68 | 754 | mv probes.h probes.h.bak | 766 | mv generated_probes.h generated_probes.h.bak |
69 | 755 | sed "s/#include <unistd.h>//g" probes.h.bak > probes.h | 767 | sed "s/#include <unistd.h>//g" generated_probes.h.bak > generated_probes.h |
70 | 756 | rm probes.h.bak | 768 | rm generated_probes.h.bak |
71 | 769 | sed -e 's,void \*,const void \*,g' generated_probes.h | \ | ||
72 | 770 | sed -e 's,char \*,const char \*,g' | tr '\t' ' ' > dtrace_probes.tmp | ||
73 | 771 | mv dtrace_probes.tmp generated_probes.h | ||
74 | 757 | 772 | ||
75 | 758 | 773 | ||
76 | 759 | SUFFIXES = .d .gch .gperf .stamp-h | 774 | SUFFIXES = .d .gch .gperf .stamp-h |
77 | 760 | 775 | ||
78 | === modified file 'drizzled/drizzled.cc' | |||
79 | --- drizzled/drizzled.cc 2009-08-24 14:57:56 +0000 | |||
80 | +++ drizzled/drizzled.cc 2009-09-13 04:30:14 +0000 | |||
81 | @@ -45,6 +45,7 @@ | |||
82 | 45 | #include <drizzled/scheduling.h> | 45 | #include <drizzled/scheduling.h> |
83 | 46 | #include "drizzled/temporal_format.h" /* For init_temporal_formats() */ | 46 | #include "drizzled/temporal_format.h" /* For init_temporal_formats() */ |
84 | 47 | #include "drizzled/slot/listen.h" | 47 | #include "drizzled/slot/listen.h" |
85 | 48 | #include "drizzled/probes.h" | ||
86 | 48 | 49 | ||
87 | 49 | #include <google/protobuf/stubs/common.h> | 50 | #include <google/protobuf/stubs/common.h> |
88 | 50 | 51 | ||
89 | @@ -456,6 +457,7 @@ | |||
90 | 456 | tmp= *it; | 457 | tmp= *it; |
91 | 457 | tmp->killed= Session::KILL_CONNECTION; | 458 | tmp->killed= Session::KILL_CONNECTION; |
92 | 458 | tmp->scheduler->killSession(tmp); | 459 | tmp->scheduler->killSession(tmp); |
93 | 460 | DRIZZLE_CONNECTION_DONE(tmp->thread_id); | ||
94 | 459 | if (tmp->mysys_var) | 461 | if (tmp->mysys_var) |
95 | 460 | { | 462 | { |
96 | 461 | tmp->mysys_var->abort=1; | 463 | tmp->mysys_var->abort=1; |
97 | @@ -766,6 +768,7 @@ | |||
98 | 766 | { | 768 | { |
99 | 767 | statistic_increment(killed_threads, &LOCK_status); | 769 | statistic_increment(killed_threads, &LOCK_status); |
100 | 768 | session->scheduler->killSessionNow(session); | 770 | session->scheduler->killSessionNow(session); |
101 | 771 | DRIZZLE_CONNECTION_DONE(session->thread_id); | ||
102 | 769 | } | 772 | } |
103 | 770 | return; | 773 | return; |
104 | 771 | } | 774 | } |
105 | 772 | 775 | ||
106 | === modified file 'drizzled/filesort.cc' | |||
107 | --- drizzled/filesort.cc 2009-08-20 20:29:18 +0000 | |||
108 | +++ drizzled/filesort.cc 2009-09-13 01:09:19 +0000 | |||
109 | @@ -114,7 +114,7 @@ | |||
110 | 114 | TableList *tab= table->pos_in_table_list; | 114 | TableList *tab= table->pos_in_table_list; |
111 | 115 | Item_subselect *subselect= tab ? tab->containing_subselect() : 0; | 115 | Item_subselect *subselect= tab ? tab->containing_subselect() : 0; |
112 | 116 | 116 | ||
114 | 117 | DRIZZLE_FILESORT_START(); | 117 | DRIZZLE_FILESORT_START(table->s->db.str, table->s->table_name.str); |
115 | 118 | 118 | ||
116 | 119 | /* | 119 | /* |
117 | 120 | Release InnoDB's adaptive hash index latch (if holding) before | 120 | Release InnoDB's adaptive hash index latch (if holding) before |
118 | @@ -324,8 +324,8 @@ | |||
119 | 324 | (uint32_t) records, &LOCK_status); | 324 | (uint32_t) records, &LOCK_status); |
120 | 325 | *examined_rows= param.examined_rows; | 325 | *examined_rows= param.examined_rows; |
121 | 326 | memcpy(&table->sort, &table_sort, sizeof(filesort_info_st)); | 326 | memcpy(&table->sort, &table_sort, sizeof(filesort_info_st)); |
124 | 327 | DRIZZLE_FILESORT_END(); | 327 | DRIZZLE_FILESORT_DONE(error, records); |
125 | 328 | return(error ? HA_POS_ERROR : records); | 328 | return (error ? HA_POS_ERROR : records); |
126 | 329 | } /* filesort */ | 329 | } /* filesort */ |
127 | 330 | 330 | ||
128 | 331 | 331 | ||
129 | 332 | 332 | ||
130 | === modified file 'drizzled/handler.cc' | |||
131 | --- drizzled/handler.cc 2009-08-23 01:10:19 +0000 | |||
132 | +++ drizzled/handler.cc 2009-09-14 01:25:59 +0000 | |||
133 | @@ -2696,9 +2696,9 @@ | |||
134 | 2696 | We cache the table flags if the locking succeeded. Otherwise, we | 2696 | We cache the table flags if the locking succeeded. Otherwise, we |
135 | 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(). |
136 | 2698 | */ | 2698 | */ |
137 | 2699 | DRIZZLE_EXTERNAL_LOCK(lock_type); | ||
138 | 2700 | 2699 | ||
139 | 2701 | int error= external_lock(session, lock_type); | 2700 | int error= external_lock(session, lock_type); |
140 | 2701 | |||
141 | 2702 | if (error == 0) | 2702 | if (error == 0) |
142 | 2703 | cached_table_flags= table_flags(); | 2703 | cached_table_flags= table_flags(); |
143 | 2704 | return error; | 2704 | return error; |
144 | @@ -2729,7 +2729,6 @@ | |||
145 | 2729 | int handler::ha_write_row(unsigned char *buf) | 2729 | int handler::ha_write_row(unsigned char *buf) |
146 | 2730 | { | 2730 | { |
147 | 2731 | int error; | 2731 | int error; |
148 | 2732 | DRIZZLE_INSERT_ROW_START(); | ||
149 | 2733 | 2732 | ||
150 | 2734 | /* | 2733 | /* |
151 | 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 |
152 | @@ -2743,12 +2742,13 @@ | |||
153 | 2743 | mark_trx_read_write(); | 2742 | mark_trx_read_write(); |
154 | 2744 | 2743 | ||
155 | 2745 | if (unlikely(error= write_row(buf))) | 2744 | if (unlikely(error= write_row(buf))) |
156 | 2745 | { | ||
157 | 2746 | return error; | 2746 | return error; |
158 | 2747 | } | ||
159 | 2747 | 2748 | ||
160 | 2748 | if (unlikely(log_row_for_replication(table, 0, buf))) | 2749 | if (unlikely(log_row_for_replication(table, 0, buf))) |
161 | 2749 | return HA_ERR_RBR_LOGGING_FAILED; /* purecov: inspected */ | 2750 | return HA_ERR_RBR_LOGGING_FAILED; /* purecov: inspected */ |
162 | 2750 | 2751 | ||
163 | 2751 | DRIZZLE_INSERT_ROW_END(); | ||
164 | 2752 | return 0; | 2752 | return 0; |
165 | 2753 | } | 2753 | } |
166 | 2754 | 2754 | ||
167 | @@ -2766,7 +2766,9 @@ | |||
168 | 2766 | mark_trx_read_write(); | 2766 | mark_trx_read_write(); |
169 | 2767 | 2767 | ||
170 | 2768 | if (unlikely(error= update_row(old_data, new_data))) | 2768 | if (unlikely(error= update_row(old_data, new_data))) |
171 | 2769 | { | ||
172 | 2769 | return error; | 2770 | return error; |
173 | 2771 | } | ||
174 | 2770 | 2772 | ||
175 | 2771 | if (unlikely(log_row_for_replication(table, old_data, new_data))) | 2773 | if (unlikely(log_row_for_replication(table, old_data, new_data))) |
176 | 2772 | return HA_ERR_RBR_LOGGING_FAILED; | 2774 | return HA_ERR_RBR_LOGGING_FAILED; |
177 | 2773 | 2775 | ||
178 | === modified file 'drizzled/probes.d' | |||
179 | --- drizzled/probes.d 2008-11-01 00:46:20 +0000 | |||
180 | +++ drizzled/probes.d 2009-09-14 20:44:27 +0000 | |||
181 | @@ -1,7 +1,7 @@ | |||
182 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- |
183 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
184 | 3 | * | 3 | * |
186 | 4 | * Copyright (C) 2008 Sun Microsystems | 4 | * Copyright (C) 2009 Sun Microsystems |
187 | 5 | * | 5 | * |
188 | 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
189 | 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
190 | @@ -17,18 +17,107 @@ | |||
191 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
192 | 18 | */ | 18 | */ |
193 | 19 | 19 | ||
194 | 20 | /* | ||
195 | 21 | The actual probe names in DTrace scripts will replace '__' by '-'. Thus | ||
196 | 22 | insert__row__start will be insert-row-start. | ||
197 | 23 | |||
198 | 24 | Recommendations for adding new probes: | ||
199 | 25 | |||
200 | 26 | - each probe should have the minimal set of arguments required to | ||
201 | 27 | unambiguously identify the context in which the probe fires. Redundant | ||
202 | 28 | probes (i.e. the ones that can be obtained in user scripts from previous | ||
203 | 29 | probes' arguments or otherwise) may be added for convenience. | ||
204 | 30 | |||
205 | 31 | - try to avoid computationally expensive probe arguments. If impossible, | ||
206 | 32 | use *_ENABLED() macros to check if the probe is activated before | ||
207 | 33 | performing expensive calculations for a probe argument. | ||
208 | 34 | |||
209 | 35 | - all *-done probes should have a status argument wherever applicable to make | ||
210 | 36 | it possible for user scripts to figure out whether the completed operation | ||
211 | 37 | was successful or not. | ||
212 | 38 | |||
213 | 39 | - for all status arguments, a non-zero value should be returned on error or | ||
214 | 40 | failure, 0 should be returned on success. | ||
215 | 41 | */ | ||
216 | 42 | |||
217 | 20 | provider drizzle { | 43 | provider drizzle { |
231 | 21 | probe external_lock(int); | 44 | |
232 | 22 | probe insert_row_start(); | 45 | /* The following ones fire when creating or closing a client connection */ |
233 | 23 | probe insert_row_end(); | 46 | probe connection__start(unsigned long conn_id); |
234 | 24 | probe filesort_start(); | 47 | probe connection__done(unsigned long conn_id); |
235 | 25 | probe filesort_end(); | 48 | |
236 | 26 | probe delete_start(); | 49 | /* |
237 | 27 | probe delete_end(); | 50 | * Fire at the start/end of any client command processing (including SQL |
238 | 28 | probe insert_start(); | 51 | * queries). |
239 | 29 | probe insert_end(); | 52 | */ |
240 | 30 | probe select_start(); | 53 | probe command__start(unsigned long conn_id, int command); |
241 | 31 | probe select_end(); | 54 | probe command__done(int status); |
242 | 32 | probe update_start(); | 55 | |
243 | 33 | probe update_end(); | 56 | /* |
244 | 57 | * The following probes fire at the start/end of any SQL query processing, | ||
245 | 58 | * respectively. | ||
246 | 59 | * | ||
247 | 60 | * query_start() has a lot of parameters that can be used to pick up | ||
248 | 61 | * parameters for a lot of other probes here. For simplicity reasons we also | ||
249 | 62 | * add the query string to most other DTrace probes as well. Hostname is | ||
250 | 63 | * either the hostname or the IP address of the Drizzle client. | ||
251 | 64 | */ | ||
252 | 65 | probe query__start(const char *query, | ||
253 | 66 | unsigned long conn_id, | ||
254 | 67 | const char *db_name); | ||
255 | 68 | probe query__done(int status); | ||
256 | 69 | |||
257 | 70 | /* Fire at the start/end of SQL query parsing */ | ||
258 | 71 | probe query__parse__start(const char *query); | ||
259 | 72 | probe query__parse__done(int status); | ||
260 | 73 | |||
261 | 74 | /* | ||
262 | 75 | * This probe fires when the actual query execution starts | ||
263 | 76 | */ | ||
264 | 77 | probe query__exec__start(const char *query, | ||
265 | 78 | unsigned long connid, | ||
266 | 79 | const char *db_name); | ||
267 | 80 | probe query__exec__done(int status); | ||
268 | 81 | |||
269 | 82 | /* These probes fire when performing write operations towards any handler */ | ||
270 | 83 | probe insert__row__start(const char *db, const char *table); | ||
271 | 84 | probe insert__row__done(int status); | ||
272 | 85 | probe update__row__start(const char *db, const char *table); | ||
273 | 86 | probe update__row__done(int status); | ||
274 | 87 | probe delete__row__start(const char *db, const char *table); | ||
275 | 88 | probe delete__row__done(int status); | ||
276 | 89 | |||
277 | 90 | /* | ||
278 | 91 | * These probes fire when calling external_lock for any handler | ||
279 | 92 | * depending on the lock type being acquired or released. | ||
280 | 93 | */ | ||
281 | 94 | probe handler__rdlock__start(const char *db, const char *table); | ||
282 | 95 | probe handler__wrlock__start(const char *db, const char *table); | ||
283 | 96 | probe handler__unlock__start(const char *db, const char *table); | ||
284 | 97 | probe handler__rdlock__done(int status); | ||
285 | 98 | probe handler__wrlock__done(int status); | ||
286 | 99 | probe handler__unlock__done(int status); | ||
287 | 100 | |||
288 | 101 | /* | ||
289 | 102 | * These probes fire when a filesort activity happens in a query. | ||
290 | 103 | */ | ||
291 | 104 | probe filesort__start(const char *db, const char *table); | ||
292 | 105 | probe filesort__done(int status, unsigned long rows); | ||
293 | 106 | /* | ||
294 | 107 | * The query types SELECT, INSERT, INSERT AS SELECT, UPDATE, DELETE | ||
295 | 108 | * are all probed. | ||
296 | 109 | * The start probe always contains the query text. | ||
297 | 110 | */ | ||
298 | 111 | probe select__start(const char *query); | ||
299 | 112 | probe select__done(int status, unsigned long rows); | ||
300 | 113 | probe insert__start(const char *query); | ||
301 | 114 | probe insert__done(int status, unsigned long rows); | ||
302 | 115 | probe insert__select__start(const char *query); | ||
303 | 116 | probe insert__select__done(int status, unsigned long rows); | ||
304 | 117 | probe update__start(const char *query); | ||
305 | 118 | probe update__done(int status, | ||
306 | 119 | unsigned long rowsmatches, unsigned long rowschanged); | ||
307 | 120 | probe delete__start(const char *query); | ||
308 | 121 | probe delete__done(int status, unsigned long rows); | ||
309 | 122 | |||
310 | 34 | }; | 123 | }; |
311 | 35 | 124 | ||
312 | === added file 'drizzled/probes.h' | |||
313 | --- drizzled/probes.h 1970-01-01 00:00:00 +0000 | |||
314 | +++ drizzled/probes.h 2009-09-14 20:12:21 +0000 | |||
315 | @@ -0,0 +1,97 @@ | |||
316 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
317 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
318 | 3 | * | ||
319 | 4 | * Copyright (C) 2009 Sun Microsystems | ||
320 | 5 | * | ||
321 | 6 | * This program is free software; you can redistribute it and/or modify | ||
322 | 7 | * it under the terms of the GNU General Public License as published by | ||
323 | 8 | * the Free Software Foundation; either version 2 of the License, or | ||
324 | 9 | * (at your option) any later version. | ||
325 | 10 | * | ||
326 | 11 | * This program is distributed in the hope that it will be useful, | ||
327 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
328 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
329 | 14 | * GNU General Public License for more details. | ||
330 | 15 | * | ||
331 | 16 | * You should have received a copy of the GNU General Public License | ||
332 | 17 | * along with this program; if not, write to the Free Software | ||
333 | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
334 | 19 | */ | ||
335 | 20 | |||
336 | 21 | #ifndef DRIZZLED_PROBES_H | ||
337 | 22 | #define DRIZZLED_PROBES_H | ||
338 | 23 | |||
339 | 24 | #ifdef HAVE_DTRACE | ||
340 | 25 | #include "drizzled/generated_probes.h" | ||
341 | 26 | #else | ||
342 | 27 | #define DRIZZLE_COMMAND_DONE(arg0) | ||
343 | 28 | #define DRIZZLE_COMMAND_DONE_ENABLED() (0) | ||
344 | 29 | #define DRIZZLE_COMMAND_START(arg0, arg1) | ||
345 | 30 | #define DRIZZLE_COMMAND_START_ENABLED() (0) | ||
346 | 31 | #define DRIZZLE_CONNECTION_DONE(arg0) | ||
347 | 32 | #define DRIZZLE_CONNECTION_DONE_ENABLED() (0) | ||
348 | 33 | #define DRIZZLE_CONNECTION_START(arg0) | ||
349 | 34 | #define DRIZZLE_CONNECTION_START_ENABLED() (0) | ||
350 | 35 | #define DRIZZLE_DELETE_DONE(arg0, arg1) | ||
351 | 36 | #define DRIZZLE_DELETE_DONE_ENABLED() (0) | ||
352 | 37 | #define DRIZZLE_DELETE_ROW_DONE(arg0) | ||
353 | 38 | #define DRIZZLE_DELETE_ROW_DONE_ENABLED() (0) | ||
354 | 39 | #define DRIZZLE_DELETE_ROW_START(arg0, arg1) | ||
355 | 40 | #define DRIZZLE_DELETE_ROW_START_ENABLED() (0) | ||
356 | 41 | #define DRIZZLE_DELETE_START(arg0) | ||
357 | 42 | #define DRIZZLE_DELETE_START_ENABLED() (0) | ||
358 | 43 | #define DRIZZLE_FILESORT_DONE(arg0, arg1) | ||
359 | 44 | #define DRIZZLE_FILESORT_DONE_ENABLED() (0) | ||
360 | 45 | #define DRIZZLE_FILESORT_START(arg0, arg1) | ||
361 | 46 | #define DRIZZLE_FILESORT_START_ENABLED() (0) | ||
362 | 47 | #define DRIZZLE_HANDLER_RDLOCK_DONE(arg0) | ||
363 | 48 | #define DRIZZLE_HANDLER_RDLOCK_DONE_ENABLED() (0) | ||
364 | 49 | #define DRIZZLE_HANDLER_RDLOCK_START(arg0, arg1) | ||
365 | 50 | #define DRIZZLE_HANDLER_RDLOCK_START_ENABLED() (0) | ||
366 | 51 | #define DRIZZLE_HANDLER_UNLOCK_DONE(arg0) | ||
367 | 52 | #define DRIZZLE_HANDLER_UNLOCK_DONE_ENABLED() (0) | ||
368 | 53 | #define DRIZZLE_HANDLER_UNLOCK_START(arg0, arg1) | ||
369 | 54 | #define DRIZZLE_HANDLER_UNLOCK_START_ENABLED() (0) | ||
370 | 55 | #define DRIZZLE_HANDLER_WRLOCK_DONE(arg0) | ||
371 | 56 | #define DRIZZLE_HANDLER_WRLOCK_DONE_ENABLED() (0) | ||
372 | 57 | #define DRIZZLE_HANDLER_WRLOCK_START(arg0, arg1) | ||
373 | 58 | #define DRIZZLE_HANDLER_WRLOCK_START_ENABLED() (0) | ||
374 | 59 | #define DRIZZLE_INSERT_DONE(arg0, arg1) | ||
375 | 60 | #define DRIZZLE_INSERT_DONE_ENABLED() (0) | ||
376 | 61 | #define DRIZZLE_INSERT_ROW_DONE(arg0) | ||
377 | 62 | #define DRIZZLE_INSERT_ROW_DONE_ENABLED() (0) | ||
378 | 63 | #define DRIZZLE_INSERT_ROW_START(arg0, arg1) | ||
379 | 64 | #define DRIZZLE_INSERT_ROW_START_ENABLED() (0) | ||
380 | 65 | #define DRIZZLE_INSERT_SELECT_DONE(arg0, arg1) | ||
381 | 66 | #define DRIZZLE_INSERT_SELECT_DONE_ENABLED() (0) | ||
382 | 67 | #define DRIZZLE_INSERT_SELECT_START(arg0) | ||
383 | 68 | #define DRIZZLE_INSERT_SELECT_START_ENABLED() (0) | ||
384 | 69 | #define DRIZZLE_INSERT_START(arg0) | ||
385 | 70 | #define DRIZZLE_INSERT_START_ENABLED() (0) | ||
386 | 71 | #define DRIZZLE_QUERY_DONE(arg0) | ||
387 | 72 | #define DRIZZLE_QUERY_DONE_ENABLED() (0) | ||
388 | 73 | #define DRIZZLE_QUERY_EXEC_DONE(arg0) | ||
389 | 74 | #define DRIZZLE_QUERY_EXEC_DONE_ENABLED() (0) | ||
390 | 75 | #define DRIZZLE_QUERY_EXEC_START(arg0, arg1, arg2) | ||
391 | 76 | #define DRIZZLE_QUERY_EXEC_START_ENABLED() (0) | ||
392 | 77 | #define DRIZZLE_QUERY_PARSE_DONE(arg0) | ||
393 | 78 | #define DRIZZLE_QUERY_PARSE_DONE_ENABLED() (0) | ||
394 | 79 | #define DRIZZLE_QUERY_PARSE_START(arg0) | ||
395 | 80 | #define DRIZZLE_QUERY_PARSE_START_ENABLED() (0) | ||
396 | 81 | #define DRIZZLE_QUERY_START(arg0, arg1, arg2) | ||
397 | 82 | #define DRIZZLE_QUERY_START_ENABLED() (0) | ||
398 | 83 | #define DRIZZLE_SELECT_DONE(arg0, arg1) | ||
399 | 84 | #define DRIZZLE_SELECT_DONE_ENABLED() (0) | ||
400 | 85 | #define DRIZZLE_SELECT_START(arg0) | ||
401 | 86 | #define DRIZZLE_SELECT_START_ENABLED() (0) | ||
402 | 87 | #define DRIZZLE_UPDATE_DONE(arg0, arg1, arg2) | ||
403 | 88 | #define DRIZZLE_UPDATE_DONE_ENABLED() (0) | ||
404 | 89 | #define DRIZZLE_UPDATE_ROW_DONE(arg0) | ||
405 | 90 | #define DRIZZLE_UPDATE_ROW_DONE_ENABLED() (0) | ||
406 | 91 | #define DRIZZLE_UPDATE_ROW_START(arg0, arg1) | ||
407 | 92 | #define DRIZZLE_UPDATE_ROW_START_ENABLED() (0) | ||
408 | 93 | #define DRIZZLE_UPDATE_START(arg0) | ||
409 | 94 | #define DRIZZLE_UPDATE_START_ENABLED() (0) | ||
410 | 95 | #endif | ||
411 | 96 | |||
412 | 97 | #endif /* DRIZZLED_PROBES_H */ | ||
413 | 0 | 98 | ||
414 | === removed file 'drizzled/probes.h' | |||
415 | --- drizzled/probes.h 2009-05-21 17:05:14 +0000 | |||
416 | +++ drizzled/probes.h 1970-01-01 00:00:00 +0000 | |||
417 | @@ -1,250 +0,0 @@ | |||
418 | 1 | /* | ||
419 | 2 | * Generated by dtrace(1M). | ||
420 | 3 | */ | ||
421 | 4 | |||
422 | 5 | #ifndef _PROBES_H | ||
423 | 6 | #define _PROBES_H | ||
424 | 7 | |||
425 | 8 | |||
426 | 9 | |||
427 | 10 | #ifdef __cplusplus | ||
428 | 11 | extern "C" { | ||
429 | 12 | #endif | ||
430 | 13 | |||
431 | 14 | #if _DTRACE_VERSION | ||
432 | 15 | |||
433 | 16 | #define DRIZZLE_DELETE_END() \ | ||
434 | 17 | __dtrace_drizzle___delete_end() | ||
435 | 18 | #ifndef __sparc | ||
436 | 19 | #define DRIZZLE_DELETE_END_ENABLED() \ | ||
437 | 20 | __dtraceenabled_drizzle___delete_end() | ||
438 | 21 | #else | ||
439 | 22 | #define DRIZZLE_DELETE_END_ENABLED() \ | ||
440 | 23 | __dtraceenabled_drizzle___delete_end(0) | ||
441 | 24 | #endif | ||
442 | 25 | #define DRIZZLE_DELETE_START() \ | ||
443 | 26 | __dtrace_drizzle___delete_start() | ||
444 | 27 | #ifndef __sparc | ||
445 | 28 | #define DRIZZLE_DELETE_START_ENABLED() \ | ||
446 | 29 | __dtraceenabled_drizzle___delete_start() | ||
447 | 30 | #else | ||
448 | 31 | #define DRIZZLE_DELETE_START_ENABLED() \ | ||
449 | 32 | __dtraceenabled_drizzle___delete_start(0) | ||
450 | 33 | #endif | ||
451 | 34 | #define DRIZZLE_EXTERNAL_LOCK(arg0) \ | ||
452 | 35 | __dtrace_drizzle___external_lock(arg0) | ||
453 | 36 | #ifndef __sparc | ||
454 | 37 | #define DRIZZLE_EXTERNAL_LOCK_ENABLED() \ | ||
455 | 38 | __dtraceenabled_drizzle___external_lock() | ||
456 | 39 | #else | ||
457 | 40 | #define DRIZZLE_EXTERNAL_LOCK_ENABLED() \ | ||
458 | 41 | __dtraceenabled_drizzle___external_lock(0) | ||
459 | 42 | #endif | ||
460 | 43 | #define DRIZZLE_FILESORT_END() \ | ||
461 | 44 | __dtrace_drizzle___filesort_end() | ||
462 | 45 | #ifndef __sparc | ||
463 | 46 | #define DRIZZLE_FILESORT_END_ENABLED() \ | ||
464 | 47 | __dtraceenabled_drizzle___filesort_end() | ||
465 | 48 | #else | ||
466 | 49 | #define DRIZZLE_FILESORT_END_ENABLED() \ | ||
467 | 50 | __dtraceenabled_drizzle___filesort_end(0) | ||
468 | 51 | #endif | ||
469 | 52 | #define DRIZZLE_FILESORT_START() \ | ||
470 | 53 | __dtrace_drizzle___filesort_start() | ||
471 | 54 | #ifndef __sparc | ||
472 | 55 | #define DRIZZLE_FILESORT_START_ENABLED() \ | ||
473 | 56 | __dtraceenabled_drizzle___filesort_start() | ||
474 | 57 | #else | ||
475 | 58 | #define DRIZZLE_FILESORT_START_ENABLED() \ | ||
476 | 59 | __dtraceenabled_drizzle___filesort_start(0) | ||
477 | 60 | #endif | ||
478 | 61 | #define DRIZZLE_INSERT_END() \ | ||
479 | 62 | __dtrace_drizzle___insert_end() | ||
480 | 63 | #ifndef __sparc | ||
481 | 64 | #define DRIZZLE_INSERT_END_ENABLED() \ | ||
482 | 65 | __dtraceenabled_drizzle___insert_end() | ||
483 | 66 | #else | ||
484 | 67 | #define DRIZZLE_INSERT_END_ENABLED() \ | ||
485 | 68 | __dtraceenabled_drizzle___insert_end(0) | ||
486 | 69 | #endif | ||
487 | 70 | #define DRIZZLE_INSERT_ROW_END() \ | ||
488 | 71 | __dtrace_drizzle___insert_row_end() | ||
489 | 72 | #ifndef __sparc | ||
490 | 73 | #define DRIZZLE_INSERT_ROW_END_ENABLED() \ | ||
491 | 74 | __dtraceenabled_drizzle___insert_row_end() | ||
492 | 75 | #else | ||
493 | 76 | #define DRIZZLE_INSERT_ROW_END_ENABLED() \ | ||
494 | 77 | __dtraceenabled_drizzle___insert_row_end(0) | ||
495 | 78 | #endif | ||
496 | 79 | #define DRIZZLE_INSERT_ROW_START() \ | ||
497 | 80 | __dtrace_drizzle___insert_row_start() | ||
498 | 81 | #ifndef __sparc | ||
499 | 82 | #define DRIZZLE_INSERT_ROW_START_ENABLED() \ | ||
500 | 83 | __dtraceenabled_drizzle___insert_row_start() | ||
501 | 84 | #else | ||
502 | 85 | #define DRIZZLE_INSERT_ROW_START_ENABLED() \ | ||
503 | 86 | __dtraceenabled_drizzle___insert_row_start(0) | ||
504 | 87 | #endif | ||
505 | 88 | #define DRIZZLE_INSERT_START() \ | ||
506 | 89 | __dtrace_drizzle___insert_start() | ||
507 | 90 | #ifndef __sparc | ||
508 | 91 | #define DRIZZLE_INSERT_START_ENABLED() \ | ||
509 | 92 | __dtraceenabled_drizzle___insert_start() | ||
510 | 93 | #else | ||
511 | 94 | #define DRIZZLE_INSERT_START_ENABLED() \ | ||
512 | 95 | __dtraceenabled_drizzle___insert_start(0) | ||
513 | 96 | #endif | ||
514 | 97 | #define DRIZZLE_SELECT_END() \ | ||
515 | 98 | __dtrace_drizzle___select_end() | ||
516 | 99 | #ifndef __sparc | ||
517 | 100 | #define DRIZZLE_SELECT_END_ENABLED() \ | ||
518 | 101 | __dtraceenabled_drizzle___select_end() | ||
519 | 102 | #else | ||
520 | 103 | #define DRIZZLE_SELECT_END_ENABLED() \ | ||
521 | 104 | __dtraceenabled_drizzle___select_end(0) | ||
522 | 105 | #endif | ||
523 | 106 | #define DRIZZLE_SELECT_START() \ | ||
524 | 107 | __dtrace_drizzle___select_start() | ||
525 | 108 | #ifndef __sparc | ||
526 | 109 | #define DRIZZLE_SELECT_START_ENABLED() \ | ||
527 | 110 | __dtraceenabled_drizzle___select_start() | ||
528 | 111 | #else | ||
529 | 112 | #define DRIZZLE_SELECT_START_ENABLED() \ | ||
530 | 113 | __dtraceenabled_drizzle___select_start(0) | ||
531 | 114 | #endif | ||
532 | 115 | #define DRIZZLE_UPDATE_END() \ | ||
533 | 116 | __dtrace_drizzle___update_end() | ||
534 | 117 | #ifndef __sparc | ||
535 | 118 | #define DRIZZLE_UPDATE_END_ENABLED() \ | ||
536 | 119 | __dtraceenabled_drizzle___update_end() | ||
537 | 120 | #else | ||
538 | 121 | #define DRIZZLE_UPDATE_END_ENABLED() \ | ||
539 | 122 | __dtraceenabled_drizzle___update_end(0) | ||
540 | 123 | #endif | ||
541 | 124 | #define DRIZZLE_UPDATE_START() \ | ||
542 | 125 | __dtrace_drizzle___update_start() | ||
543 | 126 | #ifndef __sparc | ||
544 | 127 | #define DRIZZLE_UPDATE_START_ENABLED() \ | ||
545 | 128 | __dtraceenabled_drizzle___update_start() | ||
546 | 129 | #else | ||
547 | 130 | #define DRIZZLE_UPDATE_START_ENABLED() \ | ||
548 | 131 | __dtraceenabled_drizzle___update_start(0) | ||
549 | 132 | #endif | ||
550 | 133 | |||
551 | 134 | |||
552 | 135 | extern void __dtrace_drizzle___delete_end(void); | ||
553 | 136 | #ifndef __sparc | ||
554 | 137 | extern int __dtraceenabled_drizzle___delete_end(void); | ||
555 | 138 | #else | ||
556 | 139 | extern int __dtraceenabled_drizzle___delete_end(long); | ||
557 | 140 | #endif | ||
558 | 141 | extern void __dtrace_drizzle___delete_start(void); | ||
559 | 142 | #ifndef __sparc | ||
560 | 143 | extern int __dtraceenabled_drizzle___delete_start(void); | ||
561 | 144 | #else | ||
562 | 145 | extern int __dtraceenabled_drizzle___delete_start(long); | ||
563 | 146 | #endif | ||
564 | 147 | extern void __dtrace_drizzle___external_lock(int); | ||
565 | 148 | #ifndef __sparc | ||
566 | 149 | extern int __dtraceenabled_drizzle___external_lock(void); | ||
567 | 150 | #else | ||
568 | 151 | extern int __dtraceenabled_drizzle___external_lock(long); | ||
569 | 152 | #endif | ||
570 | 153 | extern void __dtrace_drizzle___filesort_end(void); | ||
571 | 154 | #ifndef __sparc | ||
572 | 155 | extern int __dtraceenabled_drizzle___filesort_end(void); | ||
573 | 156 | #else | ||
574 | 157 | extern int __dtraceenabled_drizzle___filesort_end(long); | ||
575 | 158 | #endif | ||
576 | 159 | extern void __dtrace_drizzle___filesort_start(void); | ||
577 | 160 | #ifndef __sparc | ||
578 | 161 | extern int __dtraceenabled_drizzle___filesort_start(void); | ||
579 | 162 | #else | ||
580 | 163 | extern int __dtraceenabled_drizzle___filesort_start(long); | ||
581 | 164 | #endif | ||
582 | 165 | extern void __dtrace_drizzle___insert_end(void); | ||
583 | 166 | #ifndef __sparc | ||
584 | 167 | extern int __dtraceenabled_drizzle___insert_end(void); | ||
585 | 168 | #else | ||
586 | 169 | extern int __dtraceenabled_drizzle___insert_end(long); | ||
587 | 170 | #endif | ||
588 | 171 | extern void __dtrace_drizzle___insert_row_end(void); | ||
589 | 172 | #ifndef __sparc | ||
590 | 173 | extern int __dtraceenabled_drizzle___insert_row_end(void); | ||
591 | 174 | #else | ||
592 | 175 | extern int __dtraceenabled_drizzle___insert_row_end(long); | ||
593 | 176 | #endif | ||
594 | 177 | extern void __dtrace_drizzle___insert_row_start(void); | ||
595 | 178 | #ifndef __sparc | ||
596 | 179 | extern int __dtraceenabled_drizzle___insert_row_start(void); | ||
597 | 180 | #else | ||
598 | 181 | extern int __dtraceenabled_drizzle___insert_row_start(long); | ||
599 | 182 | #endif | ||
600 | 183 | extern void __dtrace_drizzle___insert_start(void); | ||
601 | 184 | #ifndef __sparc | ||
602 | 185 | extern int __dtraceenabled_drizzle___insert_start(void); | ||
603 | 186 | #else | ||
604 | 187 | extern int __dtraceenabled_drizzle___insert_start(long); | ||
605 | 188 | #endif | ||
606 | 189 | extern void __dtrace_drizzle___select_end(void); | ||
607 | 190 | #ifndef __sparc | ||
608 | 191 | extern int __dtraceenabled_drizzle___select_end(void); | ||
609 | 192 | #else | ||
610 | 193 | extern int __dtraceenabled_drizzle___select_end(long); | ||
611 | 194 | #endif | ||
612 | 195 | extern void __dtrace_drizzle___select_start(void); | ||
613 | 196 | #ifndef __sparc | ||
614 | 197 | extern int __dtraceenabled_drizzle___select_start(void); | ||
615 | 198 | #else | ||
616 | 199 | extern int __dtraceenabled_drizzle___select_start(long); | ||
617 | 200 | #endif | ||
618 | 201 | extern void __dtrace_drizzle___update_end(void); | ||
619 | 202 | #ifndef __sparc | ||
620 | 203 | extern int __dtraceenabled_drizzle___update_end(void); | ||
621 | 204 | #else | ||
622 | 205 | extern int __dtraceenabled_drizzle___update_end(long); | ||
623 | 206 | #endif | ||
624 | 207 | extern void __dtrace_drizzle___update_start(void); | ||
625 | 208 | #ifndef __sparc | ||
626 | 209 | extern int __dtraceenabled_drizzle___update_start(void); | ||
627 | 210 | #else | ||
628 | 211 | extern int __dtraceenabled_drizzle___update_start(long); | ||
629 | 212 | #endif | ||
630 | 213 | |||
631 | 214 | #else | ||
632 | 215 | |||
633 | 216 | #define DRIZZLE_DELETE_END() | ||
634 | 217 | #define DRIZZLE_DELETE_END_ENABLED() (0) | ||
635 | 218 | #define DRIZZLE_DELETE_START() | ||
636 | 219 | #define DRIZZLE_DELETE_START_ENABLED() (0) | ||
637 | 220 | #define DRIZZLE_EXTERNAL_LOCK(arg0) | ||
638 | 221 | #define DRIZZLE_EXTERNAL_LOCK_ENABLED() (0) | ||
639 | 222 | #define DRIZZLE_FILESORT_END() | ||
640 | 223 | #define DRIZZLE_FILESORT_END_ENABLED() (0) | ||
641 | 224 | #define DRIZZLE_FILESORT_START() | ||
642 | 225 | #define DRIZZLE_FILESORT_START_ENABLED() (0) | ||
643 | 226 | #define DRIZZLE_INSERT_END() | ||
644 | 227 | #define DRIZZLE_INSERT_END_ENABLED() (0) | ||
645 | 228 | #define DRIZZLE_INSERT_ROW_END() | ||
646 | 229 | #define DRIZZLE_INSERT_ROW_END_ENABLED() (0) | ||
647 | 230 | #define DRIZZLE_INSERT_ROW_START() | ||
648 | 231 | #define DRIZZLE_INSERT_ROW_START_ENABLED() (0) | ||
649 | 232 | #define DRIZZLE_INSERT_START() | ||
650 | 233 | #define DRIZZLE_INSERT_START_ENABLED() (0) | ||
651 | 234 | #define DRIZZLE_SELECT_END() | ||
652 | 235 | #define DRIZZLE_SELECT_END_ENABLED() (0) | ||
653 | 236 | #define DRIZZLE_SELECT_START() | ||
654 | 237 | #define DRIZZLE_SELECT_START_ENABLED() (0) | ||
655 | 238 | #define DRIZZLE_UPDATE_END() | ||
656 | 239 | #define DRIZZLE_UPDATE_END_ENABLED() (0) | ||
657 | 240 | #define DRIZZLE_UPDATE_START() | ||
658 | 241 | #define DRIZZLE_UPDATE_START_ENABLED() (0) | ||
659 | 242 | |||
660 | 243 | #endif | ||
661 | 244 | |||
662 | 245 | |||
663 | 246 | #ifdef __cplusplus | ||
664 | 247 | } | ||
665 | 248 | #endif | ||
666 | 249 | |||
667 | 250 | #endif /* _PROBES_H */ | ||
668 | 251 | 0 | ||
669 | === modified file 'drizzled/session.cc' | |||
670 | --- drizzled/session.cc 2009-08-16 14:14:39 +0000 | |||
671 | +++ drizzled/session.cc 2009-09-13 04:30:14 +0000 | |||
672 | @@ -37,6 +37,7 @@ | |||
673 | 37 | #include <drizzled/item/empty_string.h> | 37 | #include <drizzled/item/empty_string.h> |
674 | 38 | #include <drizzled/show.h> | 38 | #include <drizzled/show.h> |
675 | 39 | #include <drizzled/scheduling.h> | 39 | #include <drizzled/scheduling.h> |
676 | 40 | #include "drizzled/probes.h" | ||
677 | 40 | 41 | ||
678 | 41 | #include <algorithm> | 42 | #include <algorithm> |
679 | 42 | 43 | ||
680 | @@ -481,6 +482,7 @@ | |||
681 | 481 | if (state_to_set != Session::KILL_QUERY) | 482 | if (state_to_set != Session::KILL_QUERY) |
682 | 482 | { | 483 | { |
683 | 483 | scheduler->killSession(this); | 484 | scheduler->killSession(this); |
684 | 485 | DRIZZLE_CONNECTION_DONE(thread_id); | ||
685 | 484 | } | 486 | } |
686 | 485 | if (mysys_var) | 487 | if (mysys_var) |
687 | 486 | { | 488 | { |
688 | @@ -620,6 +622,7 @@ | |||
689 | 620 | 622 | ||
690 | 621 | if (scheduler->addSession(this)) | 623 | if (scheduler->addSession(this)) |
691 | 622 | { | 624 | { |
692 | 625 | DRIZZLE_CONNECTION_START(thread_id); | ||
693 | 623 | char error_message_buff[DRIZZLE_ERRMSG_SIZE]; | 626 | char error_message_buff[DRIZZLE_ERRMSG_SIZE]; |
694 | 624 | 627 | ||
695 | 625 | killed= Session::KILL_CONNECTION; | 628 | killed= Session::KILL_CONNECTION; |
696 | 626 | 629 | ||
697 | === modified file 'drizzled/sql_delete.cc' | |||
698 | --- drizzled/sql_delete.cc 2009-08-06 16:51:53 +0000 | |||
699 | +++ drizzled/sql_delete.cc 2009-09-13 04:30:14 +0000 | |||
700 | @@ -25,6 +25,7 @@ | |||
701 | 25 | #include <drizzled/sql_parse.h> | 25 | #include <drizzled/sql_parse.h> |
702 | 26 | #include <drizzled/sql_base.h> | 26 | #include <drizzled/sql_base.h> |
703 | 27 | #include <drizzled/lock.h> | 27 | #include <drizzled/lock.h> |
704 | 28 | #include "drizzled/probes.h" | ||
705 | 28 | 29 | ||
706 | 29 | /** | 30 | /** |
707 | 30 | Implement DELETE SQL word. | 31 | Implement DELETE SQL word. |
708 | @@ -50,10 +51,14 @@ | |||
709 | 50 | uint32_t usable_index= MAX_KEY; | 51 | uint32_t usable_index= MAX_KEY; |
710 | 51 | Select_Lex *select_lex= &session->lex->select_lex; | 52 | Select_Lex *select_lex= &session->lex->select_lex; |
711 | 52 | Session::killed_state killed_status= Session::NOT_KILLED; | 53 | Session::killed_state killed_status= Session::NOT_KILLED; |
712 | 54 | int res= 0; | ||
713 | 53 | 55 | ||
714 | 54 | 56 | ||
715 | 55 | if (session->openTablesLock(table_list)) | 57 | if (session->openTablesLock(table_list)) |
716 | 58 | { | ||
717 | 59 | DRIZZLE_DELETE_DONE(1, 0); | ||
718 | 56 | return true; | 60 | return true; |
719 | 61 | } | ||
720 | 57 | 62 | ||
721 | 58 | table= table_list->table; | 63 | table= table_list->table; |
722 | 59 | assert(table); | 64 | assert(table); |
723 | @@ -162,14 +167,14 @@ | |||
724 | 162 | delete select; | 167 | delete select; |
725 | 163 | free_underlaid_joins(session, select_lex); | 168 | free_underlaid_joins(session, select_lex); |
726 | 164 | session->row_count_func= 0; | 169 | session->row_count_func= 0; |
728 | 165 | DRIZZLE_DELETE_END(); | 170 | DRIZZLE_DELETE_DONE(0, 0); |
729 | 166 | session->my_ok((ha_rows) session->row_count_func); | 171 | session->my_ok((ha_rows) session->row_count_func); |
730 | 167 | /* | 172 | /* |
731 | 168 | We don't need to call reset_auto_increment in this case, because | 173 | We don't need to call reset_auto_increment in this case, because |
732 | 169 | mysql_truncate always gives a NULL conds argument, hence we never | 174 | mysql_truncate always gives a NULL conds argument, hence we never |
733 | 170 | get here. | 175 | get here. |
734 | 171 | */ | 176 | */ |
736 | 172 | return(0); // Nothing to delete | 177 | return 0; // Nothing to delete |
737 | 173 | } | 178 | } |
738 | 174 | 179 | ||
739 | 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 */ |
740 | @@ -322,17 +327,18 @@ | |||
741 | 322 | assert(transactional_table || !deleted || session->transaction.stmt.modified_non_trans_table); | 327 | assert(transactional_table || !deleted || session->transaction.stmt.modified_non_trans_table); |
742 | 323 | free_underlaid_joins(session, select_lex); | 328 | free_underlaid_joins(session, select_lex); |
743 | 324 | 329 | ||
745 | 325 | DRIZZLE_DELETE_END(); | 330 | res= (error >= 0 || session->is_error()); |
746 | 331 | DRIZZLE_DELETE_DONE(res, deleted); | ||
747 | 326 | if (error < 0 || (session->lex->ignore && !session->is_fatal_error)) | 332 | if (error < 0 || (session->lex->ignore && !session->is_fatal_error)) |
748 | 327 | { | 333 | { |
749 | 328 | session->row_count_func= deleted; | 334 | session->row_count_func= deleted; |
750 | 329 | session->my_ok((ha_rows) session->row_count_func); | 335 | session->my_ok((ha_rows) session->row_count_func); |
751 | 330 | } | 336 | } |
753 | 331 | return(error >= 0 || session->is_error()); | 337 | return (error >= 0 || session->is_error()); |
754 | 332 | 338 | ||
755 | 333 | err: | 339 | err: |
758 | 334 | DRIZZLE_DELETE_END(); | 340 | DRIZZLE_DELETE_DONE(1, 0); |
759 | 335 | return(true); | 341 | return true; |
760 | 336 | } | 342 | } |
761 | 337 | 343 | ||
762 | 338 | 344 | ||
763 | 339 | 345 | ||
764 | === modified file 'drizzled/sql_insert.cc' | |||
765 | --- drizzled/sql_insert.cc 2009-08-24 14:57:56 +0000 | |||
766 | +++ drizzled/sql_insert.cc 2009-09-13 04:30:14 +0000 | |||
767 | @@ -240,7 +240,10 @@ | |||
768 | 240 | values_list.elements > 1); | 240 | values_list.elements > 1); |
769 | 241 | 241 | ||
770 | 242 | if (session->openTablesLock(table_list)) | 242 | if (session->openTablesLock(table_list)) |
771 | 243 | { | ||
772 | 244 | DRIZZLE_INSERT_DONE(1, 0); | ||
773 | 243 | return true; | 245 | return true; |
774 | 246 | } | ||
775 | 244 | 247 | ||
776 | 245 | lock_type= table_list->lock_type; | 248 | lock_type= table_list->lock_type; |
777 | 246 | 249 | ||
778 | @@ -466,8 +469,8 @@ | |||
779 | 466 | info.copied + info.deleted + info.touched, id, buff); | 469 | info.copied + info.deleted + info.touched, id, buff); |
780 | 467 | } | 470 | } |
781 | 468 | session->abort_on_warning= 0; | 471 | session->abort_on_warning= 0; |
784 | 469 | DRIZZLE_INSERT_END(); | 472 | DRIZZLE_INSERT_DONE(0, session->row_count_func); |
785 | 470 | return(false); | 473 | return false; |
786 | 471 | 474 | ||
787 | 472 | abort: | 475 | abort: |
788 | 473 | if (table != NULL) | 476 | if (table != NULL) |
789 | @@ -475,8 +478,8 @@ | |||
790 | 475 | if (!joins_freed) | 478 | if (!joins_freed) |
791 | 476 | free_underlaid_joins(session, &session->lex->select_lex); | 479 | free_underlaid_joins(session, &session->lex->select_lex); |
792 | 477 | session->abort_on_warning= 0; | 480 | session->abort_on_warning= 0; |
795 | 478 | DRIZZLE_INSERT_END(); | 481 | DRIZZLE_INSERT_DONE(1, 0); |
796 | 479 | return(true); | 482 | return true; |
797 | 480 | } | 483 | } |
798 | 481 | 484 | ||
799 | 482 | 485 | ||
800 | @@ -1336,7 +1339,8 @@ | |||
801 | 1336 | if (error) | 1339 | if (error) |
802 | 1337 | { | 1340 | { |
803 | 1338 | table->file->print_error(error,MYF(0)); | 1341 | table->file->print_error(error,MYF(0)); |
805 | 1339 | return(1); | 1342 | DRIZZLE_INSERT_SELECT_DONE(error, 0); |
806 | 1343 | return 1; | ||
807 | 1340 | } | 1344 | } |
808 | 1341 | char buff[160]; | 1345 | char buff[160]; |
809 | 1342 | if (info.ignore) | 1346 | if (info.ignore) |
810 | @@ -1354,7 +1358,8 @@ | |||
811 | 1354 | (info.copied ? autoinc_value_of_last_inserted_row : 0)); | 1358 | (info.copied ? autoinc_value_of_last_inserted_row : 0)); |
812 | 1355 | session->my_ok((ulong) session->row_count_func, | 1359 | session->my_ok((ulong) session->row_count_func, |
813 | 1356 | info.copied + info.deleted + info.touched, id, buff); | 1360 | info.copied + info.deleted + info.touched, id, buff); |
815 | 1357 | return(0); | 1361 | DRIZZLE_INSERT_SELECT_DONE(0, session->row_count_func); |
816 | 1362 | return 0; | ||
817 | 1358 | } | 1363 | } |
818 | 1359 | 1364 | ||
819 | 1360 | void select_insert::abort() { | 1365 | void select_insert::abort() { |
820 | @@ -1393,6 +1398,11 @@ | |||
821 | 1393 | table->file->ha_release_auto_increment(); | 1398 | table->file->ha_release_auto_increment(); |
822 | 1394 | } | 1399 | } |
823 | 1395 | 1400 | ||
824 | 1401 | if (DRIZZLE_INSERT_SELECT_DONE_ENABLED()) | ||
825 | 1402 | { | ||
826 | 1403 | DRIZZLE_INSERT_SELECT_DONE(0, info.copied + info.deleted + info.updated); | ||
827 | 1404 | } | ||
828 | 1405 | |||
829 | 1396 | return; | 1406 | return; |
830 | 1397 | } | 1407 | } |
831 | 1398 | 1408 | ||
832 | 1399 | 1409 | ||
833 | === modified file 'drizzled/sql_parse.cc' | |||
834 | --- drizzled/sql_parse.cc 2009-08-27 01:04:45 +0000 | |||
835 | +++ drizzled/sql_parse.cc 2009-09-14 04:21:55 +0000 | |||
836 | @@ -35,6 +35,7 @@ | |||
837 | 35 | #include <drizzled/lock.h> | 35 | #include <drizzled/lock.h> |
838 | 36 | #include <drizzled/select_send.h> | 36 | #include <drizzled/select_send.h> |
839 | 37 | #include <drizzled/statement.h> | 37 | #include <drizzled/statement.h> |
840 | 38 | #include "drizzled/probes.h" | ||
841 | 38 | 39 | ||
842 | 39 | #include <bitset> | 40 | #include <bitset> |
843 | 40 | #include <algorithm> | 41 | #include <algorithm> |
844 | @@ -166,7 +167,10 @@ | |||
845 | 166 | bool error= 0; | 167 | bool error= 0; |
846 | 167 | Query_id &query_id= Query_id::get_query_id(); | 168 | Query_id &query_id= Query_id::get_query_id(); |
847 | 168 | 169 | ||
849 | 169 | session->command=command; | 170 | DRIZZLE_COMMAND_START(session->thread_id, |
850 | 171 | command); | ||
851 | 172 | |||
852 | 173 | session->command= command; | ||
853 | 170 | session->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */ | 174 | session->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */ |
854 | 171 | session->set_time(); | 175 | session->set_time(); |
855 | 172 | session->query_id= query_id.value(); | 176 | session->query_id= query_id.value(); |
856 | @@ -204,6 +208,9 @@ | |||
857 | 204 | { | 208 | { |
858 | 205 | if (! session->readAndStoreQuery(packet, packet_length)) | 209 | if (! session->readAndStoreQuery(packet, packet_length)) |
859 | 206 | break; // fatal error is set | 210 | break; // fatal error is set |
860 | 211 | DRIZZLE_QUERY_START(session->query, | ||
861 | 212 | session->thread_id, | ||
862 | 213 | (char *) (session->db ? session->db : "")); | ||
863 | 207 | const char* end_of_stmt= NULL; | 214 | const char* end_of_stmt= NULL; |
864 | 208 | 215 | ||
865 | 209 | mysql_parse(session, session->query, session->query_length, &end_of_stmt); | 216 | mysql_parse(session, session->query, session->query_length, &end_of_stmt); |
866 | @@ -295,15 +302,25 @@ | |||
867 | 295 | 302 | ||
868 | 296 | /* Store temp state for processlist */ | 303 | /* Store temp state for processlist */ |
869 | 297 | session->set_proc_info("cleaning up"); | 304 | session->set_proc_info("cleaning up"); |
871 | 298 | session->command=COM_SLEEP; | 305 | session->command= COM_SLEEP; |
872 | 299 | memset(session->process_list_info, 0, PROCESS_LIST_WIDTH); | 306 | memset(session->process_list_info, 0, PROCESS_LIST_WIDTH); |
875 | 300 | session->query=0; | 307 | session->query= 0; |
876 | 301 | session->query_length=0; | 308 | session->query_length= 0; |
877 | 302 | 309 | ||
878 | 303 | session->set_proc_info(NULL); | 310 | session->set_proc_info(NULL); |
879 | 304 | session->packet.shrink(session->variables.net_buffer_length); // Reclaim some memory | 311 | session->packet.shrink(session->variables.net_buffer_length); // Reclaim some memory |
880 | 305 | free_root(session->mem_root,MYF(MY_KEEP_PREALLOC)); | 312 | free_root(session->mem_root,MYF(MY_KEEP_PREALLOC)); |
882 | 306 | return(error); | 313 | |
883 | 314 | if (DRIZZLE_QUERY_DONE_ENABLED() || DRIZZLE_COMMAND_DONE_ENABLED()) | ||
884 | 315 | { | ||
885 | 316 | if (command == COM_QUERY) | ||
886 | 317 | { | ||
887 | 318 | DRIZZLE_QUERY_DONE(session->is_error()); | ||
888 | 319 | } | ||
889 | 320 | DRIZZLE_COMMAND_DONE(session->is_error()); | ||
890 | 321 | } | ||
891 | 322 | |||
892 | 323 | return error; | ||
893 | 307 | } | 324 | } |
894 | 308 | 325 | ||
895 | 309 | 326 | ||
896 | @@ -759,8 +776,12 @@ | |||
897 | 759 | if (*found_semicolon && | 776 | if (*found_semicolon && |
898 | 760 | (session->query_length= (ulong)(*found_semicolon - session->query))) | 777 | (session->query_length= (ulong)(*found_semicolon - session->query))) |
899 | 761 | session->query_length--; | 778 | session->query_length--; |
900 | 779 | DRIZZLE_QUERY_EXEC_START(session->query, | ||
901 | 780 | session->thread_id, | ||
902 | 781 | (char *) (session->db ? session->db : "")); | ||
903 | 762 | /* Actually execute the query */ | 782 | /* Actually execute the query */ |
904 | 763 | mysql_execute_command(session); | 783 | mysql_execute_command(session); |
905 | 784 | DRIZZLE_QUERY_EXEC_DONE(0); | ||
906 | 764 | } | 785 | } |
907 | 765 | } | 786 | } |
908 | 766 | } | 787 | } |
909 | @@ -1819,6 +1840,8 @@ | |||
910 | 1819 | { | 1840 | { |
911 | 1820 | assert(session->m_lip == NULL); | 1841 | assert(session->m_lip == NULL); |
912 | 1821 | 1842 | ||
913 | 1843 | DRIZZLE_QUERY_PARSE_START(session->query); | ||
914 | 1844 | |||
915 | 1822 | /* Set Lex_input_stream. */ | 1845 | /* Set Lex_input_stream. */ |
916 | 1823 | 1846 | ||
917 | 1824 | session->m_lip= lip; | 1847 | session->m_lip= lip; |
918 | @@ -1835,6 +1858,8 @@ | |||
919 | 1835 | 1858 | ||
920 | 1836 | session->m_lip= NULL; | 1859 | session->m_lip= NULL; |
921 | 1837 | 1860 | ||
922 | 1861 | DRIZZLE_QUERY_PARSE_DONE(mysql_parse_status || session->is_fatal_error); | ||
923 | 1862 | |||
924 | 1838 | /* That's it. */ | 1863 | /* That's it. */ |
925 | 1839 | 1864 | ||
926 | 1840 | return mysql_parse_status || session->is_fatal_error; | 1865 | return mysql_parse_status || session->is_fatal_error; |
927 | 1841 | 1866 | ||
928 | === modified file 'drizzled/sql_select.cc' | |||
929 | --- drizzled/sql_select.cc 2009-08-20 21:45:52 +0000 | |||
930 | +++ drizzled/sql_select.cc 2009-09-13 01:44:36 +0000 | |||
931 | @@ -124,7 +124,7 @@ | |||
932 | 124 | { | 124 | { |
933 | 125 | bool res; | 125 | bool res; |
934 | 126 | register Select_Lex *select_lex= &lex->select_lex; | 126 | register Select_Lex *select_lex= &lex->select_lex; |
936 | 127 | DRIZZLE_SELECT_START(); | 127 | DRIZZLE_SELECT_START(session->query); |
937 | 128 | 128 | ||
938 | 129 | if (select_lex->master_unit()->is_union() || | 129 | if (select_lex->master_unit()->is_union() || |
939 | 130 | select_lex->master_unit()->fake_select_lex) | 130 | select_lex->master_unit()->fake_select_lex) |
940 | @@ -157,8 +157,8 @@ | |||
941 | 157 | if (unlikely(res)) | 157 | if (unlikely(res)) |
942 | 158 | result->abort(); | 158 | result->abort(); |
943 | 159 | 159 | ||
946 | 160 | DRIZZLE_SELECT_END(); | 160 | DRIZZLE_SELECT_DONE(res, session->limit_found_rows); |
947 | 161 | return(res); | 161 | return res; |
948 | 162 | } | 162 | } |
949 | 163 | 163 | ||
950 | 164 | /* | 164 | /* |
951 | 165 | 165 | ||
952 | === modified file 'drizzled/sql_update.cc' | |||
953 | --- drizzled/sql_update.cc 2009-08-20 20:29:18 +0000 | |||
954 | +++ drizzled/sql_update.cc 2009-09-13 04:30:14 +0000 | |||
955 | @@ -138,10 +138,14 @@ | |||
956 | 138 | uint64_t id; | 138 | uint64_t id; |
957 | 139 | List<Item> all_fields; | 139 | List<Item> all_fields; |
958 | 140 | Session::killed_state killed_status= Session::NOT_KILLED; | 140 | Session::killed_state killed_status= Session::NOT_KILLED; |
959 | 141 | int res= 0; | ||
960 | 141 | 142 | ||
962 | 142 | DRIZZLE_UPDATE_START(); | 143 | DRIZZLE_UPDATE_START(session->query); |
963 | 143 | if (session->openTablesLock(table_list)) | 144 | if (session->openTablesLock(table_list)) |
964 | 145 | { | ||
965 | 146 | DRIZZLE_UPDATE_DONE(1, 0, 0); | ||
966 | 144 | return 1; | 147 | return 1; |
967 | 148 | } | ||
968 | 145 | 149 | ||
969 | 146 | session->set_proc_info("init"); | 150 | session->set_proc_info("init"); |
970 | 147 | table= table_list->table; | 151 | table= table_list->table; |
971 | @@ -179,8 +183,8 @@ | |||
972 | 179 | if (select_lex->inner_refs_list.elements && | 183 | if (select_lex->inner_refs_list.elements && |
973 | 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)) |
974 | 181 | { | 185 | { |
977 | 182 | DRIZZLE_UPDATE_END(); | 186 | DRIZZLE_UPDATE_DONE(1, 0, 0); |
978 | 183 | return(-1); | 187 | return -1; |
979 | 184 | } | 188 | } |
980 | 185 | 189 | ||
981 | 186 | if (conds) | 190 | if (conds) |
982 | @@ -215,9 +219,9 @@ | |||
983 | 215 | free_underlaid_joins(session, select_lex); | 219 | free_underlaid_joins(session, select_lex); |
984 | 216 | if (error) | 220 | if (error) |
985 | 217 | goto abort; // Error in where | 221 | goto abort; // Error in where |
987 | 218 | DRIZZLE_UPDATE_END(); | 222 | DRIZZLE_UPDATE_DONE(0, 0, 0); |
988 | 219 | session->my_ok(); // No matching records | 223 | session->my_ok(); // No matching records |
990 | 220 | return(0); | 224 | return 0; |
991 | 221 | } | 225 | } |
992 | 222 | if (!select && limit != HA_POS_ERROR) | 226 | if (!select && limit != HA_POS_ERROR) |
993 | 223 | { | 227 | { |
994 | @@ -627,7 +631,6 @@ | |||
995 | 627 | id= session->arg_of_last_insert_id_function ? | 631 | id= session->arg_of_last_insert_id_function ? |
996 | 628 | session->first_successful_insert_id_in_prev_stmt : 0; | 632 | session->first_successful_insert_id_in_prev_stmt : 0; |
997 | 629 | 633 | ||
998 | 630 | DRIZZLE_UPDATE_END(); | ||
999 | 631 | if (error < 0) | 634 | if (error < 0) |
1000 | 632 | { | 635 | { |
1001 | 633 | char buff[STRING_BUFFER_USUAL_SIZE]; | 636 | char buff[STRING_BUFFER_USUAL_SIZE]; |
1002 | @@ -638,7 +641,9 @@ | |||
1003 | 638 | } | 641 | } |
1004 | 639 | session->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */ | 642 | session->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */ |
1005 | 640 | session->abort_on_warning= 0; | 643 | session->abort_on_warning= 0; |
1007 | 641 | return((error >= 0 || session->is_error()) ? 1 : 0); | 644 | res= (error >= 0 || session->is_error()) ? 1 : 0; |
1008 | 645 | DRIZZLE_UPDATE_DONE(res, found, updated); | ||
1009 | 646 | return ((error >= 0 || session->is_error()) ? 1 : 0); | ||
1010 | 642 | 647 | ||
1011 | 643 | err: | 648 | err: |
1012 | 644 | delete select; | 649 | delete select; |
1013 | @@ -651,8 +656,8 @@ | |||
1014 | 651 | session->abort_on_warning= 0; | 656 | session->abort_on_warning= 0; |
1015 | 652 | 657 | ||
1016 | 653 | abort: | 658 | abort: |
1019 | 654 | DRIZZLE_UPDATE_END(); | 659 | DRIZZLE_UPDATE_DONE(1, 0, 0); |
1020 | 655 | return(1); | 660 | return 1; |
1021 | 656 | } | 661 | } |
1022 | 657 | 662 | ||
1023 | 658 | /* | 663 | /* |
1024 | 659 | 664 | ||
1025 | === modified file 'drizzled/statement/delete.cc' | |||
1026 | --- drizzled/statement/delete.cc 2009-08-10 18:03:39 +0000 | |||
1027 | +++ drizzled/statement/delete.cc 2009-09-13 04:30:14 +0000 | |||
1028 | @@ -22,12 +22,14 @@ | |||
1029 | 22 | #include <drizzled/show.h> | 22 | #include <drizzled/show.h> |
1030 | 23 | #include <drizzled/session.h> | 23 | #include <drizzled/session.h> |
1031 | 24 | #include <drizzled/lock.h> | 24 | #include <drizzled/lock.h> |
1032 | 25 | #include <drizzled/probes.h> | ||
1033 | 25 | #include <drizzled/statement/delete.h> | 26 | #include <drizzled/statement/delete.h> |
1034 | 26 | 27 | ||
1035 | 27 | using namespace drizzled; | 28 | using namespace drizzled; |
1036 | 28 | 29 | ||
1037 | 29 | bool statement::Delete::execute() | 30 | bool statement::Delete::execute() |
1038 | 30 | { | 31 | { |
1039 | 32 | DRIZZLE_DELETE_START(session->query); | ||
1040 | 31 | TableList *first_table= (TableList *) session->lex->select_lex.table_list.first; | 33 | TableList *first_table= (TableList *) session->lex->select_lex.table_list.first; |
1041 | 32 | TableList *all_tables= session->lex->query_tables; | 34 | TableList *all_tables= session->lex->query_tables; |
1042 | 33 | Select_Lex *select_lex= &session->lex->select_lex; | 35 | Select_Lex *select_lex= &session->lex->select_lex; |
1043 | 34 | 36 | ||
1044 | === modified file 'drizzled/statement/insert.cc' | |||
1045 | --- drizzled/statement/insert.cc 2009-08-26 23:47:28 +0000 | |||
1046 | +++ drizzled/statement/insert.cc 2009-09-13 04:30:14 +0000 | |||
1047 | @@ -22,6 +22,7 @@ | |||
1048 | 22 | #include <drizzled/show.h> | 22 | #include <drizzled/show.h> |
1049 | 23 | #include <drizzled/lock.h> | 23 | #include <drizzled/lock.h> |
1050 | 24 | #include <drizzled/session.h> | 24 | #include <drizzled/session.h> |
1051 | 25 | #include <drizzled/probes.h> | ||
1052 | 25 | #include <drizzled/statement/insert.h> | 26 | #include <drizzled/statement/insert.h> |
1053 | 26 | 27 | ||
1054 | 27 | using namespace drizzled; | 28 | using namespace drizzled; |
1055 | @@ -43,6 +44,8 @@ | |||
1056 | 43 | return true; | 44 | return true; |
1057 | 44 | } | 45 | } |
1058 | 45 | 46 | ||
1059 | 47 | DRIZZLE_INSERT_START(session->query); | ||
1060 | 48 | |||
1061 | 46 | bool res= mysql_insert(session, | 49 | bool res= mysql_insert(session, |
1062 | 47 | all_tables, | 50 | all_tables, |
1063 | 48 | session->lex->field_list, | 51 | session->lex->field_list, |
1064 | 49 | 52 | ||
1065 | === modified file 'drizzled/statement/insert_select.cc' | |||
1066 | --- drizzled/statement/insert_select.cc 2009-08-27 00:39:15 +0000 | |||
1067 | +++ drizzled/statement/insert_select.cc 2009-09-13 04:30:14 +0000 | |||
1068 | @@ -22,6 +22,7 @@ | |||
1069 | 22 | #include <drizzled/show.h> | 22 | #include <drizzled/show.h> |
1070 | 23 | #include <drizzled/lock.h> | 23 | #include <drizzled/lock.h> |
1071 | 24 | #include <drizzled/session.h> | 24 | #include <drizzled/session.h> |
1072 | 25 | #include <drizzled/probes.h> | ||
1073 | 25 | #include <drizzled/statement/insert_select.h> | 26 | #include <drizzled/statement/insert_select.h> |
1074 | 26 | 27 | ||
1075 | 27 | using namespace drizzled; | 28 | using namespace drizzled; |
1076 | @@ -54,6 +55,7 @@ | |||
1077 | 54 | 55 | ||
1078 | 55 | if (! (res= session->openTablesLock(all_tables))) | 56 | if (! (res= session->openTablesLock(all_tables))) |
1079 | 56 | { | 57 | { |
1080 | 58 | DRIZZLE_INSERT_SELECT_START(session->query); | ||
1081 | 57 | /* Skip first table, which is the table we are inserting in */ | 59 | /* Skip first table, which is the table we are inserting in */ |
1082 | 58 | TableList *second_table= first_table->next_local; | 60 | TableList *second_table= first_table->next_local; |
1083 | 59 | select_lex->table_list.first= (unsigned char*) second_table; | 61 | select_lex->table_list.first= (unsigned char*) second_table; |
1084 | 60 | 62 | ||
1085 | === modified file 'm4/pandora_64bit.m4' | |||
1086 | --- m4/pandora_64bit.m4 2009-08-04 17:58:31 +0000 | |||
1087 | +++ m4/pandora_64bit.m4 2009-09-14 18:37:34 +0000 | |||
1088 | @@ -23,7 +23,7 @@ | |||
1089 | 23 | AS_IF([test "$isainfo_b" != "x"],[ | 23 | AS_IF([test "$isainfo_b" != "x"],[ |
1090 | 24 | 24 | ||
1091 | 25 | isainfo_k=`${ISAINFO} -k` | 25 | isainfo_k=`${ISAINFO} -k` |
1093 | 26 | DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}" | 26 | DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}" |
1094 | 27 | 27 | ||
1095 | 28 | AS_IF([test "x$ac_enable_64bit" = "xyes"],[ | 28 | AS_IF([test "x$ac_enable_64bit" = "xyes"],[ |
1096 | 29 | 29 |
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