sql_perror() has off-by-one error leading to dropped out_of_bounds exception and other nasty instead of a sensible error message

Bug #911638 reported by Stewart Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Low
Stewart Smith

Bug Description

need this:

--- drizzled/errmsg_print.cc 2011-10-20 02:45:57 +0000
+++ drizzled/errmsg_print.cc 2012-01-04 07:10:40 +0000
@@ -74,7 +74,7 @@ void sql_perror(std::string message, con

   if (not extra.empty())
   {
- if (message.at(message.size()) != ' ')
+ if (message.at(message.size()-1) != ' ')
       message+= " ";

     message+= "'";

e.g. in transaction_log tests, if it couldn't open the transaction.log - you'd get a odd DRIZZLE_ABORT error message instead of "could not open file"

Related branches

Stewart Smith (stewart)
Changed in drizzle:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Stewart Smith (stewart)
Vijay Samuel (vjsamuel)
Changed in drizzle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.