MySQL 8.0.32
Source Code Documentation
trigger_creation_ctx.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2013, 2022, 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 also distributed 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 included with MySQL.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef TRIGGER_CREATION_CTX_H_INCLUDED
25#define TRIGGER_CREATION_CTX_H_INCLUDED
26
27///////////////////////////////////////////////////////////////////////////
28
29#include "lex_string.h"
30#include "sql/sp_head.h" // Stored_program_creation_ctx
31
33class THD;
34struct CHARSET_INFO;
35struct MEM_ROOT;
36
37/**
38 Trigger_creation_ctx -- creation context of triggers.
39*/
40
42 public:
45 const LEX_CSTRING &client_cs_name,
46 const LEX_CSTRING &connection_cl_name,
47 const LEX_CSTRING &db_cl_name);
48
49 public:
51
52 protected:
53 Object_creation_ctx *create_backup_ctx(THD *thd) const override;
54
55 void delete_backup_ctx() override;
56
57 private:
59
61 const CHARSET_INFO *connection_cl,
62 const CHARSET_INFO *db_cl)
63 : Stored_program_creation_ctx(client_cs, connection_cl, db_cl) {}
64};
65
66///////////////////////////////////////////////////////////////////////////
67
68#endif // TRIGGER_CREATION_CTX_H_INCLUDED
Object_creation_ctx – interface for creation context of database objects (views, stored routines,...
Definition: table.h:195
Stored_program_creation_ctx – base class for creation context of stored programs (stored routines,...
Definition: sp_head.h:88
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Trigger_creation_ctx – creation context of triggers.
Definition: trigger_creation_ctx.h:41
void delete_backup_ctx() override
Definition: trigger_creation_ctx.cc:112
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:44
Stored_program_creation_ctx * clone(MEM_ROOT *mem_root) override
Definition: trigger_creation_ctx.cc:103
Trigger_creation_ctx(const CHARSET_INFO *client_cs, const CHARSET_INFO *connection_cl, const CHARSET_INFO *db_cl)
Definition: trigger_creation_ctx.h:60
Trigger_creation_ctx(THD *thd)
Definition: trigger_creation_ctx.h:58
Object_creation_ctx * create_backup_ctx(THD *thd) const override
Definition: trigger_creation_ctx.cc:108
static MEM_ROOT mem_root
Definition: client_plugin.cc:109
const char * table_name
Definition: rules_table_service.cc:55
const char * db_name
Definition: rules_table_service.cc:54
Definition: m_ctype.h:382
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
Definition: mysql_lex_string.h:39