On a mySQL database, a strange phenomenon appeared. When I try to add a column to a table, the column is added, but the table is duplicated afterwards. It keeps duplicating tables if we try to add other columns and I do not know how to fix it or where it could come from. The SQL DB is hosted on Azure
Here is what the situation is like before trying to add a column :
SHOW tables;
('annotations',)
('dicoms',)
('image',)
('patient',)
('procedure_biopsy',)
('series',)
DESCRIBE annotations;
('nb_lesions', 'int(11)', 'YES', '', None, '')
('id_annotation', 'int(11)', 'NO', 'PRI', None, 'auto_increment')
('id_annotator', 'varchar(50)', 'YES', '', None, '')
('id_annotation_request', 'int(11)', 'YES', '', None, '')
('comments_to_annotator', 'text', 'YES', '', None, '')
('status', 'varchar(50)', 'YES', '', None, '')
('location_output', 'varchar(50)', 'YES', '', None, '')
('date_saved', 'date', 'YES', '', None, '')
('version', 'varchar(50)', 'YES', '', None, '')
('nb_bounding_boxes', 'int(11)', 'YES', '', None, '')
('purpose', 'varchar(50)', 'YES', '', None, '')
('id_image', 'int(11)', 'YES', '', None, '')
('type_annotation', 'varchar(50)', 'YES', '', None, '')
Now, if I send this request :
ALTER TABLE annotations ADD test_column varchar(50);
the requests performs successfully, and with "DESCRIBE annotations;", we get :
('nb_lesions', 'int(11)', 'YES', '', None, '')
('id_annotation', 'int(11)', 'NO', 'PRI', None, 'auto_increment')
('id_annotator', 'varchar(50)', 'YES', '', None, '')
('id_annotation_request', 'int(11)', 'YES', '', None, '')
('comments_to_annotator', 'text', 'YES', '', None, '')
('status', 'varchar(50)', 'YES', '', None, '')
('location_output', 'varchar(50)', 'YES', '', None, '')
('date_saved', 'date', 'YES', '', None, '')
('version', 'varchar(50)', 'YES', '', None, '')
('nb_bounding_boxes', 'int(11)', 'YES', '', None, '')
('purpose', 'varchar(50)', 'YES', '', None, '')
('id_image', 'int(11)', 'YES', '', None, '')
('type_annotation', 'varchar(50)', 'YES', '', None, '')
('test_column', 'varchar(50)', 'YES', '', None, '')
But the problem comes when we try to run "SHOW tables;" as it returns :
('annotations',)
('annotations',)
('dicoms',)
('image',)
('patient',)
('procedure_biopsy',)
('series',)
The table annotation is duplicated.
I also tried to check with dgForge and dataGrip how the data looks like, and I get 2 completely different results from those database explorers.
- With dgForge studio 2020 for mySQL, I see duplicated tables and other columns of the table are all duplicated. (but if we try to look at the data itself, columns does not seem duplicated)
- With dataGrip, I do not see any duplicated tables or duplicated columns anywhere
I really do not understand what's happening here. Any idea of were this type of issue could come from or what could be done to fix this strange behavior ? Thank you very much for your help anyways !