From ea1aefa09e50546cbf48cf986dbf6520b9ca8deb Mon Sep 17 00:00:00 2001 From: Chris Tomlinson Date: Wed, 26 Jun 2013 15:46:50 +0100 Subject: [PATCH 1/2] Fixes U4-2187 - Enable support for MySQL on Linux --- src/Umbraco.Core/DatabaseContext.cs | 12 ++++++------ .../Persistence/SqlSyntax/MySqlSyntaxProvider.cs | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Core/DatabaseContext.cs b/src/Umbraco.Core/DatabaseContext.cs index 420831d299..d944bfefc8 100644 --- a/src/Umbraco.Core/DatabaseContext.cs +++ b/src/Umbraco.Core/DatabaseContext.cs @@ -393,8 +393,8 @@ namespace Umbraco.Core if (supportsCaseInsensitiveQueries == false) { message = "

 

The database you're trying to use does not support case insensitive queries.
We currently do not support these types of databases.

" + - "

You can fix this by changing the following two settings in your my.ini file in your MySQL installation directory:

" + - "
lower_case_table_names=1\nlower_case_file_system=1

" + + "

You can fix this by changing the following setting in your my.ini file in your MySQL installation directory:

" + + "
lower_case_table_names=1

" + "

Note: Make sure to check with your hosting provider if they support case insensitive queries as well.

" + "

For more technical information on case sensitivity in MySQL, have a look at " + "the documentation on the subject

"; @@ -404,8 +404,8 @@ namespace Umbraco.Core else if (supportsCaseInsensitiveQueries == null) { message = "

 

Warning! Could not check if your database type supports case insensitive queries.
We currently do not support these databases that do not support case insensitive queries.

" + - "

You can check this by looking for the following two settings in your my.ini file in your MySQL installation directory:

" + - "
lower_case_table_names=1\nlower_case_file_system=1

" + + "

You can check this by looking for the following setting in your my.ini file in your MySQL installation directory:

" + + "
lower_case_table_names=1

" + "

Note: Make sure to check with your hosting provider if they support case insensitive queries as well.

" + "

For more technical information on case sensitivity in MySQL, have a look at " + "the documentation on the subject

"; @@ -418,8 +418,8 @@ namespace Umbraco.Core "

Note: You're using MySQL and the database instance you're connecting to seems to support case insensitive queries.

" + "

However, your hosting provider may not support this option. Umbraco does not currently support MySQL installs that do not support case insensitive queries

" + "

Make sure to check with your hosting provider if they support case insensitive queries as well.

" + - "

They can check this by looking for the following two settings in the my.ini file in their MySQL installation directory:

" + - "
lower_case_table_names=1\nlower_case_file_system=1

" + + "

They can check this by looking for the following setting in the my.ini file in their MySQL installation directory:

" + + "
lower_case_table_names=1

" + "

For more technical information on case sensitivity in MySQL, have a look at " + "the documentation on the subject

"; } diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs index 389650d606..52ea11e572 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs @@ -317,11 +317,10 @@ namespace Umbraco.Core.Persistence.SqlSyntax { db.OpenSharedConnection(); // Need 4 @ signs as it is regarded as a parameter, @@ escapes it once, @@@@ escapes it twice - var lowerCaseFileSystem = db.Fetch("SELECT @@@@Global.lower_case_file_system"); var lowerCaseTableNames = db.Fetch("SELECT @@@@Global.lower_case_table_names"); - if(lowerCaseFileSystem.Any() && lowerCaseTableNames.Any()) - supportsCaseInsensitiveQueries = lowerCaseFileSystem.First() == 1 && lowerCaseTableNames.First() == 1; + if(lowerCaseTableNames.Any()) + supportsCaseInsensitiveQueries = lowerCaseTableNames.First() == 1; } catch(Exception ex) { From d4d21c18b22401ee2b684f1cd3b0d5e1a45c8802 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 28 Jun 2013 14:21:00 +0200 Subject: [PATCH 2/2] Correct little mistake in nuspec file --- build/NuSpecs/UmbracoCms.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index e3b5a9ed36..5093dbc651 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -21,7 +21,7 @@ - +