MXS-1196: Translate NVL into IFNULL
This commit is contained in:
@ -127,6 +127,14 @@ static QC_NAME_MAPPING function_name_mappings_103[] =
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// NOTE: Duplicate the information from function_name_mappings_103 here.
|
||||||
|
static QC_NAME_MAPPING function_name_mappings_oracle[] =
|
||||||
|
{
|
||||||
|
{ "now", "current_timestamp" },
|
||||||
|
{ "nvl", "ifnull" },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state of qc_sqlite.
|
* The state of qc_sqlite.
|
||||||
*/
|
*/
|
||||||
@ -2982,7 +2990,6 @@ static int32_t qc_sqlite_setup(const char* cargs)
|
|||||||
if (strcmp(value, "10.3") == 0)
|
if (strcmp(value, "10.3") == 0)
|
||||||
{
|
{
|
||||||
parse_as = QC_PARSE_AS_103;
|
parse_as = QC_PARSE_AS_103;
|
||||||
function_name_mappings = function_name_mappings_103;
|
|
||||||
MXS_NOTICE("Parsing as 10.3.");
|
MXS_NOTICE("Parsing as 10.3.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3020,6 +3027,15 @@ static int32_t qc_sqlite_setup(const char* cargs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sql_mode == QC_SQL_MODE_ORACLE)
|
||||||
|
{
|
||||||
|
function_name_mappings = function_name_mappings_oracle;
|
||||||
|
}
|
||||||
|
else if (parse_as == QC_PARSE_AS_103)
|
||||||
|
{
|
||||||
|
function_name_mappings = function_name_mappings_103;
|
||||||
|
}
|
||||||
|
|
||||||
this_unit.setup = true;
|
this_unit.setup = true;
|
||||||
this_unit.log_level = log_level;
|
this_unit.log_level = log_level;
|
||||||
this_unit.sql_mode = sql_mode;
|
this_unit.sql_mode = sql_mode;
|
||||||
|
Reference in New Issue
Block a user