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
58ee682e
Commit
58ee682e
authored
Sep 26, 2006
by
mikael/pappa@dator5.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#18198
Review comments
parent
de9001d3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
108 deletions
+124
-108
sql/item.h
sql/item.h
+35
-18
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+14
-15
sql/item_func.h
sql/item_func.h
+30
-30
sql/item_strfunc.h
sql/item_strfunc.h
+14
-14
sql/item_timefunc.h
sql/item_timefunc.h
+30
-30
sql/item_xmlfunc.h
sql/item_xmlfunc.h
+1
-1
No files found.
sql/item.h
View file @
58ee682e
...
@@ -846,8 +846,31 @@ public:
...
@@ -846,8 +846,31 @@ public:
allowed in a partition function then it is very important to consider
allowed in a partition function then it is very important to consider
whether this should be inherited to the new class. If not the function
whether this should be inherited to the new class. If not the function
below should be defined in the new Item class.
below should be defined in the new Item class.
*/
virtual
bool
check_partition_func_processor
(
byte
*
bool_arg
)
{
return
FALSE
;
}
The general behaviour is that most integer functions are allowed.
If the partition function contains any multi-byte collations then
the function check_part_func_fields will report an error on the
partition function independent of what functions are used. So the
only character sets allowed are single character collation and
even for those only a limited set of functions are allowed. The
problem with multi-byte collations is that almost every string
function has the ability to change things such that two strings
that are equal will not be equal after manipulated by a string
function. E.g. two strings one contains a double s, there is a
special german character that is equal to two s. Now assume a
string function removes one character at this place, then in
one the double s will be removed and in the other there will
still be one s remaining and the strings are no longer equal
and thus the partition function will not sort equal strings into
the same partitions.
So the check if a partition function is valid is two steps. First
check that the field types are valid, next check that the partition
function is valid. The current set of partition functions valid
assumes that there are no multi-byte collations amongst the partition
fields.
*/
virtual
bool
check_partition_func_processor
(
byte
*
bool_arg
)
{
return
TRUE
;}
virtual
bool
subst_argument_checker
(
byte
**
arg
)
virtual
bool
subst_argument_checker
(
byte
**
arg
)
{
{
if
(
*
arg
)
if
(
*
arg
)
...
@@ -1348,7 +1371,7 @@ public:
...
@@ -1348,7 +1371,7 @@ public:
bool
collect_item_field_processor
(
byte
*
arg
);
bool
collect_item_field_processor
(
byte
*
arg
);
bool
find_item_in_field_list_processor
(
byte
*
arg
);
bool
find_item_in_field_list_processor
(
byte
*
arg
);
bool
register_field_in_read_map
(
byte
*
arg
);
bool
register_field_in_read_map
(
byte
*
arg
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
void
cleanup
();
void
cleanup
();
bool
result_as_longlong
()
bool
result_as_longlong
()
{
{
...
@@ -1397,7 +1420,7 @@ public:
...
@@ -1397,7 +1420,7 @@ public:
bool
is_null
()
{
return
1
;
}
bool
is_null
()
{
return
1
;
}
void
print
(
String
*
str
)
{
str
->
append
(
STRING_WITH_LEN
(
"NULL"
));
}
void
print
(
String
*
str
)
{
str
->
append
(
STRING_WITH_LEN
(
"NULL"
));
}
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
class
Item_null_result
:
public
Item_null
class
Item_null_result
:
public
Item_null
...
@@ -1410,8 +1433,7 @@ public:
...
@@ -1410,8 +1433,7 @@ public:
{
{
save_in_field
(
result_field
,
no_conversions
);
save_in_field
(
result_field
,
no_conversions
);
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
TRUE
;}
{
*
(
int
*
)
int_arg
=
0
;
return
FALSE
;
}
};
};
/* Item represents one placeholder ('?') of prepared statement */
/* Item represents one placeholder ('?') of prepared statement */
...
@@ -1702,8 +1724,7 @@ public:
...
@@ -1702,8 +1724,7 @@ public:
{}
{}
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
TRUE
;}
{
*
(
int
*
)
int_arg
=
0
;
return
FALSE
;
}
};
};
...
@@ -1781,7 +1802,7 @@ public:
...
@@ -1781,7 +1802,7 @@ public:
void
print
(
String
*
str
);
void
print
(
String
*
str
);
// to prevent drop fixed flag (no need parent cleanup call)
// to prevent drop fixed flag (no need parent cleanup call)
void
cleanup
()
{}
void
cleanup
()
{}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -1796,8 +1817,7 @@ public:
...
@@ -1796,8 +1817,7 @@ public:
{}
{}
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
TRUE
;}
{
*
(
int
*
)
int_arg
=
0
;
return
FALSE
;
}
};
};
...
@@ -1810,8 +1830,7 @@ public:
...
@@ -1810,8 +1830,7 @@ public:
&
my_charset_bin
)
&
my_charset_bin
)
{
max_length
=
19
;}
{
max_length
=
19
;}
enum_field_types
field_type
()
const
{
return
MYSQL_TYPE_DATETIME
;
}
enum_field_types
field_type
()
const
{
return
MYSQL_TYPE_DATETIME
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
TRUE
;}
{
*
(
int
*
)
int_arg
=
0
;
return
FALSE
;
}
};
};
class
Item_empty_string
:
public
Item_string
class
Item_empty_string
:
public
Item_string
...
@@ -1834,8 +1853,7 @@ public:
...
@@ -1834,8 +1853,7 @@ public:
unsigned_flag
=
1
;
unsigned_flag
=
1
;
}
}
enum_field_types
field_type
()
const
{
return
int_field_type
;
}
enum_field_types
field_type
()
const
{
return
int_field_type
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
TRUE
;}
{
*
(
int
*
)
int_arg
=
0
;
return
FALSE
;
}
};
};
...
@@ -1859,7 +1877,7 @@ public:
...
@@ -1859,7 +1877,7 @@ public:
void
cleanup
()
{}
void
cleanup
()
{}
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
virtual
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
virtual
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -2086,8 +2104,7 @@ public:
...
@@ -2086,8 +2104,7 @@ public:
}
}
Item
*
new_item
();
Item
*
new_item
();
virtual
Item
*
real_item
()
{
return
ref
;
}
virtual
Item
*
real_item
()
{
return
ref
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
TRUE
;}
{
*
(
int
*
)
int_arg
=
0
;
return
FALSE
;
}
};
};
#ifdef MYSQL_SERVER
#ifdef MYSQL_SERVER
...
...
sql/item_cmpfunc.h
View file @
58ee682e
...
@@ -240,7 +240,7 @@ public:
...
@@ -240,7 +240,7 @@ public:
}
}
Item
*
neg_transformer
(
THD
*
thd
);
Item
*
neg_transformer
(
THD
*
thd
);
virtual
Item
*
negated_item
();
virtual
Item
*
negated_item
();
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
subst_argument_checker
(
byte
**
arg
)
{
return
TRUE
;
}
bool
subst_argument_checker
(
byte
**
arg
)
{
return
TRUE
;
}
};
};
...
@@ -252,7 +252,7 @@ public:
...
@@ -252,7 +252,7 @@ public:
enum
Functype
functype
()
const
{
return
NOT_FUNC
;
}
enum
Functype
functype
()
const
{
return
NOT_FUNC
;
}
const
char
*
func_name
()
const
{
return
"not"
;
}
const
char
*
func_name
()
const
{
return
"not"
;
}
Item
*
neg_transformer
(
THD
*
thd
);
Item
*
neg_transformer
(
THD
*
thd
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_maxmin_subselect
;
class
Item_maxmin_subselect
;
...
@@ -469,7 +469,7 @@ public:
...
@@ -469,7 +469,7 @@ public:
bool
is_bool_func
()
{
return
1
;
}
bool
is_bool_func
()
{
return
1
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
uint
decimal_precision
()
const
{
return
1
;
}
uint
decimal_precision
()
const
{
return
1
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -481,7 +481,7 @@ public:
...
@@ -481,7 +481,7 @@ public:
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_NONE
;
}
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_NONE
;
}
const
char
*
func_name
()
const
{
return
"strcmp"
;
}
const
char
*
func_name
()
const
{
return
"strcmp"
;
}
void
print
(
String
*
str
)
{
Item_func
::
print
(
str
);
}
void
print
(
String
*
str
)
{
Item_func
::
print
(
str
);
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -544,7 +544,7 @@ public:
...
@@ -544,7 +544,7 @@ public:
const
char
*
func_name
()
const
{
return
"ifnull"
;
}
const
char
*
func_name
()
const
{
return
"ifnull"
;
}
Field
*
tmp_table_field
(
TABLE
*
table
);
Field
*
tmp_table_field
(
TABLE
*
table
);
uint
decimal_precision
()
const
;
uint
decimal_precision
()
const
;
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -585,7 +585,7 @@ public:
...
@@ -585,7 +585,7 @@ public:
void
print
(
String
*
str
)
{
Item_func
::
print
(
str
);
}
void
print
(
String
*
str
)
{
Item_func
::
print
(
str
);
}
table_map
not_null_tables
()
const
{
return
0
;
}
table_map
not_null_tables
()
const
{
return
0
;
}
bool
is_null
();
bool
is_null
();
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -628,7 +628,7 @@ public:
...
@@ -628,7 +628,7 @@ public:
void
print
(
String
*
str
);
void
print
(
String
*
str
);
Item
*
find_item
(
String
*
str
);
Item
*
find_item
(
String
*
str
);
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -979,7 +979,7 @@ public:
...
@@ -979,7 +979,7 @@ public:
bool
nulls_in_row
();
bool
nulls_in_row
();
bool
is_bool_func
()
{
return
1
;
}
bool
is_bool_func
()
{
return
1
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
/* Functions used by where clause */
/* Functions used by where clause */
...
@@ -1021,7 +1021,7 @@ public:
...
@@ -1021,7 +1021,7 @@ public:
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_NULL
;
}
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_NULL
;
}
Item
*
neg_transformer
(
THD
*
thd
);
Item
*
neg_transformer
(
THD
*
thd
);
CHARSET_INFO
*
compare_collation
()
{
return
args
[
0
]
->
collation
.
collation
;
}
CHARSET_INFO
*
compare_collation
()
{
return
args
[
0
]
->
collation
.
collation
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
/* Functions used by HAVING for rewriting IN subquery */
/* Functions used by HAVING for rewriting IN subquery */
...
@@ -1043,8 +1043,7 @@ public:
...
@@ -1043,8 +1043,7 @@ public:
*/
*/
table_map
used_tables
()
const
table_map
used_tables
()
const
{
return
used_tables_cache
|
RAND_TABLE_BIT
;
}
{
return
used_tables_cache
|
RAND_TABLE_BIT
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
TRUE
;}
{
*
(
int
*
)
int_arg
=
0
;
return
FALSE
;
}
};
};
...
@@ -1067,7 +1066,7 @@ public:
...
@@ -1067,7 +1066,7 @@ public:
void
print
(
String
*
str
);
void
print
(
String
*
str
);
CHARSET_INFO
*
compare_collation
()
{
return
args
[
0
]
->
collation
.
collation
;
}
CHARSET_INFO
*
compare_collation
()
{
return
args
[
0
]
->
collation
.
collation
;
}
void
top_level_item
()
{
abort_on_null
=
1
;
}
void
top_level_item
()
{
abort_on_null
=
1
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -1106,7 +1105,7 @@ public:
...
@@ -1106,7 +1105,7 @@ public:
const
char
*
func_name
()
const
{
return
"like"
;
}
const
char
*
func_name
()
const
{
return
"like"
;
}
bool
fix_fields
(
THD
*
thd
,
Item
**
ref
);
bool
fix_fields
(
THD
*
thd
,
Item
**
ref
);
void
cleanup
();
void
cleanup
();
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
#ifdef USE_REGEX
#ifdef USE_REGEX
...
@@ -1129,7 +1128,7 @@ public:
...
@@ -1129,7 +1128,7 @@ public:
const
char
*
func_name
()
const
{
return
"regexp"
;
}
const
char
*
func_name
()
const
{
return
"regexp"
;
}
void
print
(
String
*
str
)
{
print_op
(
str
);
}
void
print
(
String
*
str
)
{
print_op
(
str
);
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp_collation
.
collation
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
#else
#else
...
@@ -1186,7 +1185,7 @@ public:
...
@@ -1186,7 +1185,7 @@ public:
Item
*
transform
(
Item_transformer
transformer
,
byte
*
arg
);
Item
*
transform
(
Item_transformer
transformer
,
byte
*
arg
);
void
traverse_cond
(
Cond_traverser
,
void
*
arg
,
traverse_order
order
);
void
traverse_cond
(
Cond_traverser
,
void
*
arg
,
traverse_order
order
);
void
neg_arguments
(
THD
*
thd
);
void
neg_arguments
(
THD
*
thd
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
subst_argument_checker
(
byte
**
arg
)
{
return
TRUE
;
}
bool
subst_argument_checker
(
byte
**
arg
)
{
return
TRUE
;
}
Item
*
compile
(
Item_analyzer
analyzer
,
byte
**
arg_p
,
Item
*
compile
(
Item_analyzer
analyzer
,
byte
**
arg_p
,
Item_transformer
transformer
,
byte
*
arg_t
);
Item_transformer
transformer
,
byte
*
arg_t
);
...
...
sql/item_func.h
View file @
58ee682e
...
@@ -254,7 +254,7 @@ public:
...
@@ -254,7 +254,7 @@ public:
void
fix_num_length_and_dec
();
void
fix_num_length_and_dec
();
void
find_num_type
();
void
find_num_type
();
String
*
str_op
(
String
*
str
)
{
DBUG_ASSERT
(
0
);
return
0
;
}
String
*
str_op
(
String
*
str
)
{
DBUG_ASSERT
(
0
);
return
0
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -267,7 +267,7 @@ class Item_num_op :public Item_func_numhybrid
...
@@ -267,7 +267,7 @@ class Item_num_op :public Item_func_numhybrid
void
print
(
String
*
str
)
{
print_op
(
str
);
}
void
print
(
String
*
str
)
{
print_op
(
str
);
}
void
find_num_type
();
void
find_num_type
();
String
*
str_op
(
String
*
str
)
{
DBUG_ASSERT
(
0
);
return
0
;
}
String
*
str_op
(
String
*
str
)
{
DBUG_ASSERT
(
0
);
return
0
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -318,7 +318,7 @@ public:
...
@@ -318,7 +318,7 @@ public:
{
max_length
=
args
[
0
]
->
max_length
;
unsigned_flag
=
0
;
}
{
max_length
=
args
[
0
]
->
max_length
;
unsigned_flag
=
0
;
}
void
print
(
String
*
str
);
void
print
(
String
*
str
);
uint
decimal_precision
()
const
{
return
args
[
0
]
->
decimal_precision
();
}
uint
decimal_precision
()
const
{
return
args
[
0
]
->
decimal_precision
();
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -352,7 +352,7 @@ public:
...
@@ -352,7 +352,7 @@ public:
void
fix_length_and_dec
()
{};
void
fix_length_and_dec
()
{};
const
char
*
func_name
()
const
{
return
"decimal_typecast"
;
}
const
char
*
func_name
()
const
{
return
"decimal_typecast"
;
}
void
print
(
String
*
);
void
print
(
String
*
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -421,7 +421,7 @@ public:
...
@@ -421,7 +421,7 @@ public:
const
char
*
func_name
()
const
{
return
"DIV"
;
}
const
char
*
func_name
()
const
{
return
"DIV"
;
}
void
fix_length_and_dec
();
void
fix_length_and_dec
();
void
print
(
String
*
str
)
{
print_op
(
str
);
}
void
print
(
String
*
str
)
{
print_op
(
str
);
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -494,7 +494,7 @@ public:
...
@@ -494,7 +494,7 @@ public:
Item_func_exp
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_exp
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"exp"
;
}
const
char
*
func_name
()
const
{
return
"exp"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -504,7 +504,7 @@ public:
...
@@ -504,7 +504,7 @@ public:
Item_func_ln
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_ln
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"ln"
;
}
const
char
*
func_name
()
const
{
return
"ln"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -515,7 +515,7 @@ public:
...
@@ -515,7 +515,7 @@ public:
Item_func_log
(
Item
*
a
,
Item
*
b
)
:
Item_dec_func
(
a
,
b
)
{}
Item_func_log
(
Item
*
a
,
Item
*
b
)
:
Item_dec_func
(
a
,
b
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"log"
;
}
const
char
*
func_name
()
const
{
return
"log"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -525,7 +525,7 @@ public:
...
@@ -525,7 +525,7 @@ public:
Item_func_log2
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_log2
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"log2"
;
}
const
char
*
func_name
()
const
{
return
"log2"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -535,7 +535,7 @@ public:
...
@@ -535,7 +535,7 @@ public:
Item_func_log10
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_log10
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"log10"
;
}
const
char
*
func_name
()
const
{
return
"log10"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -545,7 +545,7 @@ public:
...
@@ -545,7 +545,7 @@ public:
Item_func_sqrt
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_sqrt
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"sqrt"
;
}
const
char
*
func_name
()
const
{
return
"sqrt"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -555,7 +555,7 @@ public:
...
@@ -555,7 +555,7 @@ public:
Item_func_pow
(
Item
*
a
,
Item
*
b
)
:
Item_dec_func
(
a
,
b
)
{}
Item_func_pow
(
Item
*
a
,
Item
*
b
)
:
Item_dec_func
(
a
,
b
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"pow"
;
}
const
char
*
func_name
()
const
{
return
"pow"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -565,7 +565,7 @@ public:
...
@@ -565,7 +565,7 @@ public:
Item_func_acos
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_acos
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"acos"
;
}
const
char
*
func_name
()
const
{
return
"acos"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_asin
:
public
Item_dec_func
class
Item_func_asin
:
public
Item_dec_func
...
@@ -574,7 +574,7 @@ public:
...
@@ -574,7 +574,7 @@ public:
Item_func_asin
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_asin
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"asin"
;
}
const
char
*
func_name
()
const
{
return
"asin"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_atan
:
public
Item_dec_func
class
Item_func_atan
:
public
Item_dec_func
...
@@ -584,7 +584,7 @@ public:
...
@@ -584,7 +584,7 @@ public:
Item_func_atan
(
Item
*
a
,
Item
*
b
)
:
Item_dec_func
(
a
,
b
)
{}
Item_func_atan
(
Item
*
a
,
Item
*
b
)
:
Item_dec_func
(
a
,
b
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"atan"
;
}
const
char
*
func_name
()
const
{
return
"atan"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_cos
:
public
Item_dec_func
class
Item_func_cos
:
public
Item_dec_func
...
@@ -593,7 +593,7 @@ public:
...
@@ -593,7 +593,7 @@ public:
Item_func_cos
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_cos
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"cos"
;
}
const
char
*
func_name
()
const
{
return
"cos"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_sin
:
public
Item_dec_func
class
Item_func_sin
:
public
Item_dec_func
...
@@ -602,7 +602,7 @@ public:
...
@@ -602,7 +602,7 @@ public:
Item_func_sin
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_sin
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"sin"
;
}
const
char
*
func_name
()
const
{
return
"sin"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_tan
:
public
Item_dec_func
class
Item_func_tan
:
public
Item_dec_func
...
@@ -611,7 +611,7 @@ public:
...
@@ -611,7 +611,7 @@ public:
Item_func_tan
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
Item_func_tan
(
Item
*
a
)
:
Item_dec_func
(
a
)
{}
double
val_real
();
double
val_real
();
const
char
*
func_name
()
const
{
return
"tan"
;
}
const
char
*
func_name
()
const
{
return
"tan"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_integer
:
public
Item_int_func
class
Item_func_integer
:
public
Item_int_func
...
@@ -688,7 +688,7 @@ public:
...
@@ -688,7 +688,7 @@ public:
Item_func_sign
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
Item_func_sign
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
const
char
*
func_name
()
const
{
return
"sign"
;
}
const
char
*
func_name
()
const
{
return
"sign"
;
}
longlong
val_int
();
longlong
val_int
();
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -703,7 +703,7 @@ public:
...
@@ -703,7 +703,7 @@ public:
const
char
*
func_name
()
const
{
return
name
;
}
const
char
*
func_name
()
const
{
return
name
;
}
void
fix_length_and_dec
()
void
fix_length_and_dec
()
{
decimals
=
NOT_FIXED_DEC
;
max_length
=
float_length
(
decimals
);
}
{
decimals
=
NOT_FIXED_DEC
;
max_length
=
float_length
(
decimals
);
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -721,7 +721,7 @@ public:
...
@@ -721,7 +721,7 @@ public:
my_decimal
*
val_decimal
(
my_decimal
*
);
my_decimal
*
val_decimal
(
my_decimal
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
enum
Item_result
result_type
()
const
{
return
cmp_type
;
}
enum
Item_result
result_type
()
const
{
return
cmp_type
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_min
:
public
Item_func_min_max
class
Item_func_min
:
public
Item_func_min_max
...
@@ -747,7 +747,7 @@ public:
...
@@ -747,7 +747,7 @@ public:
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"length"
;
}
const
char
*
func_name
()
const
{
return
"length"
;
}
void
fix_length_and_dec
()
{
max_length
=
10
;
}
void
fix_length_and_dec
()
{
max_length
=
10
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_bit_length
:
public
Item_func_length
class
Item_func_bit_length
:
public
Item_func_length
...
@@ -767,7 +767,7 @@ public:
...
@@ -767,7 +767,7 @@ public:
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"char_length"
;
}
const
char
*
func_name
()
const
{
return
"char_length"
;
}
void
fix_length_and_dec
()
{
max_length
=
10
;
}
void
fix_length_and_dec
()
{
max_length
=
10
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_coercibility
:
public
Item_int_func
class
Item_func_coercibility
:
public
Item_int_func
...
@@ -791,7 +791,7 @@ public:
...
@@ -791,7 +791,7 @@ public:
longlong
val_int
();
longlong
val_int
();
void
fix_length_and_dec
();
void
fix_length_and_dec
();
void
print
(
String
*
str
);
void
print
(
String
*
str
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -816,7 +816,7 @@ public:
...
@@ -816,7 +816,7 @@ public:
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"ascii"
;
}
const
char
*
func_name
()
const
{
return
"ascii"
;
}
void
fix_length_and_dec
()
{
max_length
=
3
;
}
void
fix_length_and_dec
()
{
max_length
=
3
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_ord
:
public
Item_int_func
class
Item_func_ord
:
public
Item_int_func
...
@@ -826,7 +826,7 @@ public:
...
@@ -826,7 +826,7 @@ public:
Item_func_ord
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
Item_func_ord
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"ord"
;
}
const
char
*
func_name
()
const
{
return
"ord"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_find_in_set
:
public
Item_int_func
class
Item_func_find_in_set
:
public
Item_int_func
...
@@ -840,7 +840,7 @@ public:
...
@@ -840,7 +840,7 @@ public:
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"find_in_set"
;
}
const
char
*
func_name
()
const
{
return
"find_in_set"
;
}
void
fix_length_and_dec
();
void
fix_length_and_dec
();
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */
/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */
...
@@ -852,7 +852,7 @@ public:
...
@@ -852,7 +852,7 @@ public:
Item_func_bit
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
Item_func_bit
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
void
fix_length_and_dec
()
{
unsigned_flag
=
1
;
}
void
fix_length_and_dec
()
{
unsigned_flag
=
1
;
}
void
print
(
String
*
str
)
{
print_op
(
str
);
}
void
print
(
String
*
str
)
{
print_op
(
str
);
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_bit_or
:
public
Item_func_bit
class
Item_func_bit_or
:
public
Item_func_bit
...
@@ -878,7 +878,7 @@ public:
...
@@ -878,7 +878,7 @@ public:
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"bit_count"
;
}
const
char
*
func_name
()
const
{
return
"bit_count"
;
}
void
fix_length_and_dec
()
{
max_length
=
2
;
}
void
fix_length_and_dec
()
{
max_length
=
2
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_shift_left
:
public
Item_func_bit
class
Item_func_shift_left
:
public
Item_func_bit
...
@@ -1318,7 +1318,7 @@ public:
...
@@ -1318,7 +1318,7 @@ public:
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"inet_aton"
;
}
const
char
*
func_name
()
const
{
return
"inet_aton"
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
21
;
maybe_null
=
1
;}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
21
;
maybe_null
=
1
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
...
sql/item_strfunc.h
View file @
58ee682e
...
@@ -50,7 +50,7 @@ public:
...
@@ -50,7 +50,7 @@ public:
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"md5"
;
}
const
char
*
func_name
()
const
{
return
"md5"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -94,7 +94,7 @@ public:
...
@@ -94,7 +94,7 @@ public:
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"concat"
;
}
const
char
*
func_name
()
const
{
return
"concat"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_concat_ws
:
public
Item_str_func
class
Item_func_concat_ws
:
public
Item_str_func
...
@@ -116,7 +116,7 @@ public:
...
@@ -116,7 +116,7 @@ public:
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"reverse"
;
}
const
char
*
func_name
()
const
{
return
"reverse"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -154,7 +154,7 @@ protected:
...
@@ -154,7 +154,7 @@ protected:
public:
public:
Item_str_conv
(
Item
*
item
)
:
Item_str_func
(
item
)
{}
Item_str_conv
(
Item
*
item
)
:
Item_str_func
(
item
)
{}
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -457,7 +457,7 @@ public:
...
@@ -457,7 +457,7 @@ public:
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"soundex"
;
}
const
char
*
func_name
()
const
{
return
"soundex"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -558,7 +558,7 @@ public:
...
@@ -558,7 +558,7 @@ public:
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"rpad"
;
}
const
char
*
func_name
()
const
{
return
"rpad"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -571,7 +571,7 @@ public:
...
@@ -571,7 +571,7 @@ public:
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"lpad"
;
}
const
char
*
func_name
()
const
{
return
"lpad"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -586,7 +586,7 @@ public:
...
@@ -586,7 +586,7 @@ public:
collation
.
set
(
default_charset
());
collation
.
set
(
default_charset
());
max_length
=
64
;
max_length
=
64
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -603,7 +603,7 @@ public:
...
@@ -603,7 +603,7 @@ public:
decimals
=
0
;
decimals
=
0
;
max_length
=
args
[
0
]
->
max_length
*
2
*
collation
.
collation
->
mbmaxlen
;
max_length
=
args
[
0
]
->
max_length
*
2
*
collation
.
collation
->
mbmaxlen
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_unhex
:
public
Item_str_func
class
Item_func_unhex
:
public
Item_str_func
...
@@ -619,7 +619,7 @@ public:
...
@@ -619,7 +619,7 @@ public:
decimals
=
0
;
decimals
=
0
;
max_length
=
(
1
+
args
[
0
]
->
max_length
)
/
2
;
max_length
=
(
1
+
args
[
0
]
->
max_length
)
/
2
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -643,7 +643,7 @@ public:
...
@@ -643,7 +643,7 @@ public:
}
}
void
print
(
String
*
str
);
void
print
(
String
*
str
);
const
char
*
func_name
()
const
{
return
"cast_as_binary"
;
}
const
char
*
func_name
()
const
{
return
"cast_as_binary"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
@@ -683,7 +683,7 @@ public:
...
@@ -683,7 +683,7 @@ public:
String
*
val_str
(
String
*
str
);
String
*
val_str
(
String
*
str
);
const
char
*
func_name
()
const
{
return
"inet_ntoa"
;
}
const
char
*
func_name
()
const
{
return
"inet_ntoa"
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
3
*
8
+
7
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
3
*
8
+
7
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_quote
:
public
Item_str_func
class
Item_func_quote
:
public
Item_str_func
...
@@ -698,7 +698,7 @@ public:
...
@@ -698,7 +698,7 @@ public:
collation
.
set
(
args
[
0
]
->
collation
);
collation
.
set
(
args
[
0
]
->
collation
);
max_length
=
args
[
0
]
->
max_length
*
2
+
2
;
max_length
=
args
[
0
]
->
max_length
*
2
+
2
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_conv_charset
:
public
Item_str_func
class
Item_func_conv_charset
:
public
Item_str_func
...
@@ -799,7 +799,7 @@ public:
...
@@ -799,7 +799,7 @@ public:
const
char
*
func_name
()
const
{
return
"crc32"
;
}
const
char
*
func_name
()
const
{
return
"crc32"
;
}
void
fix_length_and_dec
()
{
max_length
=
10
;
}
void
fix_length_and_dec
()
{
max_length
=
10
;
}
longlong
val_int
();
longlong
val_int
();
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
class
Item_func_uncompressed_length
:
public
Item_int_func
class
Item_func_uncompressed_length
:
public
Item_int_func
...
...
sql/item_timefunc.h
View file @
58ee682e
...
@@ -39,7 +39,7 @@ public:
...
@@ -39,7 +39,7 @@ public:
{
{
max_length
=
6
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
6
*
MY_CHARSET_BIN_MB_MAXLEN
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
decimals
=
0
;
decimals
=
0
;
max_length
=
6
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
6
*
MY_CHARSET_BIN_MB_MAXLEN
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -71,7 +71,7 @@ public:
...
@@ -71,7 +71,7 @@ public:
maybe_null
=
1
;
maybe_null
=
1
;
}
}
enum_monotonicity_info
get_monotonicity_info
()
const
;
enum_monotonicity_info
get_monotonicity_info
()
const
;
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -87,7 +87,7 @@ public:
...
@@ -87,7 +87,7 @@ public:
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -112,7 +112,7 @@ public:
...
@@ -112,7 +112,7 @@ public:
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -145,7 +145,7 @@ public:
...
@@ -145,7 +145,7 @@ public:
max_length
=
3
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
3
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -161,7 +161,7 @@ public:
...
@@ -161,7 +161,7 @@ public:
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -177,7 +177,7 @@ public:
...
@@ -177,7 +177,7 @@ public:
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -193,7 +193,7 @@ public:
...
@@ -193,7 +193,7 @@ public:
max_length
=
1
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
1
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -209,7 +209,7 @@ public:
...
@@ -209,7 +209,7 @@ public:
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -225,7 +225,7 @@ public:
...
@@ -225,7 +225,7 @@ public:
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
2
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
class
Item_func_yearweek
:
public
Item_int_func
class
Item_func_yearweek
:
public
Item_int_func
...
@@ -240,7 +240,7 @@ public:
...
@@ -240,7 +240,7 @@ public:
max_length
=
6
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
6
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -257,7 +257,7 @@ public:
...
@@ -257,7 +257,7 @@ public:
max_length
=
4
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
4
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -287,7 +287,7 @@ public:
...
@@ -287,7 +287,7 @@ public:
max_length
=
1
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
1
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
class
Item_func_dayname
:
public
Item_func_weekday
class
Item_func_dayname
:
public
Item_func_weekday
...
@@ -320,7 +320,7 @@ public:
...
@@ -320,7 +320,7 @@ public:
decimals
=
0
;
decimals
=
0
;
max_length
=
10
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
10
*
MY_CHARSET_BIN_MB_MAXLEN
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -335,7 +335,7 @@ public:
...
@@ -335,7 +335,7 @@ public:
decimals
=
0
;
decimals
=
0
;
max_length
=
10
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
10
*
MY_CHARSET_BIN_MB_MAXLEN
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -545,7 +545,7 @@ public:
...
@@ -545,7 +545,7 @@ public:
Item_func_from_days
(
Item
*
a
)
:
Item_date
(
a
)
{}
Item_func_from_days
(
Item
*
a
)
:
Item_date
(
a
)
{}
const
char
*
func_name
()
const
{
return
"from_days"
;
}
const
char
*
func_name
()
const
{
return
"from_days"
;
}
bool
get_date
(
TIME
*
res
,
uint
fuzzy_date
);
bool
get_date
(
TIME
*
res
,
uint
fuzzy_date
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -563,7 +563,7 @@ public:
...
@@ -563,7 +563,7 @@ public:
void
fix_length_and_dec
();
void
fix_length_and_dec
();
uint
format_length
(
const
String
*
format
);
uint
format_length
(
const
String
*
format
);
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -582,7 +582,7 @@ class Item_func_from_unixtime :public Item_date_func
...
@@ -582,7 +582,7 @@ class Item_func_from_unixtime :public Item_date_func
const
char
*
func_name
()
const
{
return
"from_unixtime"
;
}
const
char
*
func_name
()
const
{
return
"from_unixtime"
;
}
void
fix_length_and_dec
();
void
fix_length_and_dec
();
bool
get_date
(
TIME
*
res
,
uint
fuzzy_date
);
bool
get_date
(
TIME
*
res
,
uint
fuzzy_date
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -651,7 +651,7 @@ public:
...
@@ -651,7 +651,7 @@ public:
return
tmp_table_field_from_field_type
(
table
,
0
);
return
tmp_table_field_from_field_type
(
table
,
0
);
}
}
bool
result_as_longlong
()
{
return
TRUE
;
}
bool
result_as_longlong
()
{
return
TRUE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -674,7 +674,7 @@ public:
...
@@ -674,7 +674,7 @@ public:
bool
get_date
(
TIME
*
res
,
uint
fuzzy_date
);
bool
get_date
(
TIME
*
res
,
uint
fuzzy_date
);
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
void
print
(
String
*
str
);
void
print
(
String
*
str
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -692,7 +692,7 @@ class Item_extract :public Item_int_func
...
@@ -692,7 +692,7 @@ class Item_extract :public Item_int_func
void
fix_length_and_dec
();
void
fix_length_and_dec
();
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
void
print
(
String
*
str
);
void
print
(
String
*
str
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -729,7 +729,7 @@ public:
...
@@ -729,7 +729,7 @@ public:
max_length
=
args
[
0
]
->
max_length
;
max_length
=
args
[
0
]
->
max_length
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -749,7 +749,7 @@ public:
...
@@ -749,7 +749,7 @@ public:
String
*
val_str
(
String
*
a
);
String
*
val_str
(
String
*
a
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
void
print
(
String
*
str
);
void
print
(
String
*
str
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -829,7 +829,7 @@ public:
...
@@ -829,7 +829,7 @@ public:
}
}
bool
result_as_longlong
()
{
return
TRUE
;
}
bool
result_as_longlong
()
{
return
TRUE
;
}
longlong
val_int
();
longlong
val_int
();
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -852,7 +852,7 @@ public:
...
@@ -852,7 +852,7 @@ public:
}
}
void
print
(
String
*
str
);
void
print
(
String
*
str
);
const
char
*
func_name
()
const
{
return
"add_time"
;
}
const
char
*
func_name
()
const
{
return
"add_time"
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
class
Item_func_timediff
:
public
Item_str_func
class
Item_func_timediff
:
public
Item_str_func
...
@@ -892,7 +892,7 @@ public:
...
@@ -892,7 +892,7 @@ public:
{
{
return
tmp_table_field_from_field_type
(
table
,
0
);
return
tmp_table_field_from_field_type
(
table
,
0
);
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
class
Item_func_microsecond
:
public
Item_int_func
class
Item_func_microsecond
:
public
Item_int_func
...
@@ -906,7 +906,7 @@ public:
...
@@ -906,7 +906,7 @@ public:
decimals
=
0
;
decimals
=
0
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -924,7 +924,7 @@ public:
...
@@ -924,7 +924,7 @@ public:
maybe_null
=
1
;
maybe_null
=
1
;
}
}
void
print
(
String
*
str
);
void
print
(
String
*
str
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
@@ -971,7 +971,7 @@ public:
...
@@ -971,7 +971,7 @@ public:
{
{
return
tmp_table_field_from_field_type
(
table
,
1
);
return
tmp_table_field_from_field_type
(
table
,
1
);
}
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;}
};
};
...
...
sql/item_xmlfunc.h
View file @
58ee682e
...
@@ -42,7 +42,7 @@ public:
...
@@ -42,7 +42,7 @@ public:
Item_func_xml_extractvalue
(
Item
*
a
,
Item
*
b
)
:
Item_xml_str_func
(
a
,
b
)
{}
Item_func_xml_extractvalue
(
Item
*
a
,
Item
*
b
)
:
Item_xml_str_func
(
a
,
b
)
{}
const
char
*
func_name
()
const
{
return
"extractvalue"
;
}
const
char
*
func_name
()
const
{
return
"extractvalue"
;
}
String
*
val_str
(
String
*
);
String
*
val_str
(
String
*
);
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
bool
check_partition_func_processor
(
byte
*
int_arg
)
{
return
FALSE
;
}
};
};
...
...
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