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
54abb8e9
Commit
54abb8e9
authored
Dec 20, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
less default_charset_info
parent
f6d3338a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
sql/filesort.cc
sql/filesort.cc
+2
-2
sql/key.cc
sql/key.cc
+1
-2
sql/opt_range.cc
sql/opt_range.cc
+2
-2
sql/sql_delete.cc
sql/sql_delete.cc
+2
-2
No files found.
sql/filesort.cc
View file @
54abb8e9
...
...
@@ -470,10 +470,11 @@ static void make_sortkey(register SORTPARAM *param,
switch
(
sort_field
->
result_type
)
{
case
STRING_RESULT
:
{
CHARSET_INFO
*
cs
=
item
->
charset
();
if
(
item
->
maybe_null
)
*
to
++=
1
;
/* All item->str() to use some extra byte for end null.. */
String
tmp
((
char
*
)
to
,
sort_field
->
length
+
4
,
default_charset_info
);
String
tmp
((
char
*
)
to
,
sort_field
->
length
+
4
,
cs
);
String
*
res
=
item
->
val_str
(
&
tmp
);
if
(
!
res
)
{
...
...
@@ -488,7 +489,6 @@ static void make_sortkey(register SORTPARAM *param,
break
;
}
length
=
res
->
length
();
CHARSET_INFO
*
cs
=
res
->
charset
();
int
diff
=
(
int
)
(
sort_field
->
length
-
length
);
if
(
diff
<
0
)
{
...
...
sql/key.cc
View file @
54abb8e9
...
...
@@ -192,8 +192,7 @@ int key_cmp(TABLE *table,const byte *key,uint idx,uint key_length)
if
(
!
(
key_part
->
key_type
&
(
FIELDFLAG_NUMBER
+
FIELDFLAG_BINARY
+
FIELDFLAG_PACK
)))
{
/* BAR TODO: I'm not sure this should be system_charset_info */
if
(
my_strnncoll
(
system_charset_info
,
if
(
my_strnncoll
(
key_part
->
field
->
charset
(),
(
const
uchar
*
)
key
,
length
,
(
const
uchar
*
)
table
->
record
[
0
]
+
key_part
->
offset
,
length
))
return
1
;
...
...
sql/opt_range.cc
View file @
54abb8e9
...
...
@@ -929,7 +929,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
{
bool
like_error
;
char
buff1
[
MAX_FIELD_WIDTH
],
*
min_str
,
*
max_str
;
String
tmp
(
buff1
,
sizeof
(
buff1
),
default_charset_info
),
*
res
;
String
tmp
(
buff1
,
sizeof
(
buff1
),
value
->
charset
()
),
*
res
;
uint
length
,
offset
,
min_length
,
max_length
;
if
(
!
field
->
optimize_range
(
param
->
real_keynr
[
key_part
->
key
]))
...
...
@@ -2793,7 +2793,7 @@ static void
print_key
(
KEY_PART
*
key_part
,
const
char
*
key
,
uint
used_length
)
{
char
buff
[
1024
];
String
tmp
(
buff
,
sizeof
(
buff
),
default_charset_info
);
String
tmp
(
buff
,
sizeof
(
buff
),
NULL
);
for
(
uint
length
=
0
;
length
<
used_length
;
...
...
sql/sql_delete.cc
View file @
54abb8e9
...
...
@@ -536,7 +536,7 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
table
->
file
->
info
(
HA_STATUS_AUTO
|
HA_STATUS_NO_LOCK
);
bzero
((
char
*
)
&
create_info
,
sizeof
(
create_info
));
create_info
.
auto_increment_value
=
table
->
file
->
auto_increment_value
;
create_info
.
table_charset
=
default_charset_info
;
create_info
.
table_charset
=
table
->
table_charset
;
db_type
table_type
=
table
->
db_type
;
strmov
(
path
,
table
->
path
);
...
...
@@ -580,7 +580,7 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
}
bzero
((
char
*
)
&
create_info
,
sizeof
(
create_info
));
create_info
.
table_charset
=
default_charset_info
;
create_info
.
table_charset
=
table_list
->
table
->
table_charset
;
*
fn_ext
(
path
)
=
0
;
// Remove the .frm extension
error
=
ha_create_table
(
path
,
&
create_info
,
1
)
?
-
1
:
0
;
...
...
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