My Project
|
This file defines all compare functions. More...
#include "sql_priv.h"
#include <m_ctype.h>
#include "sql_select.h"
#include "sql_optimizer.h"
#include "sql_parse.h"
#include "sql_time.h"
#include <algorithm>
Defines | |
#define | OLD_CMP |
#define | likeconv(cs, A) (uchar) (cs)->sort_order[(uchar) (A)] |
Functions | |
enum_field_types | agg_field_type (Item **items, uint nitems) |
Aggregates field types from the array of items. | |
bool | get_mysql_time_from_str (THD *thd, String *str, timestamp_type warn_type, const char *warn_name, MYSQL_TIME *l_time) |
longlong | get_time_value (THD *thd, Item ***item_arg, Item **cache_arg, Item *warn_item, bool *is_null) |
longlong | get_datetime_value (THD *thd, Item ***item_arg, Item **cache_arg, Item *warn_item, bool *is_null) |
int | cmp_longlong (void *cmp_arg, in_longlong::packed_longlong *a, in_longlong::packed_longlong *b) |
Item * | and_expressions (Item *a, Item *b, Item **org_item) |
This file defines all compare functions.
enum_field_types agg_field_type | ( | Item ** | items, |
uint | nitems | ||
) |
Aggregates field types from the array of items.
[in] | items | array of items to aggregate the type from [in] nitems number of items in the array |
This function aggregates field types from the array of items. Found type is supposed to be used later as the result field type of a multi-argument function. Aggregation itself is performed by the Field::field_type_merge() function.
Item* and_expressions | ( | Item * | a, |
Item * | b, | ||
Item ** | org_item | ||
) |
Create an AND expression from two expressions.
a | expression or NULL |
b | expression. |
org_item | Don't modify a if a == *org_item. If a == NULL, org_item is set to point at b, to ensure that future calls will not modify b. |
NULL | Error |
Item |
bool get_mysql_time_from_str | ( | THD * | thd, |
String * | str, | ||
timestamp_type | warn_type, | ||
const char * | warn_name, | ||
MYSQL_TIME * | l_time | ||
) |
Parse date provided in a string to a MYSQL_TIME.
[in] | thd | Thread handle |
[in] | str | A string to convert |
[in] | warn_type | Type of the timestamp for issuing the warning |
[in] | warn_name | Field name for issuing the warning |
[out] | l_time | The MYSQL_TIME objects is initialized. |
Parses a date provided in the string str into a MYSQL_TIME object. If the string contains an incorrect date or doesn't correspond to a date at all then a warning is issued. The warn_type and the warn_name arguments are used as the name and the type of the field when issuing the warning. If any input was discarded (trailing or non-timestamp-y characters), return value will be TRUE.
FALSE | Success. |
True | Indicates failure. |