1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

cleanup: remove redundant function

This commit is contained in:
Sergei Golubchik
2026-06-12 14:12:29 +02:00
parent 7d5e99a4ec
commit a16df9bb60
4 changed files with 7 additions and 13 deletions

View File

@@ -9860,11 +9860,6 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
}
bool is_equal(const LEX_CSTRING *a, const LEX_CSTRING *b)
{
return a->length == b->length && !strncmp(a->str, b->str, a->length);
}
/*
Open and lock system tables for read.

View File

@@ -1,5 +1,5 @@
/* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011, 2018, MariaDB
Copyright (c) 2011, 2026, MariaDB plc.
This program is free software; you can redistribute it and/or modify
@@ -307,7 +307,6 @@ TABLE_LIST*
unique_table_in_insert_returning_subselect(THD *thd, TABLE_LIST *table, SELECT_LEX *sel);
TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
uint check_flag);
bool is_equal(const LEX_CSTRING *a, const LEX_CSTRING *b);
class Open_tables_backup;
/* Functions to work with system tables. */

View File

@@ -1,6 +1,6 @@
/*
Copyright (c) 2004, 2012, Oracle and/or its affiliates.
Copyright (c) 2010, 2022, MariaDB
Copyright (c) 2010, 2026, MariaDB plc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1741,7 +1741,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db,
if ((parser= sql_parse_prepare(&path, &table->mem_root, 1)))
{
if (is_equal(&triggers_file_type, parser->type()))
if (lex_string_eq(&triggers_file_type, parser->type()))
{
Handle_old_incorrect_sql_modes_hook sql_modes_hook(path.str);
LEX_CSTRING *trg_create_str, *trg_sql_path;
@@ -3223,7 +3223,7 @@ bool load_table_name_for_trigger(THD *thd,
if (!(parser= sql_parse_prepare(trn_path, thd->mem_root, TRUE)))
DBUG_RETURN(TRUE);
if (!is_equal(&trigname_file_type, parser->type()))
if (!lex_string_eq(&trigname_file_type, parser->type()))
{
my_error(ER_WRONG_OBJECT, MYF(0),
trg_name->m_name.str,

View File

@@ -1,5 +1,5 @@
/* Copyright (c) 2004, 2013, Oracle and/or its affiliates.
Copyright (c) 2011, 2021, MariaDB Corporation.
Copyright (c) 2011, 2026, MariaDB plc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1174,7 +1174,7 @@ loop_out:
goto err;
}
if (!parser->ok() || !is_equal(&view_type, parser->type()))
if (!parser->ok() || !lex_string_eq(&view_type, parser->type()))
{
my_error(ER_WRONG_OBJECT, MYF(0), view->db.str, view->table_name.str,
"VIEW");
@@ -2364,7 +2364,7 @@ mysql_rename_view(THD *thd,
reg_ext, 0);
if ((parser= sql_parse_prepare(&pathstr, thd->mem_root, 1)) &&
is_equal(&view_type, parser->type()))
lex_string_eq(&view_type, parser->type()))
{
TABLE_LIST view_def;
char dir_buff[FN_REFLEN + 1];