You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
feat(ddl): MCOL-5744: better handling of utf8 charset aliases (#3174)
Server expands ut8_XXX aliases to utf8mb3_XXX or utf8mb4_XXX depending on the UTF8_IS_UTF8MB3 setting in the OLD_MODE environment variable. Server already has the necessary code implemented in the get_utf8_flag() method of class THD. There are several uses of this flag and all we have to do to be in line with server is to use it. This patch does that for DDL as work on MCOL-5705 uncovered some problems in that area.
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#include <stdexcept>
|
||||
#include "collation.h" // CHARSET_INFO
|
||||
#include "ddlpkg.h"
|
||||
#include "mariadb_my_sys.h" // myf, MYF()
|
||||
|
||||
#define EXPORT
|
||||
|
||||
@ -83,8 +84,14 @@ struct pass_to_bison
|
||||
std::string fDBSchema;
|
||||
void* scanner;
|
||||
const CHARSET_INFO* default_table_charset;
|
||||
myf utf8_flag;
|
||||
|
||||
pass_to_bison(ParseTree* pt) : fParseTree(pt), scanner(NULL), default_table_charset(NULL){};
|
||||
pass_to_bison(ParseTree* pt) :
|
||||
fParseTree(pt)
|
||||
, scanner(NULL)
|
||||
, default_table_charset(NULL)
|
||||
, utf8_flag(MYF(0))
|
||||
{};
|
||||
};
|
||||
|
||||
class SqlParser
|
||||
@ -94,7 +101,7 @@ class SqlParser
|
||||
|
||||
EXPORT virtual ~SqlParser();
|
||||
|
||||
EXPORT int Parse(const char* sqltext);
|
||||
EXPORT int Parse(const char* sqltext, myf utf8_flag);
|
||||
|
||||
/** @brief Return the ParseTree if state is Good. Otherwise
|
||||
* throw a logic_error.
|
||||
|
Reference in New Issue
Block a user