[Approved] Improve support for analog cards that use software encoders (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Hi

    The MS SQL added in this patch is bugged and needs to be fixed by someone, as reported in internal forums.


    Code:
    ALTER TABLE SoftwareEncoder ADD [S]COLUMN[/S] "reusable" bit NOT NULL DEFAULT 1
    GO
    
    INSERT INTO Setting (tag, value) VALUE(S) ('softwareEncoderReuseLimit', '0')
    GO

    And when
    Code:
    UPDATE Version SET versionNumber = 58
    GO

    is executed, it's missing a hard return to put GO on the next line.

    :D
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Thing is, I don't understand why the last "GO" is not on a newline, it is if you show the changes in WinMerge:

    Code:
    ALTER TABLE SoftwareEncoder ADD COLUMN "reusable" bit NOT NULL DEFAULT 1
    GO
    
    INSERT INTO Setting (tag, value) VALUE ('softwareEncoderReuseLimit', '0')
    GO
    
    UPDATE Version SET versionNumber = 58
    GO

    But when it is executed, GO is on the same line as versionNumber = 58 which will throw and SQL-error.

    Anyways, the fixed SQL should be:

    Code:
    ALTER TABLE SoftwareEncoder ADD "reusable" bit NOT NULL DEFAULT 1
    GO
    
    INSERT INTO Setting (tag, value) VALUES ('softwareEncoderReuseLimit', '0')
    GO
    
    UPDATE Version SET versionNumber = 58
    GO
     

    Attachments

    • 58_upgrade_sqlserver_database.sql.patch
      657 bytes

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi guys

    Yes, likely to be \n rather than \r\n. Sorry for the trouble this is causing. I don't have SQL Server to test with. :oops:
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    I think it's because of missing newline at the end of the file. I added one. Pls confirm the fixed file in r27628 :)

    I just installed 27628 succesfully on a clean setup, so fix is confirmed. Should work for upgrade as well, since the SQL is the same.
     

    Users who are viewing this thread

    Top Bottom