1 /* Copyright (c) 2007, 2021, Oracle and/or its affiliates. 2 3 This program is free software; you can redistribute it and/or modify 4 it under the terms of the GNU General Public License, version 2.0, 5 as published by the Free Software Foundation. 6 7 This program is also distributed with certain software (including 8 but not limited to OpenSSL) that is licensed under separate terms, 9 as designated in a particular file or component or in included license 10 documentation. The authors of MySQL hereby grant you an additional 11 permission to link the program and your derivative works with the 12 separately licensed software that they have included with MySQL. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License, version 2.0, for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software 21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ 22 23 #ifndef CREATE_TRIG_IMPL_HPP 24 #define CREATE_TRIG_IMPL_HPP 25 26 #include "SignalData.hpp" 27 #include <Bitmask.hpp> 28 #include <AttributeList.hpp> 29 30 #define JAM_FILE_ID 104 31 32 33 struct CreateTrigImplReq 34 { 35 enum RequestType 36 { 37 CreateTriggerOnline = 1, 38 CreateTriggerOffline = 2 39 }; 40 41 STATIC_CONST( SignalLength = 11 + 3); 42 SECTION( ATTRIBUTE_MASK_SECTION = 0 ); 43 44 // tableVersion, indexVersion, name section used only within DICT 45 46 Uint32 senderRef; 47 Uint32 senderData; 48 Uint32 requestType; 49 Uint32 tableId; 50 Uint32 tableVersion; 51 Uint32 indexId; 52 Uint32 indexVersion; 53 Uint32 triggerNo; 54 Uint32 triggerId; 55 Uint32 triggerInfo; 56 Uint32 receiverRef; 57 Uint32 upgradeExtra[3]; // Send TriggerId's as defined in 6.3 here 58 }; 59 60 struct CreateTrigImplConf { 61 STATIC_CONST( SignalLength = 5 ); 62 63 Uint32 senderRef; 64 Uint32 senderData; 65 Uint32 tableId; // BACKUP and SUMA want these back from TUP 66 Uint32 triggerId; 67 Uint32 triggerInfo; 68 }; 69 70 struct CreateTrigImplRef { 71 enum ErrorCode { 72 NoError = 0, 73 Busy = 701, 74 NotMaster = 702, 75 TriggerNameTooLong = 4236, 76 TooManyTriggers = 4237, 77 TriggerNotFound = 4238, 78 TriggerExists = 4239, 79 UnsupportedTriggerType = 4240, 80 BadRequestType = 4247, 81 InvalidName = 4248, 82 InvalidTable = 4249, 83 InconsistentTC = 293 84 }; 85 86 STATIC_CONST( SignalLength = 9 ); 87 88 Uint32 senderRef; 89 Uint32 senderData; 90 Uint32 tableId; 91 Uint32 triggerId; 92 Uint32 triggerInfo; 93 Uint32 errorCode; 94 Uint32 errorLine; 95 Uint32 errorNodeId; 96 Uint32 masterNodeId; 97 }; 98 99 100 #undef JAM_FILE_ID 101 102 #endif 103