1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

EXPLAIN DELETE for MariaDB

- Backported the code to 10.0-base
- Removed incorrect assert
This commit is contained in:
Sergey Petrunya
2013-02-12 08:20:14 +04:00
parent a555ceb2fb
commit 18fec5128b
13 changed files with 550 additions and 83 deletions

View File

@ -500,6 +500,38 @@ public:
}
};
// The following class is a backport from MySQL 5.6:
/**
String class wrapper with a preallocated buffer of size buff_sz
This class allows to replace sequences of:
char buff[12345];
String str(buff, sizeof(buff));
str.length(0);
with a simple equivalent declaration:
StringBuffer<12345> str;
*/
template<size_t buff_sz>
class StringBuffer : public String
{
char buff[buff_sz];
public:
StringBuffer() : String(buff, buff_sz, &my_charset_bin) { length(0); }
explicit StringBuffer(const CHARSET_INFO *cs) : String(buff, buff_sz, cs)
{
length(0);
}
StringBuffer(const char *str, size_t length, const CHARSET_INFO *cs)
: String(buff, buff_sz, cs)
{
set(str, length, cs);
}
};
static inline bool check_if_only_end_space(CHARSET_INFO *cs,
const char *str,
const char *end)