[MDEV-28902] Error while add a primary key on an empty created table on MariadDB 10.6.1 Created: 2022-06-20 Updated: 2022-08-08 Resolved: 2022-08-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Francesco Rossi | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In MariaDB 10.6.1 and other versions when I created a new empty table and tried to add a PK I got this exception: `> add primary key on table_1 (date, id_a, id_b) ...Exception: SQLSTATE[HY000]: General error: 1194 Table 'table_1' is marked as crashed and should be repaired` If I do the same thing on a table already created and populated nothing go wrong. MariaDB runs on a docker container. |
| Comments |
| Comment by Daniel Black [ 2022-06-21 ] |
|
What is the sequence of statements that ./yii migrate generates that occurs on table_1? What is the original show create table table_1? Can you show the container logs? |
| Comment by Francesco Rossi [ 2022-06-22 ] |
|
if I do the same operation manually I get the same error |
| Comment by Sergei Golubchik [ 2022-07-03 ] |
|
do you have the table structure? like, what does show create table say? |
| Comment by Francesco Rossi [ 2022-07-04 ] |
|
CREATE TABLE `table_1` ( show create table command not work because the execution of creation returns error SQLSTATE[HY000] so the table is not created. |
| Comment by Sergei Golubchik [ 2022-07-08 ] |
|
Few thoughts:
|