Fix ForUpdate can work with postgres #1

Open
demachitse wants to merge 1 commits from demachitse/fix-for-update-with-postgres into master
Owner

Overview

Issue

fixed xorm/xorm#2345

Test

Test code in other repository
https://gitea.com/demachitse/xorm-forupdate-test-with-postgres

  1. Clone https://gitea.com/demachitse/xorm-forupdate-test-with-postgres and open cmd/main.go with VSCode
  2. Set break point in main.go as below image.
  3. Press F5 to debug main.go
  4. Stop at break point, and ForUpdate lock record in dummy_table_a.
  5. Update record id xid000000000000000a1 in dummy_table_a by any ODBC software.
  6. Update is waiting to unlock dummy_table_a by main.go.
  7. Resume main.go
  8. main.go succeed Update and any ODBC software also succeed Update.
# Overview - fix xorm to It can use ForUpdate with PostgreSQL. - Original Repository. <https://gitea.com/xorm/xorm> ## Issue fixed https://gitea.com/xorm/xorm/issues/2345 ## Test Test code in other repository <https://gitea.com/demachitse/xorm-forupdate-test-with-postgres> 1. Clone <https://gitea.com/demachitse/xorm-forupdate-test-with-postgres> and open cmd/main.go with VSCode 2. Set break point in main.go as below image. 3. Press F5 to debug main.go 4. Stop at break point, and ForUpdate lock record in dummy_table_a. 5. Update record id `xid000000000000000a1` in dummy_table_a by any ODBC software. 6. Update is waiting to unlock dummy_table_a by main.go. 7. Resume main.go 8. main.go succeed Update and any ODBC software also succeed Update.
demachitse added 1 commit 2023-10-23 02:34:05 +00:00
fix ForUpdate can work with postgres
Some checks failed
test cockroach / test cockroach (pull_request) Has been cancelled
test mariadb / test mariadb (pull_request) Has been cancelled
test mssql / test mssql (pull_request) Has been cancelled
test mysql / test mysql (pull_request) Has been cancelled
test mysql8 / test mysql8 (pull_request) Has been cancelled
test postgres / test postgres (pull_request) Has been cancelled
test sqlite / unit test & test sqlite (pull_request) Has been cancelled
test tidb / test tidb (pull_request) Has been cancelled
45c20cc205
Author
Owner

@lunny
I forked xorm and fixed xorm/xorm#2345
but I don't know merge forked repository to base repository.
(I know it in github.com but I don't know in gitea.com)

if you I did wrong approach, tell me please.

@lunny I forked xorm and fixed https://gitea.com/xorm/xorm/issues/2345 but I don't know merge forked repository to base repository. (I know it in github.com but I don't know in gitea.com) if you I did wrong approach, tell me please.
demachitse changed title from WIP: fix ForUpdate can work with postgres to fix ForUpdate can work with postgres 2023-10-23 03:51:18 +00:00
demachitse changed title from fix ForUpdate can work with postgres to Fix ForUpdate can work with postgres 2023-10-23 03:51:26 +00:00
Some checks failed
test cockroach / test cockroach (pull_request) Has been cancelled
test mariadb / test mariadb (pull_request) Has been cancelled
test mssql / test mssql (pull_request) Has been cancelled
test mysql / test mysql (pull_request) Has been cancelled
test mysql8 / test mysql8 (pull_request) Has been cancelled
test postgres / test postgres (pull_request) Has been cancelled
test sqlite / unit test & test sqlite (pull_request) Has been cancelled
test tidb / test tidb (pull_request) Has been cancelled
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin demachitse/fix-for-update-with-postgres:demachitse/fix-for-update-with-postgres
git checkout demachitse/fix-for-update-with-postgres

Merge

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff demachitse/fix-for-update-with-postgres
git checkout master
git merge --ff-only demachitse/fix-for-update-with-postgres
git checkout demachitse/fix-for-update-with-postgres
git rebase master
git checkout master
git merge --no-ff demachitse/fix-for-update-with-postgres
git checkout master
git merge --squash demachitse/fix-for-update-with-postgres
git checkout master
git merge --ff-only demachitse/fix-for-update-with-postgres
git checkout master
git merge demachitse/fix-for-update-with-postgres
git push origin master
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: demachitse/xorm#1
No description provided.