mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Cleanup: Adding "const" to the member Spvar_definition::m_column_type_ref
and to related methods and their parameters: - The return value of Spvar_definition::m_column_type_ref() - The parameter of Spvar_definition::set_column_type_ref() - The method Qualified_column_ident::resolve_type_ref() - The parameter of LEX::sp_variable_declarations_column_type_finalize()
This commit is contained in:
@ -5585,8 +5585,8 @@ public:
|
||||
*/
|
||||
class Spvar_definition: public Column_definition
|
||||
{
|
||||
Qualified_column_ident *m_column_type_ref; // for %TYPE
|
||||
Table_ident *m_table_rowtype_ref; // for table%ROWTYPE
|
||||
const Qualified_column_ident *m_column_type_ref; // for %TYPE
|
||||
Table_ident *m_table_rowtype_ref; // for table%ROWTYPE
|
||||
bool m_cursor_rowtype_ref; // for cursor%ROWTYPE
|
||||
uint m_cursor_rowtype_offset; // for cursor%ROWTYPE
|
||||
Row_definition_list *m_row_field_definitions; // for ROW
|
||||
@ -5619,11 +5619,11 @@ public:
|
||||
!is_table_rowtype_ref() &&
|
||||
!is_cursor_rowtype_ref();
|
||||
}
|
||||
Qualified_column_ident *column_type_ref() const
|
||||
const Qualified_column_ident *column_type_ref() const
|
||||
{
|
||||
return m_column_type_ref;
|
||||
}
|
||||
void set_column_type_ref(Qualified_column_ident *ref)
|
||||
void set_column_type_ref(const Qualified_column_ident *ref)
|
||||
{
|
||||
m_column_type_ref= ref;
|
||||
}
|
||||
|
@ -226,7 +226,8 @@ check_column_grant_for_type_ref(THD *thd, TABLE_LIST *table_list,
|
||||
/**
|
||||
This method implementation is very close to fill_schema_table_by_open().
|
||||
*/
|
||||
bool Qualified_column_ident::resolve_type_ref(THD *thd, Column_definition *def)
|
||||
bool Qualified_column_ident::resolve_type_ref(THD *thd,
|
||||
Column_definition *def) const
|
||||
{
|
||||
Open_tables_backup open_tables_state_backup;
|
||||
thd->reset_n_backup_open_tables_state(&open_tables_state_backup);
|
||||
|
@ -7142,7 +7142,7 @@ public:
|
||||
:Table_ident(thd, db, table, false),
|
||||
m_column(*column)
|
||||
{ }
|
||||
bool resolve_type_ref(THD *thd, Column_definition *def);
|
||||
bool resolve_type_ref(THD *thd, Column_definition *def) const;
|
||||
bool append_to(THD *thd, String *to) const;
|
||||
};
|
||||
|
||||
|
@ -6715,9 +6715,9 @@ LEX::sp_variable_declarations_with_ref_finalize(THD *thd, int nvars,
|
||||
|
||||
bool
|
||||
LEX::sp_variable_declarations_column_type_finalize(THD *thd, int nvars,
|
||||
Qualified_column_ident *ref,
|
||||
Item *def,
|
||||
const LEX_CSTRING &expr_str)
|
||||
const Qualified_column_ident *ref,
|
||||
Item *def,
|
||||
const LEX_CSTRING &expr_str)
|
||||
{
|
||||
for (uint i= 0 ; i < (uint) nvars; i++)
|
||||
{
|
||||
@ -6757,7 +6757,7 @@ LEX::sp_variable_declarations_vartype_finalize(THD *thd, int nvars,
|
||||
|
||||
if (t->field_def.is_column_type_ref())
|
||||
{
|
||||
Qualified_column_ident *tmp= t->field_def.column_type_ref();
|
||||
const Qualified_column_ident *tmp= t->field_def.column_type_ref();
|
||||
return sp_variable_declarations_column_type_finalize(thd, nvars, tmp,
|
||||
default_value,
|
||||
expr_str);
|
||||
|
@ -3972,9 +3972,9 @@ public:
|
||||
Item *def,
|
||||
const LEX_CSTRING &expr_str);
|
||||
bool sp_variable_declarations_column_type_finalize(THD *thd, int nvars,
|
||||
Qualified_column_ident *ref,
|
||||
Item *def,
|
||||
const LEX_CSTRING &expr_str);
|
||||
const Qualified_column_ident *ref,
|
||||
Item *def,
|
||||
const LEX_CSTRING &expr_str);
|
||||
bool sp_variable_declarations_vartype_finalize(THD *thd, int nvars,
|
||||
const LEX_CSTRING &name,
|
||||
Item *def,
|
||||
|
Reference in New Issue
Block a user