~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/commit.cc

  • Committer: Monty Taylor
  • Date: 2009-08-29 19:30:29 UTC
  • mto: (1126.5.1 captain-20090914-03)
  • mto: This revision was merged to the branch mainline in revision 1129.
  • Revision ID: mordred@inaugust.com-20090829193029-i12fw4pg91dm8nu9
Fixed a buffer overrun that was causing some translated message output to suck.

Honestly guys, declaring a char[80] and then doing an sprintf into it with
no length checking? sigh

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <drizzled/server_includes.h>
22
22
#include <drizzled/show.h>
23
23
#include <drizzled/session.h>
24
24
#include <drizzled/statement/commit.h>
25
25
 
26
 
namespace drizzled
27
 
{
 
26
using namespace drizzled;
28
27
 
29
28
bool statement::Commit::execute()
30
29
{
31
 
  if (! session->endTransaction(tx_release ? COMMIT_RELEASE : tx_chain ? COMMIT_AND_CHAIN : COMMIT))
 
30
  if (! session->endTransaction(session->lex->tx_release ? COMMIT_RELEASE : session->lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT))
32
31
  {
33
32
    return true;
34
33
  }
35
34
  session->my_ok();
36
35
  return false;
37
36
}
38
 
 
39
 
} /* namespace drizzled */
40