mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch 'merge-myrocks' of github.com:MariaDB/mergetrees into bb-10.2-mariarocks
Manually resolved a few conflicts
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
/* C++ standard header files */
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sstream> //psergey-merge
|
||||
|
||||
/* C standard header files */
|
||||
#include <ctype.h>
|
||||
@@ -225,6 +227,22 @@ const char *rdb_skip_id(const struct charset_info_st *const cs,
|
||||
return rdb_parse_id(cs, str, nullptr);
|
||||
}
|
||||
|
||||
/*
|
||||
Parses a given string into tokens (if any) separated by a specific delimiter.
|
||||
*/
|
||||
const std::vector<std::string> parse_into_tokens(
|
||||
const std::string& s, const char delim) {
|
||||
std::vector<std::string> tokens;
|
||||
std::string t;
|
||||
std::stringstream ss(s);
|
||||
|
||||
while (getline(ss, t, delim)) {
|
||||
tokens.push_back(t);
|
||||
}
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
||||
static const std::size_t rdb_hex_bytes_per_char = 2;
|
||||
static const std::array<char, 16> rdb_hexdigit = {{'0', '1', '2', '3', '4', '5',
|
||||
'6', '7', '8', '9', 'a', 'b',
|
||||
|
Reference in New Issue
Block a user