From 9530664d07f400f4d8dcbe54d0e82d69168844de Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 7 Feb 2024 18:40:38 +0100 Subject: [PATCH] tdf#159588: Query-GUI: LOWER isnt supported in Query-GUI if condition is LIKE Let's consider "SQL_TOKEN_LOWER" and "SQL_TOKEN_UPPER" as "string_function_1Argument" like "SQL_TOKEN_LCASE" and "SQL_TOKEN_UCASE" Change-Id: I288fd5f3d9e3d104345c73a060ba11d9701500a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163099 Tested-by: Jenkins Reviewed-by: Julien Nabet --- connectivity/source/parse/sqlbison.y | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 00666ed87a09..23de1cb772ab 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -233,12 +233,12 @@ using namespace connectivity; %type datetime_primary datetime_value_fct time_zone time_zone_specifier /*interval_term*/ interval_qualifier %type start_field non_second_datetime_field end_field single_datetime_field extract_field datetime_field time_zone_field %type char_length_exp octet_length_exp bit_length_exp select_sublist string_value_exp -%type char_value_exp concatenation char_factor char_primary string_value_fct char_substring_fct fold +%type char_value_exp concatenation char_factor char_primary string_value_fct char_substring_fct %type form_conversion char_translation trim_fct trim_operands trim_spec bit_value_fct bit_substring_fct op_column_commalist %type /*bit_concatenation*/ bit_value_exp bit_factor bit_primary collate_clause char_value_fct unique_spec value_exp_commalist in_predicate_value unique_test update_source %type function_arg_commalist3 string_function_3Argument function_arg_commalist4 string_function_4Argument function_arg_commalist2 string_function_1Argument string_function_2Argument %type date_function_0Argument date_function_1Argument function_name12 function_name23 function_name1 function_name2 function_name3 function_name0 numeric_function_0Argument numeric_function_1Argument numeric_function_2Argument -%type all query_primary sql_not for_length upper_lower comparison column_val cross_union /*opt_schema_element_list*/ +%type all query_primary sql_not for_length comparison column_val cross_union /*opt_schema_element_list*/ %type /*op_authorization op_schema*/ nil_fkt schema_element base_table_def base_table_element base_table_element_commalist %type column_def odbc_fct_spec odbc_call_spec odbc_fct_type op_parameter union_statement %type op_odbc_call_parameter odbc_parameter_commalist odbc_parameter function_args_commalist function_arg @@ -1929,10 +1929,12 @@ string_function_1Argument: SQL_TOKEN_LENGTH | SQL_TOKEN_ASCII | SQL_TOKEN_LCASE + | SQL_TOKEN_LOWER | SQL_TOKEN_LTRIM | SQL_TOKEN_RTRIM | SQL_TOKEN_SPACE | SQL_TOKEN_UCASE + | SQL_TOKEN_UPPER ; string_function_2Argument: @@ -3249,7 +3251,6 @@ bit_primary: ; char_value_fct: char_substring_fct - | fold | form_conversion { $$ = SQL_NEW_RULE; @@ -3296,20 +3297,6 @@ char_substring_fct: $$->append(newNode(")", SQLNodeType::Punctuation)); } ; -upper_lower: - SQL_TOKEN_UPPER - | SQL_TOKEN_LOWER - ; -fold: - upper_lower '(' value_exp ')' - { - $$ = SQL_NEW_RULE; - $$->append($1); - $$->append(newNode("(", SQLNodeType::Punctuation)); - $$->append($3); - $$->append(newNode(")", SQLNodeType::Punctuation)); - } - ; form_conversion: SQL_TOKEN_CONVERT '(' string_value_exp SQL_TOKEN_USING table_node ')' {