File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 11
22MASTER
33
4+ * Insert queries that include the word "insert" as a partial column name with the word
5+ "id" as a value were falsely being matched as identity inserts. [Sean Caffery/bfabry]
6+
47* Delegate all low level #raw_connection calls to #raw_connection_run and #raw_connection_do
58 which abstract out the low level modes in the connection options at that point. [Ken Collins]
69
Original file line number Diff line number Diff line change @@ -942,7 +942,7 @@ def query_requires_identity_insert?(sql)
942942 if insert_sql? ( sql )
943943 table_name = get_table_name ( sql )
944944 id_column = identity_column ( table_name )
945- id_column && sql =~ /INSERT[^(]+\( [^)]*\b (#{ id_column . name } )\b ,?[^)]*\) /i ? quote_table_name ( table_name ) : false
945+ id_column && sql =~ /^ \s * INSERT[^(]+\( [^)]*\b (#{ id_column . name } )\b ,?[^)]*\) /i ? quote_table_name ( table_name ) : false
946946 else
947947 false
948948 end
You can’t perform that action at this time.
0 commit comments