MySQL 9.1.0
Source Code Documentation
trigger_creation_ctx.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2013, 2024, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
24
25#ifndef TRIGGER_CREATION_CTX_H_INCLUDED
26#define TRIGGER_CREATION_CTX_H_INCLUDED
27
28///////////////////////////////////////////////////////////////////////////
29
30#include "lex_string.h"
31#include "sql/sp_head.h" // Stored_program_creation_ctx
32
34class THD;
35struct CHARSET_INFO;
36struct MEM_ROOT;
37
38/**
39 Trigger_creation_ctx -- creation context of triggers.
40*/
41
43 public:
46 const LEX_CSTRING &client_cs_name,
47 const LEX_CSTRING &connection_cl_name,
48 const LEX_CSTRING &db_cl_name);
49
50 public:
52
53 protected:
54 Object_creation_ctx *create_backup_ctx(THD *thd) const override;
55
56 void delete_backup_ctx() override;
57
58 private:
60
62 const CHARSET_INFO *connection_cl,
63 const CHARSET_INFO *db_cl)
64 : Stored_program_creation_ctx(client_cs, connection_cl, db_cl) {}
65};
66
67///////////////////////////////////////////////////////////////////////////
68
69#endif // TRIGGER_CREATION_CTX_H_INCLUDED
Object_creation_ctx – interface for creation context of database objects (views, stored routines,...
Definition: table.h:204
Stored_program_creation_ctx – base class for creation context of stored programs (stored routines,...
Definition: sp_head.h:92
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Trigger_creation_ctx – creation context of triggers.
Definition: trigger_creation_ctx.h:42
void delete_backup_ctx() override
Definition: trigger_creation_ctx.cc:116
static Trigger_creation_ctx * create(THD *thd, const LEX_CSTRING &db_name, const LEX_CSTRING &table_name, const LEX_CSTRING &client_cs_name, const LEX_CSTRING &connection_cl_name, const LEX_CSTRING &db_cl_name)
Definition: trigger_creation_ctx.cc:48
Stored_program_creation_ctx * clone(MEM_ROOT *mem_root) override
Definition: trigger_creation_ctx.cc:107
Trigger_creation_ctx(const CHARSET_INFO *client_cs, const CHARSET_INFO *connection_cl, const CHARSET_INFO *db_cl)
Definition: trigger_creation_ctx.h:61
Trigger_creation_ctx(THD *thd)
Definition: trigger_creation_ctx.h:59
Object_creation_ctx * create_backup_ctx(THD *thd) const override
Definition: trigger_creation_ctx.cc:112
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
const char * table_name
Definition: rules_table_service.cc:56
const char * db_name
Definition: rules_table_service.cc:55
Definition: m_ctype.h:421
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: mysql_lex_string.h:40