-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug TiDB Documentation: 使用 PyMySQL 连接到 TiDB #15937
Comments
/assign |
The doc has been verified with WSL2, python3.10 and TiDB Serverless, the output is consistent. $ python pymysql_example.py
{'id': 'test', 'coins': 1, 'goods': 1}
number of players: 1920
{'id': 'test', 'coins': 1, 'goods': 1}
{'id': 'test0', 'coins': 10000, 'goods': 10000}
{'id': 'test1', 'coins': 10000, 'goods': 10000}
buy player 1 coins not enough
trade success
{'id': '1', 'coins': 0, 'goods': 2}
{'id': '2', 'coins': 114614, 'goods': 18} |
@jyf111 Appreciate your time and effort for this task. To get the points of this issue, would you please resubmit the result as a comment during the event dates/time as follows?
|
@jyf111 thanks for your contributions. Just a friendly reminder to resubmit your comment by January 12 at 07:59 UTC (your local time) 🙏 |
The doc has been verified with WSL2, python3.10 and TiDB Serverless, the output is consistent. $ python pymysql_example.py
{'id': 'test', 'coins': 1, 'goods': 1}
number of players: 1920
{'id': 'test', 'coins': 1, 'goods': 1}
{'id': 'test0', 'coins': 10000, 'goods': 10000}
{'id': 'test1', 'coins': 10000, 'goods': 10000}
buy player 1 coins not enough
trade success
{'id': '1', 'coins': 0, 'goods': 2}
{'id': '2', 'coins': 114614, 'goods': 18} The doc is generally okay, with some minor issues. e.g., in the example code: with get_connection(autocommit=True) as conn:
with conn.cursor() as cur:
player = ("1", 1, 1)
**cursor**.execute("INSERT INTO players (id, coins, goods) VALUES (%s, %s, %s)", player)
def create_player(cursor: DictCursor, player: tuple) -> None:
cursor.execute("INSERT INTO players (id, coins, goods) VALUES (%s, %s, %s)", player) |
Hi @jyf111, many thanks for your contribution. If you're interested, feel free to create a pull request (PR) to update the documentation directly. |
@jyf111 非常感谢您对使用 PyMySQL 连接到 TiDB文档的测试❤️。因为测试后创建的文档修改 PR #16160 已合并,此 issue 已自动关闭。如果后续您再遇到任何文档问题,欢迎在此文档仓库提 issue 或者 PR 🚀 |
此 issue 为 Debug TiDB Documentation: TiDB 中文文档测试说明・Issue #15772・pingcap/docs-cn 的 sub-issue,目的是为了测试和验证使用 PyMySQL 连接到 TiDB 文档。
请参考 #15772 中的说明测试该文档。
非常感谢您对测试和验证文档的贡献!
The text was updated successfully, but these errors were encountered: