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
cc08c43e
Commit
cc08c43e
authored
Apr 14, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove Item_default_value::cached_field
parent
b5e16a6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
sql/item.cc
sql/item.cc
+2
-5
sql/item.h
sql/item.h
+4
-5
No files found.
sql/item.cc
View file @
cc08c43e
...
...
@@ -1055,8 +1055,7 @@ bool Item_field::check_field_expression_processor(void *arg)
(
!
field
->
vcol_info
&&
!
org_field
->
vcol_info
))
&&
field
->
field_index
>=
org_field
->
field_index
))
{
my_error
(
ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
,
MYF
(
0
),
my_error
(
ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
,
MYF
(
0
),
org_field
->
field_name
,
field
->
field_name
);
return
1
;
}
...
...
@@ -9024,7 +9023,6 @@ bool Item_default_value::fix_fields(THD *thd, Item **items)
}
if
(
!
(
def_field
=
(
Field
*
)
thd
->
alloc
(
field_arg
->
field
->
size_of
())))
goto
error
;
cached_field
=
def_field
;
memcpy
((
void
*
)
def_field
,
(
void
*
)
field_arg
->
field
,
field_arg
->
field
->
size_of
());
def_field
->
reset_fields
();
...
...
@@ -9063,8 +9061,7 @@ bool Item_default_value::enchant_default_with_arg_processor(void *proc_arg)
void
Item_default_value
::
cleanup
()
{
delete
cached_field
;
// Free cached blob data
cached_field
=
0
;
delete
field
;
// Free cached blob data
Item_field
::
cleanup
();
}
...
...
sql/item.h
View file @
cc08c43e
...
...
@@ -5455,18 +5455,17 @@ class Item_default_value : public Item_field
Item_default_value
(
THD
*
thd
,
Name_resolution_context
*
context_arg
,
Item
*
a
)
:
Item_field
(
thd
,
context_arg
,
(
const
char
*
)
NULL
,
(
const
char
*
)
NULL
,
(
const
char
*
)
NULL
),
arg
(
a
)
,
cached_field
(
NULL
)
{}
arg
(
a
)
{}
public:
Item
*
arg
;
Field
*
cached_field
;
Item_default_value
(
THD
*
thd
,
Name_resolution_context
*
context_arg
)
:
Item_field
(
thd
,
context_arg
,
(
const
char
*
)
NULL
,
(
const
char
*
)
NULL
,
(
const
char
*
)
NULL
),
arg
(
NULL
)
,
cached_field
(
NULL
)
{}
arg
(
NULL
)
{}
Item_default_value
(
THD
*
thd
,
Name_resolution_context
*
context_arg
,
Field
*
a
)
:
Item_field
(
thd
,
context_arg
,
(
const
char
*
)
NULL
,
(
const
char
*
)
NULL
,
(
const
char
*
)
NULL
),
arg
(
NULL
)
,
cached_field
(
NULL
)
{}
arg
(
NULL
)
{}
enum
Type
type
()
const
{
return
DEFAULT_VALUE_ITEM
;
}
bool
vcol_assignment_allowed_value
()
const
{
return
true
;
}
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
...
...
@@ -5498,7 +5497,7 @@ class Item_default_value : public Item_field
return
false
;
}
table_map
used_tables
()
const
;
v
irtual
v
oid
update_used_tables
()
void
update_used_tables
()
{
if
(
field
&&
field
->
default_value
)
field
->
default_value
->
expr
->
update_used_tables
();
...
...
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