Merge lp:~ziminq/drizzle/fix-bug550090 into lp:~drizzle-trunk/drizzle/development

Proposed by ziminq
Status: Rejected
Rejected by: Monty Taylor
Proposed branch: lp:~ziminq/drizzle/fix-bug550090
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 23 lines (+5/-1)
1 file modified
drizzled/statement/select.h (+5/-1)
To merge this branch: bzr merge lp:~ziminq/drizzle/fix-bug550090
Reviewer Review Type Date Requested Status
Brian Aker Disapprove
Review via email: mp+22863@code.launchpad.net

Description of the change

This bug is caused due to the member used without being initialized at first.
The calling path can be reached to the execution of 'select' statement by 'select * from show_tables' and 'show tables'. On the later case, the select statement is setShowPredicate() at first, while for the former case, it's not. Hence, it causes the bug.

To post a comment you must log in.
Revision history for this message
Brian Aker (brianaker) wrote :

Hi!

Thanks, you were right on the bug.I applied a different solution to the problem though. Inside of the table function if schema was not found, then the current schema should be used. If that is not found? Then the table function should return zero rows.

Thanks!

Cheers,
  -Brian

review: Disapprove

Unmerged revisions

1442. By ziminq

fix bug 550090

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/statement/select.h'
2--- drizzled/statement/select.h 2010-02-19 00:48:09 +0000
3+++ drizzled/statement/select.h 2010-04-06 13:26:24 +0000
4@@ -22,6 +22,7 @@
5 #define DRIZZLED_STATEMENT_SELECT_H
6
7 #include <drizzled/statement.h>
8+#include <drizzled/session.h>
9
10 namespace drizzled
11 {
12@@ -40,7 +41,10 @@
13 Select(Session *in_session)
14 :
15 Statement(in_session)
16- {}
17+ {
18+ if (not in_session->db.empty())
19+ show_schema= in_session->db;
20+ }
21
22 void setShowPredicate(const std::string &schema_arg, const std::string &table_arg)
23 {