Crash using query logging and use <dbname> statement
Bug #421345 reported by
fmpwizard
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
High
|
fmpwizard |
Bug Description
Having the query logging plugin enabled, if you send a "USE information_schema" query, drizzle will crash.
I believe this is because when you execute the USE <dbname> statement, you end up with two queries, one is a SELECT DATABASE() and then a INIT_DB, the second one does not have a value for session->query, and this causes a crash on session-
This bug most likely also affects the gearman and syslog logging plugins.
This is using drizzle rev 1126. on mac os 10.5
================
Would you agree that a fix for this bug is to simple add entries to the log if session->query (the query text) has a value?
Related branches
lp:~diego-fmpwizard/drizzle/bug-fixes
- fmpwizard (community): Needs Resubmitting
- Brian Aker: Needs Information
- Drizzle Developers: Pending requested
-
Diff: 82 lines4 files modifieddrizzled/sql_delete.cc (+10/-0)
drizzled/sql_update.cc (+10/-0)
tests/r/update.result (+2/-0)
tests/t/update.test (+6/-0)
Changed in drizzle: | |
status: | New → Fix Committed |
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I thought a little more about it, and a better fix could be to modify getQueryLength() to check is query != NULL, and then decide to return strlen or 0.
I like this solution better because it allows anyone to call getQueryLength() without having to worry about query being NULL. (And it works :) )