Change schemas.Column to use int64 #2160

Merged
lunny merged 4 commits from zeripath/xorm:length-as-int64 into master 1 month ago
Collaborator

The largest size of a column in SQL is above the largest integer that
can be stored in an int/int32. Running go on a 32bit machine will result
in ints being mapped to int32 and thus interpretting the schema will
fail.

In this PR we change the schema.Column to use int64 which will allow
Gitea to fix https://github.com/go-gitea/gitea/issues/20161

Signed-off-by: Andrew Thornton art27@cantab.net

The largest size of a column in SQL is above the largest integer that can be stored in an int/int32. Running go on a 32bit machine will result in ints being mapped to int32 and thus interpretting the schema will fail. In this PR we change the schema.Column to use int64 which will allow Gitea to fix https://github.com/go-gitea/gitea/issues/20161 Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added 1 commit 1 month ago
continuous-integration/drone/pr Build is failing Details
72bfadeefd
Change schemas.Column to use int64
    engine_test.go:318: 

        	Error Trace:	engine_test.go:318

        	Error:      	Not equal: 

        	            	expected: int64(65535)

        	            	actual  : int(65535)

        	Test:       	TestGetColumnsLength

--- FAIL: TestGetColumnsLength (0.06s)
``` engine_test.go:318: Error Trace: engine_test.go:318 Error: Not equal: expected: int64(65535) actual : int(65535) Test: TestGetColumnsLength --- FAIL: TestGetColumnsLength (0.06s) ```
lunny added the
kind/bug
label 1 month ago
lunny approved these changes 1 month ago
lunny left a comment
Owner

Except tests

Except tests
wxiaoguang approved these changes 1 month ago
zeripath added 1 commit 1 month ago
continuous-integration/drone/pr Build is failing Details
9278b05d7e
fix test
Poster
Collaborator

Fixed the test.

Fixed the test.
zeripath added 1 commit 1 month ago
continuous-integration/drone/pr Build is failing Details
f34f97d15b
come on drone
Poster
Collaborator

now it seems like drone is playing up.

now it seems like drone is playing up.
zeripath added 1 commit 1 month ago
continuous-integration/drone/pr Build is passing Details
1f504c6518
come on drone 2
lunny merged commit c3bce55620 into master 1 month ago
lunny added this to the 1.3.2 milestone 1 month ago
zeripath deleted branch length-as-int64 1 month ago

Reviewers

lunny approved these changes 1 month ago
wxiaoguang approved these changes 1 month ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as c3bce55620.
Sign in to join this conversation.
Loading…
There is no content yet.