Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
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.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: doStartTableScan() result not checked
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
+++ sql/handler.h 2010-06-01 17:37:48.230727373 +1000
@@ -1188,7 +1188,7 @@
inited=NONE;
DBUG_RETURN(index_end());
}
+ int ha_rnd_init(bool scan) _attribute_ ((warn_unused_result))
{
int result;
DBUG_ENTER("ha_rnd_init");