Skip to content

bug:gorm scan func not capture error driver:clickhouse #6277

@201430098137

Description

@201430098137

[GORM Playground Link](bug:gorm scan func not capture error driver:clickhouse)

go-gorm/playground#591

I query clickhouse, it return not data and not error. but clichouse has datas exectly.

I use follow example to show it.
I append data into clickhouse

image
after that, I use follow sql query clickhouse

select * from users limit 10000 settings max_memory_usage = 2;

code like that

//execute will be fail; because exceed clickhouse query memory limit
	//but not return error
	var result []*User = make([]*User, 0)
	err = DB.Raw("select * from users limit 10000 settings max_memory_usage = 2;").Scan(&result).Error
	if err == nil {
		t.Errorf("error not capture")
	}

I expect it return error, but not

I excute sql
image
there should return memory limit exceed error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions