Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5b716bc2
Commit
5b716bc2
authored
Nov 25, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: reorder TABLE members
parent
0ed291e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
18 deletions
+19
-18
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/sql_load.cc
sql/sql_load.cc
+1
-1
sql/table.cc
sql/table.cc
+1
-1
sql/table.h
sql/table.h
+16
-15
No files found.
sql/sql_insert.cc
View file @
5b716bc2
...
...
@@ -1518,7 +1518,7 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
if
(
!
table
)
table
=
table_list
->
table
;
if
(
table
->
s
->
virtual_stored_fields
)
if
(
table
->
s
->
has_
virtual_stored_fields
)
thd
->
lex
->
unit
.
insert_table_with_stored_vcol
=
table
;
if
(
!
select_insert
)
...
...
sql/sql_load.cc
View file @
5b716bc2
...
...
@@ -410,7 +410,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table
->
prepare_triggers_for_insert_stmt_or_event
();
table
->
mark_columns_needed_for_insert
();
if
(
table
->
s
->
virtual_stored_fields
)
if
(
table
->
s
->
has_
virtual_stored_fields
)
thd
->
lex
->
unit
.
insert_table_with_stored_vcol
=
table
;
uint
tot_length
=
0
;
...
...
sql/table.cc
View file @
5b716bc2
...
...
@@ -2233,7 +2233,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
DBUG_ASSERT
(
!
reg_field
->
vcol_info
);
reg_field
->
vcol_info
=
vcol_info
;
share
->
virtual_fields
++
;
share
->
virtual_stored_fields
=
true
;
// For insert/load data
share
->
has_virtual_stored_fields
=
true
;
// For insert/load data
break
;
case
2
:
// Default expression
vcol_info
->
stored_in_db
=
1
;
...
...
sql/table.h
View file @
5b716bc2
...
...
@@ -644,17 +644,22 @@ struct TABLE_SHARE
the record then this value is 0.
*/
uint
null_bytes_for_compare
;
uint
fields
;
/* Number of fields */
/* Number of stored fields, generated-only virtual fields are not included */
uint
stored_fields
;
uint
fields
;
/* number of fields */
uint
stored_fields
;
/* number of stored fields, purely virtual not included */
uint
virtual_fields
;
/* number of purely virtual fields */
uint
null_fields
;
/* number of null fields */
uint
blob_fields
;
/* number of blob fields */
uint
varchar_fields
;
/* number of varchar fields */
uint
default_fields
;
/* number of default fields */
uint
default_expressions
;
uint
table_check_constraints
,
field_check_constraints
;
uint
rec_buff_length
;
/* Size of table->record[] buffer */
uint
keys
,
key_parts
;
uint
ext_key_parts
;
/* Total number of key parts in extended keys */
uint
max_key_length
,
max_unique_length
,
total_key_length
;
uint
uniques
;
/* Number of UNIQUE index */
uint
null_fields
;
/* number of null fields */
uint
blob_fields
;
/* number of blob fields */
uint
varchar_fields
;
/* number of varchar fields */
uint
db_create_options
;
/* Create options from database */
uint
db_options_in_use
;
/* Options in use */
uint
db_record_offset
;
/* if HA_REC_IN_SEQ */
...
...
@@ -668,10 +673,7 @@ struct TABLE_SHARE
uint
open_errno
;
/* error from open_table_def() */
uint
column_bitmap_size
;
uchar
frm_version
;
uint
virtual_fields
;
uint
default_expressions
;
uint
table_check_constraints
,
field_check_constraints
;
uint
default_fields
;
/* Number of default fields */
bool
use_ext_keys
;
/* Extended keys can be used */
bool
null_field_first
;
bool
system
;
/* Set if system table (one record) */
...
...
@@ -682,7 +684,7 @@ struct TABLE_SHARE
bool
table_creation_was_logged
;
bool
non_determinstic_insert
;
bool
vcols_need_refixing
;
bool
virtual_stored_fields
;
bool
has_
virtual_stored_fields
;
bool
check_set_initialized
;
bool
has_update_default_function
;
ulong
table_map_id
;
/* for row-based replication */
...
...
@@ -1029,7 +1031,6 @@ struct TABLE
uint32
instance
;
/** Table cache instance this TABLE is belonging to */
THD
*
in_use
;
/* Which thread uses this */
Field
**
field
;
/* Pointer to fields */
uchar
*
record
[
2
];
/* Pointer to records */
uchar
*
write_row_record
;
/* Used as optimisation in
...
...
@@ -1059,11 +1060,11 @@ struct TABLE
key_map
keys_in_use_for_order_by
;
KEY
*
key_info
;
/* data of keys in database */
Field
**
field
;
/* Pointer to fields */
Field
**
vfield
;
/* Pointer to virtual fields*/
Field
**
default_field
;
/* Fields with non-constant DEFAULT */
Field
*
next_number_field
;
/* Set if next_number is activated */
Field
*
found_next_number_field
;
/* Set on open */
Field
**
vfield
;
/* Pointer to virtual fields*/
/* Fields that are updated automatically on INSERT or UPDATE. */
Field
**
default_field
;
Virtual_column_info
**
check_constraints
;
/* Table's triggers, 0 if there are no of them */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment