Skip to content

Correct the database mirroring partner envchange handle code.#110

Merged
mjaric merged 1 commit intoelixir-ecto:masterfrom
andrei-mihaila:master
Jun 19, 2020
Merged

Correct the database mirroring partner envchange handle code.#110
mjaric merged 1 commit intoelixir-ecto:masterfrom
andrei-mihaila:master

Conversation

@andrei-mihaila
Copy link
Copy Markdown
Contributor

Got this error when trying to do a query against an MSSQL version 14 instance (or 2017)

** (MatchError) no match of right hand side value: <<15, 69, 0, 67, 0, <redacted> ...>>                                                                                                                                            
    (tds 2.1.1) lib/tds/tokens.ex:362: Tds.Tokens.decode_envchange/2                                                                                                                         
    (tds 2.1.1) lib/tds/tokens.ex:52: Tds.Tokens.decode_tokens/2                                                                                                                             
    (tds 2.1.1) lib/tds/messages.ex:66: Tds.Messages.parse/3                                                                                                                                 
    (tds 2.1.1) lib/tds/protocol.ex:507: Tds.Protocol.decode/2                                                                                                                               
    (tds 2.1.1) lib/tds/protocol.ex:562: Tds.Protocol.login/1                                                                                                                                
    (tds 2.1.1) lib/tds/protocol.ex:408: Tds.Protocol.connect/2                                                                                                                              
    (db_connection 2.2.2) lib/db_connection/connection.ex:69: DBConnection.Connection.connect/2                                                                                              
    (connection 1.0.4) lib/connection.ex:622: Connection.enter_connect/5                                                                                                                     
    (stdlib 3.13) proc_lib.erl:226: :proc_lib.init_p_do_apply/3                                                                                                                              
Last message: nil                                                                                                                                                                            
State: Tds.Protocol

This pull request fixes it for me (used the other case clauses and this TDS doc to come up with the fix)

Also, thank you for this lib!

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 18, 2020

Coverage Status

Coverage decreased (-0.07%) to 72.904% when pulling 46afb5f on andrei-mihaila:master into 608bce7 on livehelpnow:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.1%) to 73.129% when pulling 46afb5f on andrei-mihaila:master into 608bce7 on livehelpnow:master.

@mjaric
Copy link
Copy Markdown
Member

mjaric commented Jun 18, 2020

Thanks, I will pass over other cases just in case and push this soon

@mjaric mjaric merged commit 11e2f91 into elixir-ecto:master Jun 19, 2020
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.

3 participants