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

Error inserting data into the space #355

Open
gvsafronov opened this issue Jun 16, 2024 · 3 comments
Open

Error inserting data into the space #355

gvsafronov opened this issue Jun 16, 2024 · 3 comments
Labels
C-bug Something isn't working D-server Related to the server

Comments

@gvsafronov
Copy link

gvsafronov commented Jun 16, 2024

Hello!
I came across the following trouble in Skytable: when I want to insert some values into the space in database, I saw error: "server error code: 109"

Steps to reproduce the behavior:

0. Open Terminal
1. Start skyd. $ ./skyd --auth-root-password password12345678
2. Run skysh. $ ./skysh and enter password password12345678
3. Create space: $ CREATE SPACE IF NOT EXISTS myspace
$ CREATE MODEL IF NOT EXISTS myspace.mymodel( username: string, password: string )
4. Switch to created space $ USE myspace
5. Then I try to insert the data into a space myspace> INSERT INTO mymodel { username: "George", pass: "qwerty!3421")
An error appear: "server error code: 109"

I created a model with two columns but unfortunately I can't insert a 2-tuple in two columns.

Operating system: Linux Fedora 40
Version Skytable: 0.8.2; 0.8.3

Best regards,
Grigorii Safronov

@gvsafronov gvsafronov added C-bug Something isn't working D-server Related to the server labels Jun 16, 2024
@gvsafronov gvsafronov changed the title Server: Error inserting data into the space Jun 16, 2024
@KayCynk
Copy link

KayCynk commented Jul 17, 2024

Hello Grigorii,
your code:
INSERT INTO mymodel { username: "George", pass: "qwerty!3421")

try this:
INSERT INTO mymodel {username: "George", password: "qwerty!3421"}

2 things modified, 'pass' changed to 'password' and the end of your command ')' changed to '}'

Best KC

@gvsafronov
Copy link
Author

Hello Kay!

Unfortunately command INSERT INTO mymodel {username: "George", password: "qwerty!3421"}also doesn't work.
The same error.

Best regards,
Grigorii

@ohsayan
Copy link
Member

ohsayan commented Jul 18, 2024

Hi @gvsafronov. Please try this sequence of operations:

CREATE SPACE IF NOT EXISTS myspace
CREATE MODEL IF NOT EXISTS myspace.mymodel(username: string, password: string)
INSERT INTO myspace.mymodel { username: "George", password: "qwerty!3421" }

I've just tried this locally and it works as expected. If you don't want to specify myspace.mymodel every time, you can choose to run use myspace once and it'll be inherited for all your DML queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Something isn't working D-server Related to the server
Projects
None yet
Development

No branches or pull requests

3 participants