summaryrefslogtreecommitdiff
path: root/extra/yassl/include/buffer.hpp
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-12-02 22:25:16 +0100
committerSergei Golubchik <serg@mariadb.org>2014-12-02 22:25:16 +0100
commit853077ad7e81be1ade20b4beab1b95d5766d87b1 (patch)
tree4c158691947ba7beb4577f26b160f243eabf39ef /extra/yassl/include/buffer.hpp
parentbf3b4a23f75de50e0f1ab4a562e5801dabc7305b (diff)
parent2b5db1d5bcd7b46b654d59a07fc119ef6a6b8651 (diff)
downloadmariadb-git-853077ad7e81be1ade20b4beab1b95d5766d87b1.tar.gz
Merge branch '10.0' into bb-10.1-merge
Conflicts: .bzrignore VERSION cmake/plugin.cmake debian/dist/Debian/control debian/dist/Ubuntu/control mysql-test/r/join_outer.result mysql-test/r/join_outer_jcl6.result mysql-test/r/null.result mysql-test/r/old-mode.result mysql-test/r/union.result mysql-test/t/join_outer.test mysql-test/t/null.test mysql-test/t/old-mode.test mysql-test/t/union.test packaging/rpm-oel/mysql.spec.in scripts/mysql_config.sh sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/item_cmpfunc.h sql/lock.cc sql/sql_select.cc sql/sql_show.cc sql/sql_update.cc sql/sql_yacc.yy storage/innobase/buf/buf0flu.cc storage/innobase/fil/fil0fil.cc storage/innobase/include/srv0srv.h storage/innobase/lock/lock0lock.cc storage/tokudb/CMakeLists.txt storage/xtradb/buf/buf0flu.cc storage/xtradb/fil/fil0fil.cc storage/xtradb/include/srv0srv.h storage/xtradb/lock/lock0lock.cc support-files/mysql.spec.sh
Diffstat (limited to 'extra/yassl/include/buffer.hpp')
-rw-r--r--extra/yassl/include/buffer.hpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/extra/yassl/include/buffer.hpp b/extra/yassl/include/buffer.hpp
index 27f71199093..77d2ed8193c 100644
--- a/extra/yassl/include/buffer.hpp
+++ b/extra/yassl/include/buffer.hpp
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,7 +48,11 @@ const uint AUTO = 0xFEEDBEEF;
struct NoCheck {
- void check(uint, uint);
+ int check(uint, uint);
+};
+
+struct Check {
+ int check(uint, uint);
};
/* input_buffer operates like a smart c style array with a checking option,
@@ -60,11 +64,13 @@ struct NoCheck {
* write to the buffer bulk wise and have the correct size
*/
-class input_buffer : public NoCheck {
+class input_buffer : public Check {
uint size_; // number of elements in buffer
uint current_; // current offset position in buffer
byte* buffer_; // storage for buffer
byte* end_; // end of storage marker
+ int error_; // error number
+ byte zero_; // for returning const reference to zero byte
public:
input_buffer();
@@ -93,6 +99,10 @@ public:
uint get_remaining() const;
+ int get_error() const;
+
+ void set_error();
+
void set_current(uint i);
// read only access through [], advance current
@@ -103,7 +113,7 @@ public:
bool eof();
// peek ahead
- byte peek() const;
+ byte peek();
// write function, should use at/near construction
void assign(const byte* t, uint s);