View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Problem with tempupdate table - ProjeQtOr
 

Problem with tempupdate table

More
17 Dec 2024 21:31 #1 by fxandrei
So i can see that there is a tempupdate table that has this structure:
CREATE TABLE `${prefix}tempupdate` (
  `id` int(12),
  `refType` varchar(100) DEFAULT NULL,
  `refId` int(12)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci ;

I can see that it does not have a primary key.

Is there any reason for that ?
Im asking this because it causes problems if i want to use it in a mysql cluster for example, where it is required for all tables to have pk.

Could it have a primary key ? 

Please Log in or Create an account to join the conversation.

More
19 Dec 2024 10:00 #2 by maxca
Replied by maxca on topic Problem with tempupdate table
Hello ???
Yes, this is a technical table and there will be no primary key.

Please Log in or Create an account to join the conversation.

More
19 Dec 2024 10:46 - 19 Dec 2024 10:49 #3 by fxandrei
This is a big problem. Because of this it cant be used in a mysql cluster. For that it is required for any table to have primary keys.

This is from the docs:  MySQL :: MySQL 9.0 Reference Manual :: 20.3.1 Group Replication Requirements

Primary Keys.  Every table that is to be replicated by the group must have a defined primary key, or primary key equivalent where the equivalent is a non-null unique key. Such keys are required as a unique identifier for every row within a table, enabling the system to determine which transactions conflict by identifying exactly which rows each transaction has modified.
Last edit: 19 Dec 2024 10:49 by fxandrei.

Please Log in or Create an account to join the conversation.

More
19 Dec 2024 11:18 #4 by babynus
You can remove thos table from replication group.
This is a temporary table that will be used only for some migration updates (not used for long)

If you please you can add a PK on (id, refType, refId)
Yes, all columns...

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
19 Dec 2024 13:21 - 19 Dec 2024 13:33 #5 by fxandrei
I think will add that composite pk, i think its better then to mess with the group replication.
Thanks
Last edit: 19 Dec 2024 13:33 by fxandrei.

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.054 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.