diff options
author | Michael Widenius <monty@mariadb.org> | 2020-08-02 12:31:14 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-05-19 22:27:28 +0200 |
commit | 3105c9e7a5eb3706f6520e1566ed4a2add06c6a5 (patch) | |
tree | 628f083d286f970ac8358f882195ea834c16131e /sql/sql_show.cc | |
parent | 451c4ae548fd4b0dda93ac499682e95b249bfcf4 (diff) | |
download | mariadb-git-3105c9e7a5eb3706f6520e1566ed4a2add06c6a5.tar.gz |
Change bitfields in Item to an uint16
The reason for the change is that neither clang or gcc can do efficient
code when several bit fields are change at the same time or when copying
one or more bits between identical bit fields.
Updated bits explicitely with & and | is MUCH more efficient than what
current compilers can do.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 617caf12aa3..c5084c4dff4 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2865,7 +2865,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) field_list.push_back(field=new (mem_root) Item_empty_string(thd, "db", NAME_CHAR_LEN), mem_root); - field->maybe_null=1; + field->flags|= ITEM_FLAG_MAYBE_NULL;; field_list.push_back(new (mem_root) Item_empty_string(thd, "Command", 16), mem_root); field_list.push_back(field= new (mem_root) @@ -2875,18 +2875,18 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) field_list.push_back(field=new (mem_root) Item_empty_string(thd, "State", 30), mem_root); - field->maybe_null=1; + field->flags|= ITEM_FLAG_MAYBE_NULL;; field_list.push_back(field=new (mem_root) Item_empty_string(thd, "Info", arg.max_query_length), mem_root); - field->maybe_null=1; + field->flags|= ITEM_FLAG_MAYBE_NULL;; if (!thd->variables.old_mode && !(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO)) { field_list.push_back(field= new (mem_root) Item_float(thd, "Progress", 0.0, 3, 7), mem_root); - field->maybe_null= 0; + field->flags&= (Item::item_flags_t) ~ITEM_FLAG_MAYBE_NULL; } if (protocol->send_result_set_metadata(&field_list, Protocol::SEND_NUM_ROWS | @@ -9767,7 +9767,7 @@ static bool show_create_trigger_impl(THD *thd, Trigger *trigger) (uint)MY_MAX(trg_sql_original_stmt.length, 1024)); - stmt_fld->maybe_null= TRUE; + stmt_fld->flags|= ITEM_FLAG_MAYBE_NULL; fields.push_back(stmt_fld, mem_root); } |