Change schemas.Column to use int64 #2160

Merged
lunny merged 4 commits from zeripath/xorm:length-as-int64 into master 2022-07-14 05:55:24 +00:00
Contributor

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 2022-07-12 17:54:03 +00:00
Change schemas.Column to use int64
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>
Some checks failed
continuous-integration/drone/pr Build is failing
72bfadeefd
First-time contributor
    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 2022-07-13 01:33:27 +00:00
lunny approved these changes 2022-07-13 01:46:47 +00:00
lunny left a comment
Owner

Except tests

Except tests
wxiaoguang approved these changes 2022-07-13 06:35:28 +00:00
zeripath added 1 commit 2022-07-13 19:28:48 +00:00
fix test
Signed-off-by: Andrew Thornton <art27@cantab.net>
Some checks failed
continuous-integration/drone/pr Build is failing
9278b05d7e
Author
Contributor

Fixed the test.

Fixed the test.
zeripath added 1 commit 2022-07-13 19:58:38 +00:00
come on drone
Signed-off-by: Andrew Thornton <art27@cantab.net>
Some checks failed
continuous-integration/drone/pr Build is failing
f34f97d15b
Author
Contributor

now it seems like drone is playing up.

now it seems like drone is playing up.
zeripath added 1 commit 2022-07-13 20:19:21 +00:00
come on drone 2
Signed-off-by: Andrew Thornton <art27@cantab.net>
All checks were successful
continuous-integration/drone/pr Build is passing
1f504c6518
lunny merged commit c3bce55620 into master 2022-07-14 05:55:24 +00:00
lunny added this to the 1.3.2 milestone 2022-07-14 05:55:33 +00:00
zeripath deleted branch length-as-int64 2022-07-14 08:56:57 +00:00
Sign in to join this conversation.
No description provided.