Drizzle client crash if drizzled is restarted and client had default db
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
High
|
fmpwizard |
Bug Description
1- Using the command line client, you execute
drizzle> use test;
2- Stop drizzled
3- On the command line client, run:
drizzle> show databases;
Boom, the client crashes.
=======
gdb shows:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x00000001000a6600 in drizzle_column_free (column=
357 if (column-
=======
(gdb) bt
#0 0x00000001000a6600 in drizzle_column_free (column=
#1 0x00000001000a508e in drizzle_result_free (result=
#2 0x0000000100005a3f in build_completio
#3 0x000000010000630b in com_rehash () at client/
#4 0x0000000100006371 in reconnect () at client/
#5 0x0000000100006749 in drizzleclient_
#6 0x0000000100006ceb in com_go (buffer=
#7 0x0000000100007b42 in add_line (buffer=
#8 0x00000001000082da in read_and_execute (interactive=true) at client/
#9 0x000000010000a342 in main (argc=3, argv=0x100302b58) at client/
Related branches
- 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 libdrizzle: | |
status: | New → In Progress |
assignee: | nobody → fmpwizard (diego-fmpwizard) |
importance: | Undecided → High |
Changed in drizzle: | |
status: | Fix Committed → Won't Fix |
status: | Won't Fix → Fix Released |
milestone: | none → bell |
This is what valgrind shows at the time of the crash
==15267== Conditional jump or move depends on uninitialised value(s) n_hash( bool, bool) (drizzle.cc:2471) std::string* , char const*) (drizzle.cc:3574) real_query_ for_lazy( char const*, int, drizzle_result_st*, unsigned int*) (drizzle.cc:2643) std::string* , char const*) (drizzle.cc:2742) std::string* , char*, char*, bool*) (drizzle.cc:2157) execute( bool) (drizzle.cc:1915) n_hash( bool, bool) (drizzle.cc:2471) std::string* , char const*) (drizzle.cc:3574) real_query_ for_lazy( char const*, int, drizzle_result_st*, unsigned int*) (drizzle.cc:2643) std::string* , char const*) (drizzle.cc:2742) std::string* , char*, char*, bool*) (drizzle.cc:2157) execute( bool) (drizzle.cc:1915) n_hash( bool, bool) (drizzle.cc:2471) std::string* , char const*) (drizzle.cc:3574) real_query_ for_lazy( char const*, int, drizzle_result_st*, unsigned int*) (drizzle.cc:2643) std::string* , char const*) (drizzle.cc:2742) std::string* , char*, char*, bool*) (drizzle.cc:2157) execute( bool) (drizzle.cc:1915) n_hash( bool, bool) (drizzle.cc:2471) std::string* , char const*) (drizzle.cc:3574) real_query_ for_lazy( char const*, int, drizzle_result_st*, unsigned int*) (drizzle.cc:2643) std::string* , char const*) (drizzle.cc:2742)
==15267== at 0x4C228E3: drizzle_result_free (result.c:80)
==15267== by 0x408551: build_completio
==15267== by 0x40B423: com_rehash(
==15267== by 0x408B11: reconnect() (drizzle.cc:2582)
==15267== by 0x408CCF: drizzleclient_
==15267== by 0x409139: com_go(
==15267== by 0x4078E6: add_line(
==15267== by 0x406D29: read_and_
==15267== by 0x405D4D: main (drizzle.cc:1324)
==15267==
==15267== Use of uninitialised value of size 8
==15267== at 0x4C23A10: drizzle_column_free (column.c:357)
==15267== by 0x4C228EC: drizzle_result_free (result.c:81)
==15267== by 0x408551: build_completio
==15267== by 0x40B423: com_rehash(
==15267== by 0x408B11: reconnect() (drizzle.cc:2582)
==15267== by 0x408CCF: drizzleclient_
==15267== by 0x409139: com_go(
==15267== by 0x4078E6: add_line(
==15267== by 0x406D29: read_and_
==15267== by 0x405D4D: main (drizzle.cc:1324)
==15267==
==15267== Invalid read of size 8
==15267== at 0x4C23A10: drizzle_column_free (column.c:357)
==15267== by 0x4C228EC: drizzle_result_free (result.c:81)
==15267== by 0x408551: build_completio
==15267== by 0x40B423: com_rehash(
==15267== by 0x408B11: reconnect() (drizzle.cc:2582)
==15267== by 0x408CCF: drizzleclient_
==15267== by 0x409139: com_go(
==15267== by 0x4078E6: add_line(
==15267== by 0x406D29: read_and_
==15267== by 0x405D4D: main (drizzle.cc:1324)
==15267== Address 0x15b182e160 is not stack'd, malloc'd or (recently) free'd
==15267==
==15267== Process terminating with default action of signal 11 (SIGSEGV)
==15267== Access not within mapped region at address 0x15B182E160
==15267== at 0x4C23A10: drizzle_column_free (column.c:357)
==15267== by 0x4C228EC: drizzle_result_free (result.c:81)
==15267== by 0x408551: build_completio
==15267== by 0x40B423: com_rehash(
==15267== by 0x408B11: reconnect() (drizzle.cc:2582)
==15267== by 0x408CCF: drizzleclient_
==15267== by 0x409139: com_go(
==15...