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
d21fec6e
Commit
d21fec6e
authored
Dec 19, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Less "default_charset_info"
parent
482b2fcf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
27 deletions
+32
-27
sql/field.cc
sql/field.cc
+8
-8
sql/field.h
sql/field.h
+12
-12
sql/item_buff.cc
sql/item_buff.cc
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+3
-2
sql/opt_sum.cc
sql/opt_sum.cc
+2
-1
sql/sql_select.cc
sql/sql_select.cc
+6
-3
No files found.
sql/field.cc
View file @
d21fec6e
...
...
@@ -4276,7 +4276,7 @@ uint Field_varstring::max_packed_col_length(uint max_length)
return
(
max_length
>
255
?
2
:
1
)
+
max_length
;
}
void
Field_varstring
::
get_key_image
(
char
*
buff
,
uint
length
,
imagetype
type
)
void
Field_varstring
::
get_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
,
imagetype
type
)
{
length
-=
HA_KEY_BLOB_LENGTH
;
uint
f_length
=
uint2korr
(
ptr
);
...
...
@@ -4290,10 +4290,10 @@ void Field_varstring::get_key_image(char *buff, uint length, imagetype type)
#endif
}
void
Field_varstring
::
set_key_image
(
char
*
buff
,
uint
length
)
void
Field_varstring
::
set_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
)
{
length
=
uint2korr
(
buff
);
// Real length is here
(
void
)
Field_varstring
::
store
(
buff
+
2
,
length
,
default_charset_info
);
(
void
)
Field_varstring
::
store
(
buff
+
2
,
length
,
cs
);
}
...
...
@@ -4542,7 +4542,7 @@ int Field_blob::cmp_binary(const char *a_ptr, const char *b_ptr,
/* The following is used only when comparing a key */
void
Field_blob
::
get_key_image
(
char
*
buff
,
uint
length
,
imagetype
type
)
void
Field_blob
::
get_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
,
imagetype
type
)
{
length
-=
HA_KEY_BLOB_LENGTH
;
uint32
blob_length
=
get_length
(
ptr
);
...
...
@@ -4577,14 +4577,14 @@ void Field_blob::get_key_image(char *buff,uint length, imagetype type)
memcpy
(
buff
+
2
,
blob
,
length
);
}
void
Field_blob
::
set_key_image
(
char
*
buff
,
uint
length
)
void
Field_blob
::
set_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
)
{
length
=
uint2korr
(
buff
);
(
void
)
Field_blob
::
store
(
buff
+
2
,
length
,
default_charset_info
);
(
void
)
Field_blob
::
store
(
buff
+
2
,
length
,
cs
);
}
void
Field_geom
::
get_key_image
(
char
*
buff
,
uint
length
,
imagetype
type
)
void
Field_geom
::
get_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
,
imagetype
type
)
{
length
-=
HA_KEY_BLOB_LENGTH
;
ulong
blob_length
=
get_length
(
ptr
);
...
...
@@ -4603,7 +4603,7 @@ void Field_geom::get_key_image(char *buff,uint length, imagetype type)
return
;
}
void
Field_geom
::
set_key_image
(
char
*
buff
,
uint
length
)
void
Field_geom
::
set_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
)
{
}
...
...
sql/field.h
View file @
d21fec6e
...
...
@@ -149,14 +149,14 @@ class Field
if
(
null_ptr
)
null_ptr
=
ADD_TO_PTR
(
null_ptr
,
ptr_diff
,
uchar
*
);
}
inline
void
get_image
(
char
*
buff
,
uint
length
)
inline
void
get_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
)
{
memcpy
(
buff
,
ptr
,
length
);
}
inline
void
set_image
(
char
*
buff
,
uint
length
)
inline
void
set_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
)
{
memcpy
(
ptr
,
buff
,
length
);
}
virtual
void
get_key_image
(
char
*
buff
,
uint
length
,
imagetype
type
)
{
get_image
(
buff
,
length
);
}
virtual
void
set_key_image
(
char
*
buff
,
uint
length
)
{
set_image
(
buff
,
length
);
}
virtual
void
get_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
,
imagetype
type
)
{
get_image
(
buff
,
length
,
cs
);
}
virtual
void
set_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
)
{
set_image
(
buff
,
length
,
cs
);
}
inline
int
cmp_image
(
char
*
buff
,
uint
length
)
{
return
memcmp
(
ptr
,
buff
,
length
);
}
inline
longlong
val_int_offset
(
uint
row_offset
)
...
...
@@ -836,8 +836,8 @@ class Field_varstring :public Field_str {
bool
send_binary
(
Protocol
*
protocol
);
int
cmp
(
const
char
*
,
const
char
*
);
void
sort_string
(
char
*
buff
,
uint
length
);
void
get_key_image
(
char
*
buff
,
uint
length
,
imagetype
type
);
void
set_key_image
(
char
*
buff
,
uint
length
);
void
get_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
,
imagetype
type
);
void
set_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
);
void
sql_type
(
String
&
str
)
const
;
char
*
pack
(
char
*
to
,
const
char
*
from
,
uint
max_length
=~
(
uint
)
0
);
const
char
*
unpack
(
char
*
to
,
const
char
*
from
);
...
...
@@ -908,8 +908,8 @@ class Field_blob :public Field_str {
store_length
(
length
);
memcpy_fixed
(
ptr
+
packlength
,
&
data
,
sizeof
(
char
*
));
}
void
get_key_image
(
char
*
buff
,
uint
length
,
imagetype
type
);
void
set_key_image
(
char
*
buff
,
uint
length
);
void
get_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
,
imagetype
type
);
void
set_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
);
void
sql_type
(
String
&
str
)
const
;
inline
bool
copy
()
{
char
*
tmp
;
...
...
@@ -950,8 +950,8 @@ class Field_geom :public Field_blob {
table_arg
,
my_charset_bin
)
{}
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_VARBINARY
;
}
void
get_key_image
(
char
*
buff
,
uint
length
,
imagetype
type
);
void
set_key_image
(
char
*
buff
,
uint
length
);
void
get_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
,
imagetype
type
);
void
set_key_image
(
char
*
buff
,
uint
length
,
CHARSET_INFO
*
cs
);
};
...
...
sql/item_buff.cc
View file @
d21fec6e
...
...
@@ -99,7 +99,7 @@ bool Item_field_buff::cmp(void)
{
bool
tmp
=
field
->
cmp
(
buff
)
!=
0
;
// This is not a blob!
if
(
tmp
)
field
->
get_image
(
buff
,
length
);
field
->
get_image
(
buff
,
length
,
field
->
charset
()
);
if
(
null_value
!=
field
->
is_null
())
{
null_value
=
!
null_value
;
...
...
sql/opt_range.cc
View file @
d21fec6e
...
...
@@ -1043,7 +1043,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
if
(
maybe_null
)
*
str
=
(
char
)
field
->
is_real_null
();
// Set to 1 if null
field
->
get_key_image
(
str
+
maybe_null
,
key_part
->
part_length
,
key_part
->
image_type
);
field
->
charset
(),
key_part
->
image_type
);
if
(
!
(
tree
=
new
SEL_ARG
(
field
,
str
,
str
)))
DBUG_RETURN
(
0
);
...
...
@@ -2813,7 +2813,8 @@ print_key(KEY_PART *key_part,const char *key,uint used_length)
}
field
->
set_key_image
((
char
*
)
key
,
key_part
->
part_length
-
((
field
->
type
()
==
FIELD_TYPE_BLOB
)
?
HA_KEY_BLOB_LENGTH
:
0
));
HA_KEY_BLOB_LENGTH
:
0
),
field
->
charset
());
field
->
val_str
(
&
tmp
,
&
tmp
);
fwrite
(
tmp
.
ptr
(),
sizeof
(
char
),
tmp
.
length
(),
DBUG_FILE
);
}
...
...
sql/opt_sum.cc
View file @
d21fec6e
...
...
@@ -364,7 +364,8 @@ static bool find_range_key(TABLE_REF *ref, Field* field, COND *cond)
// Save found constant
if
(
part
->
null_bit
)
*
key_ptr
++=
(
byte
)
test
(
part
->
field
->
is_null
());
part
->
field
->
get_key_image
((
char
*
)
key_ptr
,
part
->
length
,
Field
::
itRAW
);
part
->
field
->
get_key_image
((
char
*
)
key_ptr
,
part
->
length
,
part
->
field
->
charset
(),
Field
::
itRAW
);
key_ptr
+=
part
->
store_length
-
test
(
part
->
null_bit
);
left_length
-=
part
->
store_length
;
}
...
...
sql/sql_select.cc
View file @
d21fec6e
...
...
@@ -6645,12 +6645,14 @@ store_record_in_cache(JOIN_CACHE *cache)
{
if
(
last_record
)
{
copy
->
blob_field
->
get_image
((
char
*
)
pos
,
copy
->
length
+
sizeof
(
char
*
));
copy
->
blob_field
->
get_image
((
char
*
)
pos
,
copy
->
length
+
sizeof
(
char
*
),
copy
->
blob_field
->
charset
());
pos
+=
copy
->
length
+
sizeof
(
char
*
);
}
else
{
copy
->
blob_field
->
get_image
((
char
*
)
pos
,
copy
->
length
);
// blob length
copy
->
blob_field
->
get_image
((
char
*
)
pos
,
copy
->
length
,
// blob length
copy
->
blob_field
->
charset
());
memcpy
(
pos
+
copy
->
length
,
copy
->
str
,
copy
->
blob_length
);
// Blob data
pos
+=
copy
->
length
+
copy
->
blob_length
;
}
...
...
@@ -6707,7 +6709,8 @@ read_cached_record(JOIN_TAB *tab)
{
if
(
last_record
)
{
copy
->
blob_field
->
set_image
((
char
*
)
pos
,
copy
->
length
+
sizeof
(
char
*
));
copy
->
blob_field
->
set_image
((
char
*
)
pos
,
copy
->
length
+
sizeof
(
char
*
),
copy
->
blob_field
->
charset
());
pos
+=
copy
->
length
+
sizeof
(
char
*
);
}
else
...
...
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