Skip to content

AppVeyor - testing on SQL Server [WIP]#193

Closed
dg wants to merge 9 commits intomasterfrom
test
Closed

AppVeyor - testing on SQL Server [WIP]#193
dg wants to merge 9 commits intomasterfrom
test

Conversation

@dg
Copy link
Copy Markdown
Owner

@dg dg commented Nov 4, 2015

@dg dg mentioned this pull request Nov 4, 2015
@dg dg changed the title AppVeyor - testing on Windows AppVeyor - testing on Windows [WIP] Nov 4, 2015
@mhujer
Copy link
Copy Markdown

mhujer commented Nov 4, 2015

I've tried to make dibi run there but I did not succed. See master...mhujer:appveyor tests/databases.appveyor.ini may be useful for this PR

@dg dg force-pushed the test branch 7 times, most recently from a2d4b51 to fb1e1bc Compare November 4, 2015 15:53
@dg dg force-pushed the test branch 4 times, most recently from b757cf8 to db15d4f Compare November 4, 2015 16:35
@dg dg changed the title AppVeyor - testing on Windows [WIP] AppVeyor - testing on SQL Server [WIP] Nov 4, 2015
@dg
Copy link
Copy Markdown
Owner Author

dg commented Nov 4, 2015

CI AppVeyor works, but some tests fails on SQL Server.

@dg dg force-pushed the master branch 2 times, most recently from 5adaf22 to f327212 Compare November 7, 2015 17:56
@DiGi
Copy link
Copy Markdown

DiGi commented Nov 8, 2015

Few notes about MSSQL:

  1. You should always use schemaName.objectName sytanx, everywhere. In CREATE scripts, in all DML. Table dbo.customers can be very different from sales.customers. MSSQL can cache plans and reuse them later
  2. MSSQL doesn't support JOINS with USING syntax
  3. Preffered TOP syntax is now TOP (n), not TOP n
  4. You should always use ORDER BY if you use TOP. MSSQL does not guarantee any implicit ordering. For different ID you can get different plan using different index
  5. You should alias computed columns, even in subselects

Related failures:

  1. Connection.fetch.phpt(78), assert line 93, because note 2.
  2. Just guess without SQL: Isn't generated SQL someting like SELECT COUNT() FROM (SELECT COUNT() FROM products ORDER BY product_id)? If so then there should be SELECT TOP (1) in inner SELECT
  3. Error Fluent.select.phpt(100), generated SQL is probably "OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY" or "SELECT TOP 1". Test fails because it is not "odbc" and definitely is not "LIMIT 1"
  4. Result.meta.phpt(19) will not work because note 2.
  5. meta.phpt(20) same issue with test, not running "odbc" and you didn't get LIMIT 2

I don't have working PHP environment right now, but I hope that this can point you at some issues. Special 'odbc' code can be sometimes used for MSSQL too, but maybe it is better to write correct test.

@castamir
Copy link
Copy Markdown
Contributor

ping @dg

Is there any progress? I am trying to migrate my application to ms sql and so far I found out that fetch issue (using OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY) is still there.

@dg
Copy link
Copy Markdown
Owner Author

dg commented Jan 22, 2016

I will be glad if you send a pull request. I do not use (and know) MS SQL.

@castamir
Copy link
Copy Markdown
Contributor

Ok, I'll try to fix this driver by myself

@dg
Copy link
Copy Markdown
Owner Author

dg commented Jan 22, 2016

💯

@dg dg closed this Feb 9, 2016
@dg dg deleted the test branch March 11, 2018 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants