1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-2000 Process charset definitions in the DDL

MCOL-2000 Process charset definitions in the ALTER TABLE .. ADD COLUMN

MCOL-2000 Yet another fixes for column charsets

* make respect for column (including table/db/server default) charsets
  for the TEXT(n) fields
* round TEXT(n) column length up to the next default length of TEXT-like
  subtypes, 255 (TINYTEXT), 65535 (TEXT) and so on up to 2100000000
  (LONGTEXT)
This commit is contained in:
Alexey Antipovsky
2020-11-24 15:56:14 +03:00
parent 6b13fbc210
commit d2e7c9d98d
6 changed files with 281 additions and 188 deletions

View File

@ -27,6 +27,8 @@
*/
#include <stdexcept>
#include <my_global.h>
#include <my_sys.h>
#include "ddlpkg.h"
#if defined(_MSC_VER) && defined(xxxDDLPKGSQLPARSER_DLLEXPORT)
@ -86,8 +88,9 @@ struct pass_to_bison
ParseTree* fParseTree;
std::string fDBSchema;
void* scanner;
const CHARSET_INFO* default_table_charset;
pass_to_bison(ParseTree* pt) : fParseTree(pt), scanner(NULL) {};
pass_to_bison(ParseTree* pt) : fParseTree(pt), scanner(NULL), default_table_charset(NULL) {};
};
class SqlParser
@ -120,6 +123,13 @@ public:
*/
EXPORT void setDefaultSchema(std::string schema);
/** @brief Set the default table charset. Can be overriden by column
* or table options
*
* @param default_charset the default CHARSET_INFO pointer
*/
EXPORT void setDefaultCharset(const CHARSET_INFO* default_charset);
protected:
ParseTree fParseTree;
std::string fDBSchema;