doStartTableScan() result not checked
Bug #588251 reported by
Stewart Smith
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Stewart Smith | ||
7.0 |
Fix Released
|
Medium
|
Stewart Smith | ||
MariaDB |
Fix Released
|
Low
|
Michael Widenius | ||
MySQL Server |
Unknown
|
Unknown
|
Bug Description
In many places the error from doStartTableScan() is not checked. This can be spotted by adding warn_unused_result gcc attribute to it and seeing things fail.
It can also be spotted by returning an error from doStartTableScan() and instead seeing drizzled core instead of be sensible.
Related branches
lp:~stewart/drizzle/bug588251-startScan-unused-result
- Drizzle Developers: Pending requested
-
Diff: 362 lines (+83/-40)13 files modifieddrizzled/cursor.cc (+6/-3)
drizzled/cursor.h (+2/-2)
drizzled/filesort.cc (+4/-2)
drizzled/item/subselect.cc (+6/-1)
drizzled/optimizer/quick_index_merge_select.cc (+5/-1)
drizzled/records.cc (+20/-9)
drizzled/records.h (+5/-5)
drizzled/sql_delete.cc (+7/-1)
drizzled/sql_select.cc (+8/-3)
drizzled/sql_update.cc (+10/-3)
drizzled/statement/alter_table.cc (+7/-1)
plugin/haildb/haildb_engine.cc (+3/-8)
plugin/haildb/haildb_engine.h (+0/-1)
Changed in maria: | |
importance: | Undecided → Low |
Changed in maria: | |
assignee: | nobody → Michael Widenius (monty) |
Changed in maria: | |
status: | New → Fix Committed |
Changed in drizzle: | |
assignee: | nobody → Stewart Smith (stewart-flamingspork) |
Changed in maria: | |
milestone: | none → 5.2 |
Changed in maria: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
for MySQL/MariaDB this is rnd_init and this small patch produces about 10 warnings about actual bugs in mysql 5.1.46:
--- ../mysql- 5.1.46/ sql/handler. h 2010-04-07 00:06:06.000000000 +1000 RETURN( index_end( )); unused_ result) ) ENTER(" ha_rnd_ init");
+++ sql/handler.h 2010-06-01 17:37:48.230727373 +1000
@@ -1188,7 +1188,7 @@
inited=NONE;
DBUG_
}
- int ha_rnd_init(bool scan)
+ int ha_rnd_init(bool scan) __attribute__ ((warn_
{
int result;
DBUG_