aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseData.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-03-19 01:32:28 +0000
committerrowanbeentje <rowan@beent.je>2013-03-19 01:32:28 +0000
commit46dd5cd5a759eb38aacc2e7f6e5f757fee60d3c2 (patch)
tree7b67782314f7ce52d8b95ec844532fddb85e2847 /Source/SPDatabaseData.m
parentf3b93d4d0d3bf2cbeb9bd512781e93d4c630f752 (diff)
downloadsequelpro-46dd5cd5a759eb38aacc2e7f6e5f757fee60d3c2.tar.gz
sequelpro-46dd5cd5a759eb38aacc2e7f6e5f757fee60d3c2.tar.bz2
sequelpro-46dd5cd5a759eb38aacc2e7f6e5f757fee60d3c2.zip
- Fix errors when editing or moving columns on server vesions which do not support character sets/collations, addressing Issue #1629
- Fix needless collation queries on those servers - Disable field enums and table encoding dropdown on those servers
Diffstat (limited to 'Source/SPDatabaseData.m')
-rw-r--r--Source/SPDatabaseData.m18
1 files changed, 4 insertions, 14 deletions
diff --git a/Source/SPDatabaseData.m b/Source/SPDatabaseData.m
index f2ac6a85..558ab59a 100644
--- a/Source/SPDatabaseData.m
+++ b/Source/SPDatabaseData.m
@@ -321,9 +321,7 @@ NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo,
*/
- (NSString *)getDatabaseDefaultCharacterSet
{
- if (!defaultCharacterSetEncoding) {
- [defaultCharacterSetEncoding release];
-
+ if (!defaultCharacterSetEncoding) {
NSString *variable = [serverSupport supportsCharacterSetAndCollationVars] ? @"character_set_database" : @"character_set";
defaultCharacterSetEncoding = [[self _getSingleVariableValue:variable] retain];
@@ -339,9 +337,7 @@ NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo,
*/
- (NSString *)getDatabaseDefaultCollation
{
- if (!defaultCollation) {
- [defaultCollation release];
-
+ if (!defaultCollation && [serverSupport supportsCharacterSetAndCollationVars]) {
defaultCollation = [[self _getSingleVariableValue:@"collation_database"] retain];
}
@@ -355,9 +351,7 @@ NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo,
*/
- (NSString *)getServerDefaultCharacterSet
{
- if (!serverDefaultCharacterSetEncoding) {
- [serverDefaultCharacterSetEncoding release];
-
+ if (!serverDefaultCharacterSetEncoding) {
NSString *variable = [serverSupport supportsCharacterSetAndCollationVars] ? @"character_set_server" : @"character_set";
serverDefaultCharacterSetEncoding = [[self _getSingleVariableValue:variable] retain];
@@ -373,9 +367,7 @@ NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo,
*/
- (NSString *)getServerDefaultCollation
{
- if (!serverDefaultCollation) {
- [serverDefaultCollation release];
-
+ if (!serverDefaultCollation) {
serverDefaultCollation = [[self _getSingleVariableValue:@"collation_server"] retain];
}
@@ -390,8 +382,6 @@ NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo,
- (NSString *)getDatabaseDefaultStorageEngine
{
if (!defaultStorageEngine) {
-
- [defaultStorageEngine release];
// Determine which variable to use based on server version. 'table_type' has been available since MySQL 3.23.0.
NSString *storageEngineKey = @"table_type";