Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected key: Data, Metadata is expected, but got SqlOptions Error #149

Open
enescaglar opened this issue Jul 16, 2020 · 5 comments
Open

Comments

@enescaglar
Copy link

enescaglar commented Jul 16, 2020

Hi,

When I try to create a table, I am getting the following error but even if the error is thrown when I checked the spaces from tarantool the space is created.

Here is the code I am using (target framework is .net core 3.1) :
using var tarantoolClient = await Box.Connect("localhost", 3301); await tarantoolClient.ExecuteSql("CREATE TABLE TEST (ID INT PRIMARY KEY, NAME VARCHAR(200) )");

System.AggregateException
HResult=0x80131500
Message=One or more errors occurred. (Unexpected key: Data, Metadata is expected, but got SqlOptions.)
Source=System.Private.CoreLib
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()

Inner Exception 1:
ArgumentException: Unexpected key: Data, Metadata is expected, but got SqlOptions.

And this is the result from tarantool command line:

tarantool> box.space.TEST

  • engine: memtx
    before_replace: 'function: 0x41dcbad0'
    on_replace: 'function: 0x41dcbaa8'
    ck_constraint: []
    field_count: 2
    temporary: false
    index:
    0: &0
    unique: true
    parts:
    - type: integer
    is_nullable: false
    fieldno: 1
    id: 0
    space_id: 516
    type: TREE
    name: pk_unnamed_TEST_1
    pk_unnamed_TEST_1: *0
    is_local: false
    enabled: true
    name: TEST
    id: 516

What am I missing here, what could be the problem?

Thank you.

@ilnardinio
Copy link
Contributor

ilnardinio commented Jul 17, 2020

There are changes in binary protocol of tarantool. See #148

@enescaglar
Copy link
Author

Thank you for your comment.

@ilnardinio
Copy link
Contributor

For quick solution you can see my fork with fix c87f7aa

@enescaglar
Copy link
Author

Thank you, it worked with your fix.

@AuthenticEshkinKot
Copy link
Contributor

I've got the same error on INSERT query. Fix created by @ilnardinio solved this issue.

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

No branches or pull requests

3 participants