Merge lp://staging/~diego-fmpwizard/drizzle/bug-fixes into lp://staging/~drizzle-trunk/drizzle/development

Proposed by fmpwizard
Status: Superseded
Proposed branch: lp://staging/~diego-fmpwizard/drizzle/bug-fixes
Merge into: lp://staging/~drizzle-trunk/drizzle/development
Diff against target: 82 lines
4 files modified
drizzled/sql_delete.cc (+10/-0)
drizzled/sql_update.cc (+10/-0)
tests/r/update.result (+2/-0)
tests/t/update.test (+6/-0)
To merge this branch: bzr merge lp://staging/~diego-fmpwizard/drizzle/bug-fixes
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+12855@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2009-10-05.

To post a comment you must log in.
Revision history for this message
fmpwizard (diego-fmpwizard) wrote :

* Fixed bug# 439719
"Drizzle crash when running random query generator"
* Added test case.

1139. By Diego Medina <email address hidden>

resolved small merge issue

1140. By Diego Medina <email address hidden>

uncommented a call to reset_diagnostics_area()

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/sql_delete.cc'
2--- drizzled/sql_delete.cc 2009-09-24 18:30:12 +0000
3+++ drizzled/sql_delete.cc 2009-10-05 04:08:11 +0000
4@@ -168,6 +168,11 @@
5 free_underlaid_joins(session, select_lex);
6 session->row_count_func= 0;
7 DRIZZLE_DELETE_DONE(0, 0);
8+ /**
9+ * Resetting the Diagnostic area to prevent
10+ * lp bug# 439719
11+ */
12+ session->main_da.reset_diagnostics_area();
13 session->my_ok((ha_rows) session->row_count_func);
14 /*
15 We don't need to call reset_auto_increment in this case, because
16@@ -331,6 +336,11 @@
17 if (error < 0 || (session->lex->ignore && !session->is_fatal_error))
18 {
19 session->row_count_func= deleted;
20+ /**
21+ * Resetting the Diagnostic area to prevent
22+ * lp bug# 439719
23+ */
24+ //session->main_da.reset_diagnostics_area();
25 session->my_ok((ha_rows) session->row_count_func);
26 }
27 return (error >= 0 || session->is_error());
28
29=== modified file 'drizzled/sql_update.cc'
30--- drizzled/sql_update.cc 2009-09-23 21:40:36 +0000
31+++ drizzled/sql_update.cc 2009-10-05 04:08:11 +0000
32@@ -215,6 +215,11 @@
33 (select && select->check_quick(session, safe_update, limit)))
34 {
35 delete select;
36+ /**
37+ * Resetting the Diagnostic area to prevent
38+ * lp bug# 439719
39+ */
40+ session->main_da.reset_diagnostics_area();
41 free_underlaid_joins(session, select_lex);
42 if (error)
43 goto abort; // Error in where
44@@ -632,6 +637,11 @@
45 sprintf(buff, ER(ER_UPDATE_INFO), (ulong) found, (ulong) updated,
46 (ulong) session->cuted_fields);
47 session->row_count_func= updated;
48+ /**
49+ * Resetting the Diagnostic area to prevent
50+ * lp bug# 439719
51+ */
52+ session->main_da.reset_diagnostics_area();
53 session->my_ok((ulong) session->row_count_func, found, id, buff);
54 }
55 session->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
56
57=== modified file 'tests/r/update.result'
58--- tests/r/update.result 2009-08-04 02:33:47 +0000
59+++ tests/r/update.result 2009-10-05 04:08:11 +0000
60@@ -398,4 +398,6 @@
61 count(*)
62 16384
63 drop table t1,t2;
64+CREATE TABLE t1(col1 enum('a','b') NOT NULL, col2 enum('a','b') DEFAULT NULL, KEY col2 (col2));
65+UPDATE t1 SET col1 = "crash" WHERE col2 = now() ;
66 End of 5.0 tests
67
68=== modified file 'tests/t/update.test'
69--- tests/t/update.test 2009-08-04 02:33:47 +0000
70+++ tests/t/update.test 2009-10-05 04:08:11 +0000
71@@ -337,6 +337,12 @@
72
73 drop table t1,t2;
74
75+#
76+# Bug #439719: Drizzle crash when running random query generator
77+#
78+CREATE TABLE t1(col1 enum('a','b') NOT NULL, col2 enum('a','b') DEFAULT NULL, KEY col2 (col2));
79+UPDATE t1 SET col1 = "crash" WHERE col2 = now() ;
80+
81 connection default;
82 disconnect con1;
83