mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-18918 SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT
The 10.5 version of the patch. Removing DEFAULT from INFORMATION_SCHEMA columns. DEFAULT in read-only tables is rather meaningless. Upgrade should go smoothly. Also fixes: MDEV-20254 Problems with EMPTY_STRING_IS_NULL and I_S tables
This commit is contained in:
@@ -45,13 +45,6 @@ enum enum_show_open_table
|
||||
};
|
||||
|
||||
|
||||
enum enum_show_default
|
||||
{
|
||||
DEFAULT_TYPE_IMPLICIT= 0,
|
||||
DEFAULT_NONE
|
||||
};
|
||||
|
||||
|
||||
namespace Show {
|
||||
class Type
|
||||
{
|
||||
@@ -95,29 +88,24 @@ class ST_FIELD_INFO: public Show::Type
|
||||
protected:
|
||||
LEX_CSTRING m_name; // I_S column name
|
||||
enum_nullability m_nullability; // NULLABLE or NOT NULL
|
||||
enum_show_default m_def; // Whether has a DEFAULT value
|
||||
LEX_CSTRING m_old_name; // SHOW column name
|
||||
enum_show_open_table m_open_method;
|
||||
public:
|
||||
ST_FIELD_INFO(const LEX_CSTRING &name, const Type &type,
|
||||
enum_nullability nullability,
|
||||
enum_show_default def,
|
||||
LEX_CSTRING &old_name,
|
||||
enum_show_open_table open_method)
|
||||
:Type(type), m_name(name),
|
||||
m_nullability(nullability),
|
||||
m_def(def),
|
||||
m_old_name(old_name),
|
||||
m_open_method(open_method)
|
||||
{ }
|
||||
ST_FIELD_INFO(const char *name, const Type &type,
|
||||
enum_nullability nullability,
|
||||
enum_show_default def,
|
||||
const char *old_name,
|
||||
enum_show_open_table open_method)
|
||||
:Type(type),
|
||||
m_nullability(nullability),
|
||||
m_def(def),
|
||||
m_open_method(open_method)
|
||||
{
|
||||
m_name.str= name;
|
||||
@@ -127,7 +115,6 @@ public:
|
||||
}
|
||||
const LEX_CSTRING &name() const { return m_name; }
|
||||
bool nullable() const { return m_nullability == NULLABLE; }
|
||||
enum_show_default def() const { return m_def; }
|
||||
const LEX_CSTRING &old_name() const { return m_old_name; }
|
||||
enum_show_open_table open_method() const { return m_open_method; }
|
||||
bool end_marker() const { return m_name.str == NULL; }
|
||||
@@ -298,27 +285,15 @@ class Column: public ST_FIELD_INFO
|
||||
public:
|
||||
Column(const char *name, const Type &type,
|
||||
enum_nullability nullability,
|
||||
enum_show_default def,
|
||||
const char *old_name,
|
||||
enum_show_open_table open_method= SKIP_OPEN_TABLE)
|
||||
:ST_FIELD_INFO(name, type, nullability, def, old_name, open_method)
|
||||
{ }
|
||||
Column(const char *name, const Type &type, enum_nullability nullability,
|
||||
enum_show_default def,
|
||||
enum_show_open_table open_method= SKIP_OPEN_TABLE)
|
||||
:ST_FIELD_INFO(name, type, nullability, def, NullS, open_method)
|
||||
{ }
|
||||
Column(const char *name, const Type &type,
|
||||
enum_nullability nullability,
|
||||
const char *old_name,
|
||||
enum_show_open_table open_method= SKIP_OPEN_TABLE)
|
||||
:ST_FIELD_INFO(name, type, nullability, DEFAULT_TYPE_IMPLICIT,
|
||||
:ST_FIELD_INFO(name, type, nullability,
|
||||
old_name, open_method)
|
||||
{ }
|
||||
Column(const char *name, const Type &type,
|
||||
enum_nullability nullability,
|
||||
enum_show_open_table open_method= SKIP_OPEN_TABLE)
|
||||
:ST_FIELD_INFO(name, type, nullability, DEFAULT_TYPE_IMPLICIT,
|
||||
:ST_FIELD_INFO(name, type, nullability,
|
||||
NullS, open_method)
|
||||
{ }
|
||||
};
|
||||
|
Reference in New Issue
Block a user