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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
13d28097
Commit
13d28097
authored
Mar 13, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@build.mysql.com:/home/bk/mysql-4.1
into bar.mysql.r18.ru:/usr/home/bar/mysql-4.1
parents
a6e8de84
fa2dfa01
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
33 deletions
+26
-33
sql/field.cc
sql/field.cc
+1
-1
sql/filesort.cc
sql/filesort.cc
+12
-19
sql/item_func.cc
sql/item_func.cc
+2
-2
sql/item_strfunc.cc
sql/item_strfunc.cc
+5
-5
sql/sql_analyse.cc
sql/sql_analyse.cc
+4
-4
sql/sql_lex.cc
sql/sql_lex.cc
+2
-2
No files found.
sql/field.cc
View file @
13d28097
...
...
@@ -5163,7 +5163,7 @@ void Field_set::sql_type(String &res) const
bool
Field
::
eq_def
(
Field
*
field
)
{
if
(
real_type
()
!=
field
->
real_type
()
||
binary
()
!=
field
->
binary
()
||
if
(
real_type
()
!=
field
->
real_type
()
||
charset
()
!=
field
->
charset
()
||
pack_length
()
!=
field
->
pack_length
())
return
0
;
return
1
;
...
...
sql/filesort.cc
View file @
13d28097
...
...
@@ -507,7 +507,6 @@ static void make_sortkey(register SORTPARAM *param,
if
(
res
->
ptr
()
!=
(
char
*
)
to
)
memcpy
(
to
,
res
->
ptr
(),
length
);
bzero
((
char
*
)
to
+
length
,
diff
);
if
(
!
item
->
binary
())
my_tosort
(
cs
,
(
char
*
)
to
,
length
);
}
break
;
...
...
@@ -918,6 +917,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length, bool *multi_byte_charset)
{
reg2
uint
length
;
THD
*
thd
=
current_thd
;
CHARSET_INFO
*
cs
;
*
multi_byte_charset
=
0
;
length
=
0
;
...
...
@@ -926,22 +926,19 @@ sortlength(SORT_FIELD *sortorder, uint s_length, bool *multi_byte_charset)
sortorder
->
need_strxnfrm
=
0
;
if
(
sortorder
->
field
)
{
if
(
sortorder
->
field
->
type
()
==
FIELD_TYPE_BLOB
)
sortorder
->
length
=
thd
->
variables
.
max_sort_length
;
else
{
sortorder
->
length
=
sortorder
->
field
->
pack_length
();
if
(
!
sortorder
->
field
->
binary
())
{
CHARSET_INFO
*
cs
=
sortorder
->
field
->
charset
();
if
(
use_strnxfrm
(
cs
))
if
(
use_strnxfrm
((
cs
=
sortorder
->
field
->
charset
())))
{
sortorder
->
need_strxnfrm
=
1
;
*
multi_byte_charset
=
1
;
sortorder
->
length
=
sortorder
->
length
*
cs
->
strxfrm_multiply
;
}
}
}
if
(
sortorder
->
field
->
maybe_null
())
length
++
;
// Place for NULL marker
}
...
...
@@ -950,16 +947,12 @@ sortlength(SORT_FIELD *sortorder, uint s_length, bool *multi_byte_charset)
switch
((
sortorder
->
result_type
=
sortorder
->
item
->
result_type
()))
{
case
STRING_RESULT
:
sortorder
->
length
=
sortorder
->
item
->
max_length
;
if
(
!
sortorder
->
item
->
binary
())
{
CHARSET_INFO
*
cs
=
sortorder
->
item
->
charset
();
if
(
use_strnxfrm
(
cs
))
if
(
use_strnxfrm
((
cs
=
sortorder
->
item
->
charset
())))
{
sortorder
->
length
=
sortorder
->
length
*
cs
->
strxfrm_multiply
;
sortorder
->
need_strxnfrm
=
1
;
*
multi_byte_charset
=
1
;
}
}
break
;
case
INT_RESULT
:
#if SIZEOF_LONG_LONG > 4
...
...
sql/item_func.cc
View file @
13d28097
...
...
@@ -1024,7 +1024,7 @@ longlong Item_func_char_length::val_int()
return
0
;
/* purecov: inspected */
}
null_value
=
0
;
return
(
longlong
)
(
!
args
[
0
]
->
binary
())
?
res
->
numchars
()
:
res
->
length
();
return
(
longlong
)
res
->
numchars
();
}
longlong
Item_func_coercibility
::
val_int
()
...
...
@@ -1156,7 +1156,7 @@ longlong Item_func_ord::val_int()
null_value
=
0
;
if
(
!
res
->
length
())
return
0
;
#ifdef USE_MB
if
(
use_mb
(
res
->
charset
())
&&
!
args
[
0
]
->
binary
()
)
if
(
use_mb
(
res
->
charset
()))
{
register
const
char
*
str
=
res
->
ptr
();
register
uint32
n
=
0
,
l
=
my_ismbchar
(
res
->
charset
(),
str
,
str
+
res
->
length
());
...
...
sql/item_strfunc.cc
View file @
13d28097
...
...
@@ -650,7 +650,7 @@ String *Item_func_reverse::val_str(String *str)
ptr
=
(
char
*
)
res
->
ptr
();
end
=
ptr
+
res
->
length
();
#ifdef USE_MB
if
(
use_mb
(
res
->
charset
())
&&
!
binary
()
)
if
(
use_mb
(
res
->
charset
()))
{
String
tmpstr
;
tmpstr
.
copy
(
*
res
);
...
...
@@ -1015,7 +1015,7 @@ String *Item_func_substr_index::val_str(String *str)
return
&
empty_string
;
// Wrong parameters
#ifdef USE_MB
if
(
use_mb
(
res
->
charset
())
&&
!
binary
()
)
if
(
use_mb
(
res
->
charset
()))
{
const
char
*
ptr
=
res
->
ptr
();
const
char
*
strend
=
ptr
+
res
->
length
();
...
...
@@ -1169,7 +1169,7 @@ String *Item_func_rtrim::val_str(String *str)
{
char
chr
=
(
*
remove_str
)[
0
];
#ifdef USE_MB
if
(
use_mb
(
res
->
charset
())
&&
!
binary
()
)
if
(
use_mb
(
res
->
charset
()))
{
while
(
ptr
<
end
)
{
...
...
@@ -1186,7 +1186,7 @@ String *Item_func_rtrim::val_str(String *str)
{
const
char
*
r_ptr
=
remove_str
->
ptr
();
#ifdef USE_MB
if
(
use_mb
(
res
->
charset
())
&&
!
binary
()
)
if
(
use_mb
(
res
->
charset
()))
{
loop:
while
(
ptr
+
remove_length
<
end
)
...
...
@@ -1237,7 +1237,7 @@ String *Item_func_trim::val_str(String *str)
while
(
ptr
+
remove_length
<=
end
&&
!
memcmp
(
ptr
,
r_ptr
,
remove_length
))
ptr
+=
remove_length
;
#ifdef USE_MB
if
(
use_mb
(
res
->
charset
())
&&
!
binary
()
)
if
(
use_mb
(
res
->
charset
()))
{
char
*
p
=
ptr
;
register
uint32
l
;
...
...
sql/sql_analyse.cc
View file @
13d28097
...
...
@@ -732,7 +732,7 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
{
if
(
must_be_blob
)
{
if
(
item
->
binary
()
)
if
(
item
->
charset
()
==
&
my_charset_bin
)
answer
->
append
(
"TINYBLOB"
,
8
);
else
answer
->
append
(
"TINYTEXT"
,
8
);
...
...
@@ -750,21 +750,21 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
}
else
if
(
max_length
<
(
1L
<<
16
))
{
if
(
item
->
binary
()
)
if
(
item
->
charset
()
==
&
my_charset_bin
)
answer
->
append
(
"BLOB"
,
4
);
else
answer
->
append
(
"TEXT"
,
4
);
}
else
if
(
max_length
<
(
1L
<<
24
))
{
if
(
item
->
binary
()
)
if
(
item
->
charset
()
==
&
my_charset_bin
)
answer
->
append
(
"MEDIUMBLOB"
,
10
);
else
answer
->
append
(
"MEDIUMTEXT"
,
10
);
}
else
{
if
(
item
->
binary
()
)
if
(
item
->
charset
()
==
&
my_charset_bin
)
answer
->
append
(
"LONGBLOB"
,
8
);
else
answer
->
append
(
"LONGTEXT"
,
8
);
...
...
sql/sql_lex.cc
View file @
13d28097
...
...
@@ -359,8 +359,6 @@ static char *get_text(LEX *lex)
*
to
=
0
;
lex
->
yytoklen
=
(
uint
)
(
to
-
start
);
}
if
(
lex
->
convert_set
)
lex
->
convert_set
->
convert
((
char
*
)
start
,
lex
->
yytoklen
);
return
(
char
*
)
start
;
}
}
...
...
@@ -849,6 +847,8 @@ int yylex(void *arg, void *yythd)
break
;
}
yylval
->
lex_str
.
length
=
lex
->
yytoklen
;
if
(
lex
->
convert_set
)
lex
->
convert_set
->
convert
((
char
*
)
yylval
->
lex_str
.
str
,
lex
->
yytoklen
);
return
(
TEXT_STRING
);
case
STATE_COMMENT
:
// Comment
...
...
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