libdrizzle: failed non-blocking connects do not report error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
In Progress
|
Low
|
Brian Aker |
Bug Description
1. Use an external event loop with libdrizzle
2. Try to connect to a non-existent server.
3. The connect will succeed, but the next operation will fail.
The problem is that libdrizzle assumes the event loop will set POLLERR if the non-blocking connect fails. However, libdrizzle only ever passes POLLOUT to drizzle_
The attached patch fixes this by checking getsockopt to see if the connect succeeded or failed. I haven't tested this in libdrizzle itself (I maintain my own copy in my project), but this works for me. Thanks!
Related branches
- Drizzle Merge Team: Pending requested
-
Diff: 837 lines (+279/-69)9 files modifiedlibdrizzle-1.0/drizzle_client.h (+1/-0)
libdrizzle-1.0/error.h (+49/-0)
libdrizzle-1.0/include.am (+2/-0)
libdrizzle-1.0/t/client_server.c (+39/-4)
libdrizzle-1.0/t/common.h (+4/-4)
libdrizzle-1.0/t/drizzle_st.c (+37/-2)
libdrizzle/conn.cc (+73/-57)
libdrizzle/drizzle.cc (+1/-2)
libdrizzle/error.cc (+73/-0)
- Drizzle Trunk: Pending requested
-
Diff: 28 lines (+2/-3)2 files modifiedlibdrizzle/conn.cc (+1/-2)
plugin/gearman_udf/function_map.cc (+1/-1)
Changed in drizzle: | |
status: | New → In Progress |
assignee: | nobody → Brian Aker (brianaker) |
importance: | Undecided → Low |
Changed in drizzle: | |
status: | In Progress → Fix Released |
See the attached branch (and confirm for yourself if it works).