-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Use TiDB with Prisma not successed #8964
Comments
You can refer to #5166 |
Understand, thanks. So when does TiDB could solve this problem? |
@Victorkangsh We will add this feature in the future. |
Once TiDB solves this problem, I would love to put TiDB's logo and related instructions on the index web of Prisma and use TiDB in best practice examples. TiDB almost perfectly solved the problem of prisma in distributed transactions. The infinitely horizontal expansion of the data access layer combined with the TiDB is really the best architecture. |
@Victorkangsh Cool! |
Confirming this still exists in master. There are actually two issues - the assertion says that the algorithm inplace is not supported, but I think since INSTANT is "better" it should be permitted. Basically this just needs to refuse if COPY is required. The second is that this is not supported as a multi-schema change: DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY auto_increment);
ALTER TABLE t1 ADD COLUMN `unionId` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, ADD UNIQUE INDEX `unionId_UNIQUE` (`unionId`(191) ASC), ALGORITHM = INPLACE;
ALTER TABLE t1 ADD COLUMN `unionId` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, ADD UNIQUE INDEX `unionId_UNIQUE` (`unionId`(191) ASC);
..
mysql> ALTER TABLE t1 ADD COLUMN `unionId` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, ADD UNIQUE INDEX `unionId_UNIQUE` (`unionId`(191) ASC), ALGORITHM = INPLACE;
ERROR 1846 (0A000): ALGORITHM=INPLACE is not supported. Reason: Cannot alter table by INPLACE. Try ALGORITHM=INSTANT.
mysql> ALTER TABLE t1 ADD COLUMN `unionId` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, ADD UNIQUE INDEX `unionId_UNIQUE` (`unionId`(191) ASC);
ERROR 8200 (HY000): Unsupported multi schema change
mysql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-859-gccfc9b2ad
Edition: Community
Git Commit Hash: ccfc9b2ad0dcf8e447210de5f559d7fc208db968
Git Branch: master
UTC Build Time: 2020-07-29 09:37:45
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
|
The first issue had been resolved by #19270 |
Question
Hi, I want deploy my prisma server with tidb, and it test well at small datamodel, but when i deploy a large datamodal it doesn't work. The error is here:
This datamodal is work well on mysql.
I am not sure which side can solve this problem better and look forward to the proposal.
The text was updated successfully, but these errors were encountered: