Skip to content

Commit 3f24d5d

Browse files
committed
Merge branch 'master' of github.com:sequelpro/sequelpro
2 parents 562eb1d + 7dbd044 commit 3f24d5d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Models/SPUserManager.xcdatamodel/contents

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<attribute name="create_view_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
1010
<attribute name="db" attributeType="String" maxValueString="64" indexed="YES" syncable="YES"/>
1111
<attribute name="delete_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
12+
<attribute name="delete_versioning_rows_priv" optional="YES" attributeType="Boolean" syncable="YES"/>
1213
<attribute name="drop_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
1314
<attribute name="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
1415
<attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
@@ -35,6 +36,7 @@
3536
<attribute name="create_user_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
3637
<attribute name="create_view_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
3738
<attribute name="delete_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
39+
<attribute name="delete_versioning_rows_priv" optional="YES" attributeType="Boolean" syncable="YES"/>
3840
<attribute name="drop_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
3941
<attribute name="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
4042
<attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>

Source/SPUserManager.m

+10-5
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,17 @@ - (id)init
101101
// is derived automatically. While most keys can be automatically converted without
102102
// any difficulty, some keys differ slightly in mysql column storage to GRANT syntax;
103103
// this dictionary provides mappings for those values to ensure consistency.
104+
105+
// key is: The name of the actual column in the mysql.users / mysql.db table
106+
// value is: The "Privilege" value from "SHOW PRIVILEGES" with " " replaced by "_" and "_priv" appended
104107
privColumnToGrantMap = [@{
105-
@"Grant_priv": @"Grant_option_priv",
106-
@"Show_db_priv": @"Show_databases_priv",
107-
@"Create_tmp_table_priv": @"Create_temporary_tables_priv",
108-
@"Repl_slave_priv": @"Replication_slave_priv",
109-
@"Repl_client_priv": @"Replication_client_priv",
108+
@"Grant_priv": @"Grant_option_priv",
109+
@"Show_db_priv": @"Show_databases_priv",
110+
@"Create_tmp_table_priv": @"Create_temporary_tables_priv",
111+
@"Repl_slave_priv": @"Replication_slave_priv",
112+
@"Repl_client_priv": @"Replication_client_priv",
113+
@"Truncate_versioning_priv": @"Delete_versioning_rows_priv", // MariaDB only, 10.3.4 only
114+
@"Delete_history_priv": @"Delete_versioning_rows_priv", // MariaDB only, since 10.3.5
110115
} retain];
111116

112117
schemas = [[NSMutableArray alloc] init];

0 commit comments

Comments
 (0)