aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-26 18:01:50 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-26 18:01:50 +0000
commitd9e4dabfffa3e8183d3f9992d50c41d3987bfa1c (patch)
treec0a41378fef10343441f86e475f2eeff601e73a4
parent807dc9075f46a0afeb48acbb40b19e1e2f6a0fd9 (diff)
downloadsequelpro-d9e4dabfffa3e8183d3f9992d50c41d3987bfa1c.tar.gz
sequelpro-d9e4dabfffa3e8183d3f9992d50c41d3987bfa1c.tar.bz2
sequelpro-d9e4dabfffa3e8183d3f9992d50c41d3987bfa1c.zip
• corrected regex to trigger table/db reload after executing a query in the Query Editor
-rw-r--r--Source/CustomQuery.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 2e3b16c4..a02da041 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -629,9 +629,9 @@
} else {
// Check if table/db list needs an update
// The regex is a compromise between speed and usefullness. TODO: further improvements are needed
- if(!tableListNeedsReload && [query isMatchedByRegex:@"(?i)(?<!show\\s+)\\b(create|alter|drop|rename)\\b\\s+."])
+ if(!tableListNeedsReload && [query isMatchedByRegex:@"(?i)^\\s*\\b(create|alter|drop|rename)\\b\\s+."])
tableListNeedsReload = YES;
- if(!databaseWasChanged && [query isMatchedByRegex:@"(?i)\\b(use|drop\\s+database|drop\\s+schema)\\b\\s+."])
+ if(!databaseWasChanged && [query isMatchedByRegex:@"(?i)^\\s*\\b(use|drop\\s+database|drop\\s+schema)\\b\\s+."])
databaseWasChanged = YES;
}
// If the query was cancelled, end all queries.
@@ -649,6 +649,7 @@
// Reload table list
[[[tableWindow delegate] valueForKeyPath:@"tablesListInstance"] updateTables:self];
+
}
if(usedQuery)