Browse Source

Removed S0 from BadSqlGrammarException codes

S0 doesn't seem to be universally used for SQL grammar problems: see MS SQL Server's RAISERROR. This was reported years back; not sure why the fix didn't actually appear in the codebase back then.

Issue: SPR-10902
pull/358/head
Juergen Hoeller 11 years ago
parent
commit
d9b620381e
  1. 3
      spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLStateSQLExceptionTranslator.java

3
spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLStateSQLExceptionTranslator.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -62,7 +62,6 @@ public class SQLStateSQLExceptionTranslator extends AbstractFallbackSQLException @@ -62,7 +62,6 @@ public class SQLStateSQLExceptionTranslator extends AbstractFallbackSQLException
BAD_SQL_GRAMMAR_CODES.add("37"); // Syntax error dynamic SQL
BAD_SQL_GRAMMAR_CODES.add("42"); // General SQL syntax error
BAD_SQL_GRAMMAR_CODES.add("65"); // Oracle: unknown identifier
BAD_SQL_GRAMMAR_CODES.add("S0"); // MySQL uses this - from ODBC error codes?
DATA_INTEGRITY_VIOLATION_CODES.add("01"); // Data truncation
DATA_INTEGRITY_VIOLATION_CODES.add("02"); // No data found

Loading…
Cancel
Save