progaudi / progaudi.tarantool

.net connector for Tarantool NoSql database.
MIT License
48 stars 16 forks source link

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

Open enescaglar opened 4 years ago

enescaglar commented 4 years ago

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

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

Thank you.

ilnardinio commented 4 years ago

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

enescaglar commented 4 years ago

Thank you for your comment.

ilnardinio commented 4 years ago

For quick solution you can see my fork with fix https://github.com/progaudi/progaudi.tarantool/commit/c87f7aa90aadc18c8b915eb32ba4f39188c7dd24

enescaglar commented 4 years ago

Thank you, it worked with your fix.

AuthenticEshkinKot commented 3 years ago

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