{"id":19989024,"url":"https://github.com/icemap/tidb-savepoint","last_synced_at":"2025-08-20T16:19:32.451Z","repository":{"id":119433433,"uuid":"476964962","full_name":"Icemap/tidb-savepoint","owner":"Icemap","description":"Replicating the example of TiDB not supporting savepoint","archived":false,"fork":false,"pushed_at":"2022-04-02T06:21:01.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T11:49:35.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Icemap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-02T06:12:48.000Z","updated_at":"2022-04-02T06:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"0922ddea-a555-4153-9f73-9d124992c419","html_url":"https://github.com/Icemap/tidb-savepoint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-savepoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-savepoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-savepoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-savepoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Icemap","download_url":"https://codeload.github.com/Icemap/tidb-savepoint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241430299,"owners_count":19961633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T04:45:10.066Z","updated_at":"2025-03-01T21:42:51.749Z","avatar_url":"https://github.com/Icemap.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tidb-savepoint\n\nReplicating the example of TiDB not supporting `savepoint` feature\n\n## Run\n\nJust change to your `MySQL` and `TiDB` dsn at main function\n\n```go\nfunc main() {\n\tfmt.Printf(\"\\n\\nMySQL:\\n\")\n\tdbSavepoint(\"root:123456@tcp(127.0.0.1:3306)/test?charset=utf8mb4\u0026parseTime=True\u0026loc=Local\")\n\n\tfmt.Printf(\"\\n\\nTiDB:\\n\")\n\tdbSavepoint(\"root:@tcp(127.0.0.1:4000)/test\")\n}\n```\n\nAnd then, run it:\n\n```bash\ngo build -o bin/tidb-savepoint\n./bin/tidb-savepoint\n```\n\n## Output\n\nYou will get output log like this:\n\n```\nMySQL:\nid: 1, coins: 1, goods: 1\nid: 3, coins: 1, goods: 1\n\n\nTiDB:\n\n2022/04/02 13:59:48 /Users/cheese/go/pkg/mod/gorm.io/driver/mysql@v1.3.2/mysql.go:397 Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 9 near \"SAVEPOINT sp0x102cf8960\" \n[1.119ms] [rows:0] SAVEPOINT sp0x102cf8960\n\n2022/04/02 13:59:48 /Users/cheese/go/pkg/mod/gorm.io/driver/mysql@v1.3.2/mysql.go:397 Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 9 near \"SAVEPOINT sp0x102cf8960\" \n[0.001ms] [rows:0] SAVEPOINT sp0x102cf8a00\nid: 1, coins: 1, goods: 1\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Ftidb-savepoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficemap%2Ftidb-savepoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Ftidb-savepoint/lists"}