We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbef41c commit 93266acCopy full SHA for 93266ac
src/providers/ogr/qgsogrprovider.cpp
@@ -2241,10 +2241,19 @@ QVariant QgsOgrProvider::maximumValue( int index )
2241
2242
QString QgsOgrProvider::quotedIdentifier( QString field )
2243
{
2244
- field.replace( '\\', "\\\\" );
2245
- field.replace( '"', "\\\"" );
2246
- field.replace( "'", "\\'" );
2247
- return field.prepend( "\"" ).append( "\"" );
+ if ( ogrDriverName == "MySQL" )
+ {
+ field.replace( '\\', "\\\\" );
+ field.replace( "`", "``" );
2248
+ return field.prepend( "`" ).append( "`" );
2249
+ }
2250
+ else
2251
2252
2253
+ field.replace( '"', "\\\"" );
2254
+ field.replace( "'", "\\'" );
2255
+ return field.prepend( "\"" ).append( "\"" );
2256
2257
}
2258
2259
bool QgsOgrProvider::syncToDisc()
0 commit comments