Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7703 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] SQL Server bug fixes: support for real datatype, descending indexes and schema dumping tables without any indexes

Reported by: tomafro Assigned to: bitsweat
Priority: normal Milestone: 1.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: sqlserver tested
Cc: Jakob, S, bryanl

Description

Three small bug fixes combined into one patch.

The fixes are:

Support for the real datatype, now recognised as float(4) (see #7333)

Return correct column name when dumping the schema of a table with descending indexes (see #7057)

Support for dumping schemas on tables with no indexes. Previously, when the stored procedure used to discover indexes against a table returned no results, the query would fail rather than return the empty array.

All these fixes either have new tests (the first two) or fix existing failing tests, and have been tested against both SQL Server 2000 and 2005.

Attachments

many_minor_fixes_for_sqlserver_adapter.diif (6.2 kB) - added by tomafro on 03/03/07 10:04:41.
many_minor_fixes_for_sqlserver_adapter.diff (6.2 kB) - added by tomafro on 03/03/07 10:06:20.

Change History

03/03/07 09:52:00 changed by bitsweat

  • owner changed from core to bitsweat.

Thanks for the cleanup. Could you fix the DOS line endings? They make the diff unusable.

03/03/07 09:52:32 changed by bitsweat

By 'unusable' I mean impossible to distinguish what changed :)

03/03/07 09:53:47 changed by tomafro

No problem. I'll sort it out as soon as I've had breakfast.

03/03/07 10:04:41 changed by tomafro

  • attachment many_minor_fixes_for_sqlserver_adapter.diif added.

03/03/07 10:06:20 changed by tomafro

  • attachment many_minor_fixes_for_sqlserver_adapter.diff added.

03/03/07 10:07:44 changed by tomafro

Right, fifth time lucky. The line-endings seem to be sorted (the patch is certainly much cleaner) and I've renamed it .diff so the nice trac highlighting works.

03/03/07 11:03:58 changed by Jakob S

  • cc set to Jakob, S.

03/03/07 12:19:19 changed by bryanl

  • cc changed from Jakob, S to Jakob, S, bryanl.

03/03/07 14:22:00 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

08/02/07 08:12:09 changed by EdvardM

Ok, I see that the version mentioned in the ticket is edge, but the issue should probably be fixed in 1.2.4 as well. When applying to 1.2.3, I get

Updated to revision 7259.
$ patch -F50 -p0 -l < many_minor_fixes_for_sqlserver_adapter.diff
(Stripping trailing CRs from patch.)
patching file activerecord/test/adapter_test_sqlserver.rb
Hunk #1 succeeded at 3 with fuzz 3.
Hunk #2 FAILED at 14.
Hunk #3 succeeded at 31 with fuzz 3.
1 out of 3 hunks FAILED -- saving rejects to file activerecord/test/adapter_test_sqlserver.rb.rej
(Stripping trailing CRs from patch.)
patching file activerecord/test/fixtures/db_definitions/schema.rb
Hunk #1 succeeded at 57 with fuzz 2 (offset -7 lines).
(Stripping trailing CRs from patch.)
patching file activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
Hunk #4 succeeded at 417 (offset -5 lines).
Hunk #5 succeeded at 428 (offset -5 lines).
Hunk #6 succeeded at 473 (offset -5 lines).
$

any chance to get the patch for 1.2.3 too?