github.com/dolthub/go-mysql-server@v0.18.0/sql/mysql_db/fbs/mysql_db.fbs (about) 1 // Copyright 2022 Dolthub, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 table PrivilegeSetColumn { 16 name:string; 17 privs:[int]; 18 } 19 20 table PrivilegeSetTable { 21 name:string; 22 privs:[int]; 23 columns:[PrivilegeSetColumn]; 24 } 25 26 table PrivilegeSetRoutine { 27 name:string; 28 privs:[int]; 29 is_proc:bool; 30 } 31 32 table PrivilegeSetDatabase { 33 name:string; 34 privs:[int]; 35 tables:[PrivilegeSetTable]; 36 routines:[PrivilegeSetRoutine]; 37 } 38 39 table PrivilegeSet { 40 global_static:[int]; 41 global_dynamic:[string]; 42 databases:[PrivilegeSetDatabase]; 43 global_dynamic_wgo:[bool]; // WITH GRANT OPTION, separate as this was added later 44 } 45 46 // Entries in the user table 47 table User { 48 user:string; 49 host:string; 50 privilege_set:PrivilegeSet; 51 plugin:string; 52 password:string; 53 password_last_changed:int64; // represents time.Time 54 locked:bool; 55 attributes:string; // represents *string 56 identity:string; 57 } 58 59 // Entries in the role_edges table 60 table RoleEdge { 61 from_host:string; 62 from_user:string; 63 to_host:string; 64 to_user:string; 65 with_admin_option:bool; 66 } 67 68 // Entries in the slave_master_info table 69 table ReplicaSourceInfo { 70 host:string; 71 user:string; 72 password:string; 73 port:uint16; 74 uuid:string; 75 connect_retry_interval:uint32; 76 connect_retry_count:uint64; 77 } 78 79 // The MySQL Db containing all the tables 80 table MySQLDb { 81 user:[User]; 82 role_edges:[RoleEdge]; 83 replica_source_info:[ReplicaSourceInfo]; 84 85 // Only used in replication, typically the server instance itself will 86 // manage creating bootstrap users. 87 super_user:[User]; 88 } 89 90 root_type MySQLDb;