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
5c5034f9
Commit
5c5034f9
authored
Dec 28, 2015
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding "const" qualifier to methods Field::eq_def() and
Copy_field::get_copy_func().
parent
af01d843
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
sql/field.cc
sql/field.cc
+3
-3
sql/field.h
sql/field.h
+5
-5
sql/field_conv.cc
sql/field_conv.cc
+1
-1
No files found.
sql/field.cc
View file @
5c5034f9
...
...
@@ -8863,7 +8863,7 @@ void Field_set::sql_type(String &res) const
0 if the fields are unequally defined
*/
bool
Field
::
eq_def
(
const
Field
*
field
)
bool
Field
::
eq_def
(
const
Field
*
field
)
const
{
if
(
real_type
()
!=
field
->
real_type
()
||
charset
()
!=
field
->
charset
()
||
pack_length
()
!=
field
->
pack_length
())
...
...
@@ -8895,7 +8895,7 @@ static bool compare_type_names(CHARSET_INFO *charset, TYPELIB *t1, TYPELIB *t2)
returns 1 if the fields are equally defined
*/
bool
Field_enum
::
eq_def
(
const
Field
*
field
)
bool
Field_enum
::
eq_def
(
const
Field
*
field
)
const
{
TYPELIB
*
values
;
...
...
@@ -8972,7 +8972,7 @@ const uchar *Field_enum::unpack(uchar *to, const uchar *from,
@return
returns 1 if the fields are equally defined
*/
bool
Field_num
::
eq_def
(
const
Field
*
field
)
bool
Field_num
::
eq_def
(
const
Field
*
field
)
const
{
if
(
!
Field
::
eq_def
(
field
))
return
0
;
...
...
sql/field.h
View file @
5c5034f9
...
...
@@ -792,7 +792,7 @@ class Field: public Value_source
return
(
ptr
==
field
->
ptr
&&
null_ptr
==
field
->
null_ptr
&&
null_bit
==
field
->
null_bit
&&
field
->
type
()
==
type
());
}
virtual
bool
eq_def
(
const
Field
*
field
);
virtual
bool
eq_def
(
const
Field
*
field
)
const
;
/*
pack_length() returns size (in bytes) used to store field data in memory
...
...
@@ -1518,7 +1518,7 @@ class Field_num :public Field {
void
make_field
(
Send_field
*
);
uint
decimals
()
const
{
return
(
uint
)
dec
;
}
uint
size_of
()
const
{
return
sizeof
(
*
this
);
}
bool
eq_def
(
const
Field
*
field
);
bool
eq_def
(
const
Field
*
field
)
const
;
int
save_in_field
(
Field
*
to
)
{
return
to
->
store
(
val_int
(),
MY_TEST
(
flags
&
UNSIGNED_FLAG
));
...
...
@@ -2151,7 +2151,7 @@ class Field_temporal: public Field {
enum
Item_result
cmp_type
()
const
{
return
TIME_RESULT
;
}
bool
val_bool
()
{
return
val_real
()
!=
0e0
;
}
uint
is_equal
(
Create_field
*
new_field
);
bool
eq_def
(
const
Field
*
field
)
bool
eq_def
(
const
Field
*
field
)
const
{
return
(
Field
::
eq_def
(
field
)
&&
decimals
()
==
field
->
decimals
());
}
...
...
@@ -3302,7 +3302,7 @@ class Field_enum :public Field_str {
uint
row_pack_length
()
const
{
return
pack_length
();
}
virtual
bool
zero_pack
()
const
{
return
0
;
}
bool
optimize_range
(
uint
idx
,
uint
part
)
{
return
0
;
}
bool
eq_def
(
const
Field
*
field
);
bool
eq_def
(
const
Field
*
field
)
const
;
bool
has_charset
(
void
)
const
{
return
TRUE
;
}
/* enum and set are sorted as integers */
CHARSET_INFO
*
sort_charset
(
void
)
const
{
return
&
my_charset_bin
;
}
...
...
@@ -3697,7 +3697,7 @@ class Copy_field :public Sql_alloc {
get_copy_func.
*/
typedef
void
Copy_func
(
Copy_field
*
);
Copy_func
*
get_copy_func
(
Field
*
to
,
Field
*
from
);
Copy_func
*
get_copy_func
(
const
Field
*
to
,
const
Field
*
from
);
public:
uchar
*
from_ptr
,
*
to_ptr
;
uchar
*
from_null_ptr
,
*
to_null_ptr
;
...
...
sql/field_conv.cc
View file @
5c5034f9
...
...
@@ -703,7 +703,7 @@ void Copy_field::set(Field *to,Field *from,bool save)
Copy_field
::
Copy_func
*
Copy_field
::
get_copy_func
(
Field
*
to
,
Field
*
from
)
Copy_field
::
get_copy_func
(
const
Field
*
to
,
const
Field
*
from
)
{
if
(
to
->
flags
&
BLOB_FLAG
)
{
...
...
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