Skip to content

Commit 30b3e24

Browse files
committed
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 (cherry picked from commit d9b6203)
1 parent 0a31892 commit 30b3e24

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -62,7 +62,6 @@ public class SQLStateSQLExceptionTranslator extends AbstractFallbackSQLException
6262
BAD_SQL_GRAMMAR_CODES.add("37"); // Syntax error dynamic SQL
6363
BAD_SQL_GRAMMAR_CODES.add("42"); // General SQL syntax error
6464
BAD_SQL_GRAMMAR_CODES.add("65"); // Oracle: unknown identifier
65-
BAD_SQL_GRAMMAR_CODES.add("S0"); // MySQL uses this - from ODBC error codes?
6665

6766
DATA_INTEGRITY_VIOLATION_CODES.add("01"); // Data truncation
6867
DATA_INTEGRITY_VIOLATION_CODES.add("02"); // No data found

0 commit comments

Comments
 (0)