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

Mutations Error #48

Open
Genuineh opened this issue Mar 20, 2022 · 0 comments
Open

Mutations Error #48

Genuineh opened this issue Mar 20, 2022 · 0 comments
Assignees

Comments

@Genuineh
Copy link

Genuineh commented Mar 20, 2022

Hi, i got error when i use mutations operation delete like

using var cnn = new ClickHouseConnection(settings.ToString());

await cnn.OpenAsync().ConfigureAwait(false);

using var cmd = cnn.CreateCommand("INSERT INTO cktest SELECT @id, @name, 1");

cmd.Parameters.AddWithValue("id", 1);
cmd.Parameters.AddWithValue("name", "ok");

var text = cmd.CommandText;

var res = await cmd.ExecuteNonQueryAsync().ConfigureAwait(false);

using var cmd2 = cnn.CreateCommand("ALTER TABLE cktest delete WHERE id=@id");

cmd2.Parameters.AddWithValue("id", 1);

res = await cmd2.ExecuteNonQueryAsync().ConfigureAwait(false);

Error

Data still exist after i run detele code and I found mutations logs use "SELECT database,table, command, create_time, is_done FROM system.mutations LIMIT 10" , I got result like

database table command create_time is_done
default cktest DELETE WHERE id = (SELECT _d18374be9ae14385a55461be204f5a71.id FROM _d18374be9ae14385a55461be204f5a71) 2022-03-20 17:17:45 0

the operation blocked and it may be because the error command

I got right result when i run "ALTER TABLE cktest DELETE WHERE id=1" in cli

The mutations logs like

database table command create_time is_done
default cktest DELETE WHERE id = 1 2022-03-20 17:18:25 1

Clickhouse Server Version: v22.2.3.5

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