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
c1017541
Commit
c1017541
authored
Oct 30, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@work.mysql.com:/home/bk/mysql-4.1
into bar.mysql.r18.ru:/usr/home/bar/mysql-4.1.wrk
parents
8bb19fac
bca773e6
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
36 deletions
+44
-36
include/m_ctype.h
include/m_ctype.h
+1
-0
sql/field.cc
sql/field.cc
+5
-5
sql/field.h
sql/field.h
+17
-17
sql/filesort.cc
sql/filesort.cc
+1
-1
sql/item_func.cc
sql/item_func.cc
+2
-4
sql/item_timefunc.h
sql/item_timefunc.h
+11
-7
sql/sql_select.cc
sql/sql_select.cc
+2
-2
strings/ctype.c
strings/ctype.c
+5
-0
No files found.
include/m_ctype.h
View file @
c1017541
...
...
@@ -118,6 +118,7 @@ typedef struct charset_info_st
extern
CHARSET_INFO
*
my_charset_bin
;
extern
CHARSET_INFO
*
my_charset_latin1
;
extern
CHARSET_INFO
*
default_charset_info
;
extern
CHARSET_INFO
*
system_charset_info
;
extern
CHARSET_INFO
*
all_charsets
[
256
];
...
...
sql/field.cc
View file @
c1017541
...
...
@@ -5283,19 +5283,19 @@ Field *make_field(char *ptr, uint32 field_length,
unireg_check
,
field_name
,
table
);
case
FIELD_TYPE_DATE
:
return
new
Field_date
(
ptr
,
null_pos
,
null_bit
,
unireg_check
,
field_name
,
table
);
unireg_check
,
field_name
,
table
,
field_charset
);
case
FIELD_TYPE_NEWDATE
:
return
new
Field_newdate
(
ptr
,
null_pos
,
null_bit
,
unireg_check
,
field_name
,
table
);
unireg_check
,
field_name
,
table
,
field_charset
);
case
FIELD_TYPE_TIME
:
return
new
Field_time
(
ptr
,
null_pos
,
null_bit
,
unireg_check
,
field_name
,
table
);
unireg_check
,
field_name
,
table
,
field_charset
);
case
FIELD_TYPE_DATETIME
:
return
new
Field_datetime
(
ptr
,
null_pos
,
null_bit
,
unireg_check
,
field_name
,
table
);
unireg_check
,
field_name
,
table
,
field_charset
);
case
FIELD_TYPE_NULL
:
default:
// Impossible (Wrong version)
return
new
Field_null
(
ptr
,
field_length
,
unireg_check
,
field_name
,
table
);
return
new
Field_null
(
ptr
,
field_length
,
unireg_check
,
field_name
,
table
,
field_charset
);
}
return
0
;
// Impossible (Wrong version)
}
...
...
sql/field.h
View file @
c1017541
...
...
@@ -528,9 +528,9 @@ class Field_null :public Field_str {
public:
Field_null
(
char
*
ptr_arg
,
uint32
len_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
(
ptr_arg
,
len_arg
,
null
,
1
,
unireg_check_arg
,
field_name_arg
,
table_arg
,
default_charset_info
)
unireg_check_arg
,
field_name_arg
,
table_arg
,
cs
)
{}
enum_field_types
type
()
const
{
return
FIELD_TYPE_NULL
;}
int
store
(
const
char
*
to
,
uint
length
,
CHARSET_INFO
*
cs
)
{
null
[
0
]
=
1
;
return
0
;
}
...
...
@@ -544,7 +544,7 @@ public:
int
cmp
(
const
char
*
a
,
const
char
*
b
)
{
return
0
;}
void
sort_string
(
char
*
buff
,
uint
length
)
{}
uint32
pack_length
()
const
{
return
0
;
}
void
sql_type
(
String
&
str
)
const
{
str
.
set
(
"null"
,
4
,
default_charset_info
);
}
void
sql_type
(
String
&
str
)
const
{
str
.
set
(
"null"
,
4
,
my_thd_charset
);
}
uint
size_of
()
const
{
return
sizeof
(
*
this
);
}
};
...
...
@@ -615,14 +615,14 @@ class Field_date :public Field_str {
public:
Field_date
(
char
*
ptr_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
(
ptr_arg
,
10
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
table_arg
,
default_charset_info
)
unireg_check_arg
,
field_name_arg
,
table_arg
,
cs
)
{}
Field_date
(
bool
maybe_null_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
((
char
*
)
0
,
10
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
0
,
NONE
,
field_name_arg
,
table_arg
,
default_charset_info
)
{}
NONE
,
field_name_arg
,
table_arg
,
cs
)
{}
enum_field_types
type
()
const
{
return
FIELD_TYPE_DATE
;}
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_ULONG_INT
;
}
enum
Item_result
cmp_type
()
const
{
return
INT_RESULT
;
}
...
...
@@ -645,9 +645,9 @@ class Field_newdate :public Field_str {
public:
Field_newdate
(
char
*
ptr_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
(
ptr_arg
,
10
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
table_arg
,
default_charset_info
)
unireg_check_arg
,
field_name_arg
,
table_arg
,
cs
)
{}
enum_field_types
type
()
const
{
return
FIELD_TYPE_DATE
;}
enum_field_types
real_type
()
const
{
return
FIELD_TYPE_NEWDATE
;
}
...
...
@@ -676,14 +676,14 @@ class Field_time :public Field_str {
public:
Field_time
(
char
*
ptr_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
(
ptr_arg
,
8
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
table_arg
,
default_charset_info
)
unireg_check_arg
,
field_name_arg
,
table_arg
,
cs
)
{}
Field_time
(
bool
maybe_null_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
((
char
*
)
0
,
8
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
0
,
NONE
,
field_name_arg
,
table_arg
,
default_charset_info
)
{}
NONE
,
field_name_arg
,
table_arg
,
cs
)
{}
enum_field_types
type
()
const
{
return
FIELD_TYPE_TIME
;}
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_INT24
;
}
enum
Item_result
cmp_type
()
const
{
return
INT_RESULT
;
}
...
...
@@ -708,14 +708,14 @@ class Field_datetime :public Field_str {
public:
Field_datetime
(
char
*
ptr_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
(
ptr_arg
,
19
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
table_arg
,
default_charset_info
)
unireg_check_arg
,
field_name_arg
,
table_arg
,
cs
)
{}
Field_datetime
(
bool
maybe_null_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
)
struct
st_table
*
table_arg
,
CHARSET_INFO
*
cs
)
:
Field_str
((
char
*
)
0
,
19
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
0
,
NONE
,
field_name_arg
,
table_arg
,
default_charset_info
)
{}
NONE
,
field_name_arg
,
table_arg
,
cs
)
{}
enum_field_types
type
()
const
{
return
FIELD_TYPE_DATETIME
;}
#ifdef HAVE_LONG_LONG
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_ULONGLONG
;
}
...
...
sql/filesort.cc
View file @
c1017541
...
...
@@ -950,7 +950,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
#ifdef USE_STRCOLL
if
(
!
sortorder
->
item
->
binary
())
{
CHARSET_INFO
*
cs
=
sortorder
->
item
->
str_value
.
charset
();
CHARSET_INFO
*
cs
=
sortorder
->
item
->
charset
();
if
(
use_strnxfrm
(
cs
))
sortorder
->
length
=
sortorder
->
length
*
cs
->
strxfrm_multiply
;
}
...
...
sql/item_func.cc
View file @
c1017541
...
...
@@ -228,11 +228,9 @@ Field *Item_func::tmp_table_field(TABLE *t_arg)
break
;
case
STRING_RESULT
:
if
(
max_length
>
255
)
res
=
new
Field_blob
(
max_length
,
maybe_null
,
name
,
t_arg
,
str_value
.
charset
());
res
=
new
Field_blob
(
max_length
,
maybe_null
,
name
,
t_arg
,
charset
());
else
res
=
new
Field_string
(
max_length
,
maybe_null
,
name
,
t_arg
,
str_value
.
charset
());
res
=
new
Field_string
(
max_length
,
maybe_null
,
name
,
t_arg
,
charset
());
break
;
}
return
res
;
...
...
sql/item_timefunc.h
View file @
c1017541
...
...
@@ -243,7 +243,7 @@ public:
}
Field
*
tmp_table_field
(
TABLE
*
t_arg
)
{
return
(
!
t_arg
)
?
result_field
:
new
Field_date
(
maybe_null
,
name
,
t_arg
);
return
(
!
t_arg
)
?
result_field
:
new
Field_date
(
maybe_null
,
name
,
t_arg
,
my_thd_charset
);
}
};
...
...
@@ -261,7 +261,7 @@ public:
Field
*
tmp_table_field
(
TABLE
*
t_arg
)
{
return
(
!
t_arg
)
?
result_field
:
new
Field_datetime
(
maybe_null
,
name
,
t_arg
);
t_arg
,
my_thd_charset
);
}
};
...
...
@@ -287,7 +287,8 @@ public:
}
Field
*
tmp_table_field
(
TABLE
*
t_arg
)
{
return
(
!
t_arg
)
?
result_field
:
new
Field_time
(
maybe_null
,
name
,
t_arg
);
return
(
!
t_arg
)
?
result_field
:
new
Field_time
(
maybe_null
,
name
,
t_arg
,
my_thd_charset
);
}
};
...
...
@@ -379,7 +380,8 @@ public:
}
Field
*
tmp_table_field
(
TABLE
*
t_arg
)
{
return
(
!
t_arg
)
?
result_field
:
new
Field_time
(
maybe_null
,
name
,
t_arg
);
return
(
!
t_arg
)
?
result_field
:
new
Field_time
(
maybe_null
,
name
,
t_arg
,
my_thd_charset
);
}
};
...
...
@@ -443,7 +445,8 @@ public:
}
Field
*
tmp_table_field
(
TABLE
*
t_arg
)
{
return
(
!
t_arg
)
?
result_field
:
new
Field_date
(
maybe_null
,
name
,
t_arg
);
return
(
!
t_arg
)
?
result_field
:
new
Field_date
(
maybe_null
,
name
,
t_arg
,
my_thd_charset
);
}
};
...
...
@@ -458,7 +461,8 @@ public:
}
Field
*
tmp_table_field
(
TABLE
*
t_arg
)
{
return
(
!
t_arg
)
?
result_field
:
new
Field_time
(
maybe_null
,
name
,
t_arg
);
return
(
!
t_arg
)
?
result_field
:
new
Field_time
(
maybe_null
,
name
,
t_arg
,
my_thd_charset
);
}
};
...
...
@@ -474,6 +478,6 @@ public:
Field
*
tmp_table_field
(
TABLE
*
t_arg
)
{
return
(
!
t_arg
)
?
result_field
:
new
Field_datetime
(
maybe_null
,
name
,
t_arg
);
t_arg
,
my_thd_charset
);
}
};
sql/sql_select.cc
View file @
c1017541
...
...
@@ -3624,9 +3624,9 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case
STRING_RESULT
:
if
(
item_sum
->
max_length
>
255
)
return
new
Field_blob
(
item_sum
->
max_length
,
maybe_null
,
item
->
name
,
table
,
item
->
str_value
.
charset
());
item
->
name
,
table
,
item
->
charset
());
return
new
Field_string
(
item_sum
->
max_length
,
maybe_null
,
item
->
name
,
table
,
item
->
str_value
.
charset
());
item
->
name
,
table
,
item
->
charset
());
}
}
thd
->
fatal_error
=
1
;
...
...
strings/ctype.c
View file @
c1017541
...
...
@@ -20,6 +20,10 @@
#include <m_string.h>
#endif
#ifndef HAVE_CHARSET_latin1
#define HAVE_CHARSET_latin1
#endif
#if defined(HAVE_CHARSET_latin1)||defined(HAVE_CHARSET_latin1_de)||\
defined(HAVE_CHARSET_danish)||defined(HAVE_CHARSET_german1)
...
...
@@ -3651,6 +3655,7 @@ static CHARSET_INFO compiled_charsets[] = {
};
CHARSET_INFO
*
my_charset_latin1
=
&
compiled_charsets
[
0
];
CHARSET_INFO
*
all_charsets
[
256
];
CHARSET_INFO
*
default_charset_info
=
&
compiled_charsets
[
0
];
CHARSET_INFO
*
system_charset_info
=
&
compiled_charsets
[
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