summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/item.h8
-rw-r--r--sql/log_event.cc17
-rw-r--r--sql/opt_range.h8
-rw-r--r--sql/sql_cache.h2
-rw-r--r--sql/sql_insert.cc1
-rw-r--r--sql/sys_vars.cc2
6 files changed, 27 insertions, 11 deletions
diff --git a/sql/item.h b/sql/item.h
index e8cc5031ca4..ac4a42107cb 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -6002,6 +6002,14 @@ public:
Item_direct_ref::save_in_result_field(no_conversions);
}
+ int save_in_field(Field *field, bool no_conversions)
+ {
+ if (check_null_ref())
+ return set_field_to_null_with_conversions(field, no_conversions);
+
+ return Item_direct_ref::save_in_field(field, no_conversions);
+ }
+
void cleanup()
{
null_ref_table= NULL;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 0cb8667c8b0..8b09a908cda 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2991,10 +2991,12 @@ log_event_print_value(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info,
my_b_write_bit(file, ptr , (meta & 0xFF) * 8);
return meta & 0xFF;
+ case MYSQL_TYPE_BLOB_COMPRESSED:
case MYSQL_TYPE_BLOB:
switch (meta) {
case 1:
- strmake(typestr, "TINYBLOB/TINYTEXT", typestr_length);
+ my_snprintf(typestr, typestr_length, "TINYBLOB/TINYTEXT%s",
+ type == MYSQL_TYPE_BLOB_COMPRESSED ? " COMPRESSED" : "");
if (!ptr)
goto return_null;
@@ -3002,7 +3004,8 @@ log_event_print_value(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info,
my_b_write_quoted(file, ptr + 1, length);
return length + 1;
case 2:
- strmake(typestr, "BLOB/TEXT", typestr_length);
+ my_snprintf(typestr, typestr_length, "BLOB/TEXT%s",
+ type == MYSQL_TYPE_BLOB_COMPRESSED ? " COMPRESSED" : "");
if (!ptr)
goto return_null;
@@ -3010,7 +3013,8 @@ log_event_print_value(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info,
my_b_write_quoted(file, ptr + 2, length);
return length + 2;
case 3:
- strmake(typestr, "MEDIUMBLOB/MEDIUMTEXT", typestr_length);
+ my_snprintf(typestr, typestr_length, "MEDIUMBLOB/MEDIUMTEXT%s",
+ type == MYSQL_TYPE_BLOB_COMPRESSED ? " COMPRESSED" : "");
if (!ptr)
goto return_null;
@@ -3018,7 +3022,8 @@ log_event_print_value(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info,
my_b_write_quoted(file, ptr + 3, length);
return length + 3;
case 4:
- strmake(typestr, "LONGBLOB/LONGTEXT", typestr_length);
+ my_snprintf(typestr, typestr_length, "LONGBLOB/LONGTEXT%s",
+ type == MYSQL_TYPE_BLOB_COMPRESSED ? " COMPRESSED" : "");
if (!ptr)
goto return_null;
@@ -3030,10 +3035,12 @@ log_event_print_value(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info,
return 0;
}
+ case MYSQL_TYPE_VARCHAR_COMPRESSED:
case MYSQL_TYPE_VARCHAR:
case MYSQL_TYPE_VAR_STRING:
length= meta;
- my_snprintf(typestr, typestr_length, "VARSTRING(%d)", length);
+ my_snprintf(typestr, typestr_length, "VARSTRING(%d)%s", length,
+ type == MYSQL_TYPE_VARCHAR_COMPRESSED ? " COMPRESSED" : "");
if (!ptr)
goto return_null;
diff --git a/sql/opt_range.h b/sql/opt_range.h
index 11d9f80865a..42cede28f20 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -716,7 +716,7 @@ class QUICK_RANGE :public Sql_alloc {
}
/**
- Initalizes a key_range object for communication with storage engine.
+ Initializes a key_range object for communication with storage engine.
This function facilitates communication with the Storage Engine API by
translating the minimum endpoint of the interval represented by this
@@ -737,7 +737,7 @@ class QUICK_RANGE :public Sql_alloc {
}
/**
- Initalizes a key_range object for communication with storage engine.
+ Initializes a key_range object for communication with storage engine.
This function facilitates communication with the Storage Engine API by
translating the minimum endpoint of the interval represented by this
@@ -754,7 +754,7 @@ class QUICK_RANGE :public Sql_alloc {
}
/**
- Initalizes a key_range object for communication with storage engine.
+ Initializes a key_range object for communication with storage engine.
This function facilitates communication with the Storage Engine API by
translating the maximum endpoint of the interval represented by this
@@ -775,7 +775,7 @@ class QUICK_RANGE :public Sql_alloc {
}
/**
- Initalizes a key_range object for communication with storage engine.
+ Initializes a key_range object for communication with storage engine.
This function facilitates communication with the Storage Engine API by
translating the maximum endpoint of the interval represented by this
diff --git a/sql/sql_cache.h b/sql/sql_cache.h
index d59bc37b7a3..d89bcda2491 100644
--- a/sql/sql_cache.h
+++ b/sql/sql_cache.h
@@ -32,7 +32,7 @@ typedef struct st_changed_table_list CHANGED_TABLE_LIST;
Can't create new free memory block if unused memory in block less
then QUERY_CACHE_MIN_ALLOCATION_UNIT.
if QUERY_CACHE_MIN_ALLOCATION_UNIT == 0 then
- QUERY_CACHE_MIN_ALLOCATION_UNIT choosed automaticaly
+ QUERY_CACHE_MIN_ALLOCATION_UNIT choosed automatically
*/
#define QUERY_CACHE_MIN_ALLOCATION_UNIT 512
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 5696d3108d3..d56ccdff2a7 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4441,6 +4441,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
*/
DBUG_ASSERT(0);
}
+ create_table->table->pos_in_table_list= create_table;
}
}
else
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 627b6191e51..4dd45b7ce43 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -5550,7 +5550,7 @@ static bool update_wsrep_auto_increment_control (sys_var *self, THD *thd, enum_v
{
/*
The variables that control auto increment shall be calculated
- automaticaly based on the size of the cluster. This usually done
+ automatically based on the size of the cluster. This usually done
within the wsrep_view_handler_cb callback. However, if the user
manually sets the value of wsrep_auto_increment_control to 'ON',
then we should to re-calculate these variables again (because