Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18645

RENAME TABLE conflict results in mysqld crash signal 11

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.2.19
    • N/A
    • Galera
    • None
    • MariaDB-server-10.2.19-1.el7.centos.x86_64
      galera-25.3.24-1.rhel7.el7.centos.x86_64
      Linux 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

    Description

      Schema change (add column) on MariaDB 10.2 Galera cluster done via pt-online-schema-change on master1 executed succesfully but results in conflict and mysqld crash ("mysqld got signal 11") on master1 and shutdown on master2.

      Third node is arbitrator. Only master1 receives write statements.

      Command and output from pt-online-schema-change (exited succesfully)

      $ pt-online-schema-change --alter "ADD parent_id int NULL" D=dname,t=message --execute -u adminuser -p somepassword --alter-foreign-keys-method=auto
       
      No slaves found.  See --recursion-method if host master1 has slaves.
      Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
      Operation, tries, wait:
        analyze_table, 10, 1
        copy_rows, 10, 0.25
        create_triggers, 10, 1
        drop_triggers, 10, 1
        swap_tables, 10, 1
        update_foreign_keys, 10, 1
      Child tables:
        `dbname`.`email_message` (approx. 3484119 rows)
        `dbname`.`message_attachment` (approx. 742761 rows)
        `dbname`.`message_contact_rel` (approx. 133437 rows)
        `dbname`.`message_inline_image` (approx. 1562 rows)
        `dbname`.`ticket_mention` (approx. 3760 rows)
        `dbname`.`wa_message_queue` (approx. 72 rows)
      Will automatically choose the method to update foreign keys.
      Altering `dbname`.`message`...
      Creating new table...
      Created new table dbname._message_new OK.
      Altering new table...
      Altered `dbname`.`_message_new` OK.
      2019-02-17T12:50:47 Creating triggers...
      2019-02-17T12:50:47 Created triggers OK.
      2019-02-17T12:50:47 Copying approximately 17590848 rows...
      Copying `dbname`.`message`:   1% 37:06 remain
      [..]
      Copying `dbname`.`message`:  99% 00:32 remain
      2019-02-17T13:52:15 Copied rows OK.
      2019-02-17T13:52:15 Max rows for the rebuild_constraints method: 9748
      Determining the method to update foreign keys...
      2019-02-17T13:52:15   `dbname`.`email_message`: too many rows: 3484392; must use drop_swap
      2019-02-17T13:52:15 Drop-swapping tables...
      2019-02-17T13:52:15 Analyzing new table...
      2019-02-17T13:52:29 Dropped and swapped tables OK.
      Not dropping old table because --no-drop-old-table was specified.
      2019-02-17T13:52:29 Dropping triggers...
      2019-02-17T13:52:29 Dropped triggers OK.
      Successfully altered `dbname`.`message`.

      Logs on master1 (ends in crash):

      2019-02-17 13:52:15 140258464634624 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:16 140258458490624 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:28 140258112407296 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:29 140258200942336 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:29 140258463713024 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032141, mode: local, state: committing, conflict: no conflict, seqno: 22055897
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:26', `updated_at` = '2019-02-17 13:52:26' where `id` = 5339
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: committing, conflict: no conflict, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032195, mode: local, state: committing, conflict: no conflict, seqno: 22055900
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2296
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032070, mode: local, state: committing, conflict: no conflict, seqno: 22055894
         SQL: update `contact` set `agency_id` = 9346, `phone` = '620bd301-a801-4703-a308-de36bcc310ba', `full_name` = 'Anoniem', `is_synced` = 1, `title` = 'MR', `updated_at` = '2019-02-17 13:52:22', `created_at` = '2019-02-17 13:52:22', `id` = 4938043, `color` = '#f44336' where `id` = 4938043
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032198, mode: local, state: committing, conflict: no conflict, seqno: 22055895
         SQL: update `channel` set `last_activity_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 3922
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032197, mode: local, state: committing, conflict: no conflict, seqno: 22055896
         SQL: update `channel` set `last_activity_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2274
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032194, mode: local, state: committing, conflict: no conflict, seqno: 22055899
         SQL: update `channel` set `last_activity_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 6032
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: committing, conflict: no conflict, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032141, mode: local, state: executing, conflict: must replay, seqno: 22055897
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:26', `updated_at` = '2019-02-17 13:52:26' where `id` = 5339
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258197870336 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: executing, conflict: must replay, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: executing, conflict: must replay, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: Victim thread:
         THD: 12032070, mode: local, state: executing, conflict: must replay, seqno: 22055894
         SQL: update `contact` set `agency_id` = 9346, `phone` = '620bd301-a801-4703-a308-de36bcc310ba', `full_name` = 'Anoniem', `is_synced` = 1, `title` = 'MR', `updated_at` = '2019-02-17 13:52:22', `created_at` = '2019-02-17 13:52:22', `id` = 4938043, `color` = '#f44336' where `id` = 4938043
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: executing, conflict: must replay, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258123593472 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: executing, conflict: must replay, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: Victim thread:
         THD: 12032070, mode: local, state: executing, conflict: must replay, seqno: 22055894
         SQL: update `contact` set `agency_id` = 9346, `phone` = '620bd301-a801-4703-a308-de36bcc310ba', `full_name` = 'Anoniem', `is_synced` = 1, `title` = 'MR', `updated_at` = '2019-02-17 13:52:22', `created_at` = '2019-02-17 13:52:22', `id` = 4938043, `color` = '#f44336' where `id` = 4938043
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: executing, conflict: must replay, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258100020992 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: executing, conflict: must replay, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: Victim thread:
         THD: 12032070, mode: local, state: executing, conflict: must replay, seqno: 22055894
         SQL: update `contact` set `agency_id` = 9346, `phone` = '620bd301-a801-4703-a308-de36bcc310ba', `full_name` = 'Anoniem', `is_synced` = 1, `title` = 'MR', `updated_at` = '2019-02-17 13:52:22', `created_at` = '2019-02-17 13:52:22', `id` = 4938043, `color` = '#f44336' where `id` = 4938043
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: executing, conflict: must replay, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258600994560 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: executing, conflict: must replay, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: Victim thread:
         THD: 12032070, mode: local, state: executing, conflict: must replay, seqno: 22055894
         SQL: update `contact` set `agency_id` = 9346, `phone` = '620bd301-a801-4703-a308-de36bcc310ba', `full_name` = 'Anoniem', `is_synced` = 1, `title` = 'MR', `updated_at` = '2019-02-17 13:52:22', `created_at` = '2019-02-17 13:52:22', `id` = 4938043, `color` = '#f44336' where `id` = 4938043
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: executing, conflict: must replay, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258099099392 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: executing, conflict: must replay, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: Victim thread:
         THD: 12032070, mode: local, state: executing, conflict: must replay, seqno: 22055894
         SQL: update `contact` set `agency_id` = 9346, `phone` = '620bd301-a801-4703-a308-de36bcc310ba', `full_name` = 'Anoniem', `is_synced` = 1, `title` = 'MR', `updated_at` = '2019-02-17 13:52:22', `created_at` = '2019-02-17 13:52:22', `id` = 4938043, `color` = '#f44336' where `id` = 4938043
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: executing, conflict: must replay, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258099406592 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: Victim thread:
         THD: 12032191, mode: local, state: executing, conflict: must replay, seqno: 22055898
         SQL: update `channel` set `last_login_at` = '2019-02-17 13:52:29', `updated_at` = '2019-02-17 13:52:29' where `id` = 2276
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=4 solved by abort
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: executing, conflict: must replay, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258126358272 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258201249536 [Note] WSREP: cluster conflict due to high priority abort for threads:
      2019-02-17 13:52:29 140258201249536 [Note] WSREP: Winning thread:
         THD: 11926771, mode: total order, state: executing, conflict: no conflict, seqno: 22055893
         SQL: RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`
      2019-02-17 13:52:29 140258201249536 [Note] WSREP: Victim thread:
         THD: 12032199, mode: local, state: executing, conflict: must replay, seqno: 22055901
         SQL: insert into `ticket` (`agency_id`, `user_id`, `contact_id`, `assigned_by`, `guid`, `status`, `channel_id`, `updated_at`, `created_at`) values (978, NULL, 4144924, NULL, 'redactedstring', 'OPEN', 17716, '2019-02-17 13:52:29', '2019-02-17 13:52:29')
      2019-02-17 13:52:29 140258201249536 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=3 solved by abort
      2019-02-17 13:52:29 140258197255936 [Note] WSREP: MDL conflict db=dbname table=_message_new ticket=9 solved by abort
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 22055894)
      2019-02-17 13:52:29 140258126358272 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: RBR event 26 Update_rows_v1 apply warning: 1146, 22055894
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: Failed to apply app buffer: seqno: 22055894, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 2th time
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 22055894)
      2019-02-17 13:52:29 140258126358272 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: RBR event 26 Update_rows_v1 apply warning: 1146, 22055894
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: Failed to apply app buffer: seqno: 22055894, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 3th time
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 22055894)
      2019-02-17 13:52:29 140258126358272 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: RBR event 26 Update_rows_v1 apply warning: 1146, 22055894
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: Failed to apply app buffer: seqno: 22055894, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 4th time
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 22055894)
      2019-02-17 13:52:29 140258126358272 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: RBR event 26 Update_rows_v1 apply warning: 1146, 22055894
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: failed to replay trx: source: a2fa1c6d-2f15-11e9-9a6d-67f311b69f7d version: 4 local: 1 state: REPLAYING flags: 1 conn_id: 12032070 trx_id: 591123582 seqnos (l: 3117575, g: 22055894, s: 22055872, d: 22055867, ts: 397410915757909)
      2019-02-17 13:52:29 140258126358272 [Warning] WSREP: Failed to apply trx 22055894 4 times
      2019-02-17 13:52:29 140258126358272 [ERROR] WSREP: trx_replay failed for: 6, schema: dbname, query: �ݧ��U
      2019-02-17 13:52:29 140258126358272 [ERROR] Aborting
       
      2019-02-17 13:52:32 140258603452160 [Warning] Aborted connection 12032258 to db: 'dbname' user: 'redacteduser' host: '1.1.1.81' (Got an error reading communication packets)
      2019-02-17 13:52:32 140258199099136 [Warning] Aborted connection 12032255 to db: 'dbname' user: 'redacteduser' host: '1.1.1.81' (Got an error reading communication packets)
      2019-02-17 13:52:40 140258456647424 [Warning] Aborted connection 12032275 to db: 'unconnected' user: 'admin' host: 'localhost' (Got an error writing communication packets)
      2019-02-17 13:52:40 140258600687360 [Warning] Aborted connection 12032408 to db: 'unconnected' user: 'admin' host: 'localhost' (Got an error writing communication packets)
      2019-02-17 13:52:40 140258197870336 [Warning] Aborted connection 12032493 to db: 'unconnected' user: 'admin' host: 'localhost' (Got an error writing communication packets)
      190217 13:52:43 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
       
      Server version: 10.2.19-MariaDB-log
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=128
      max_threads=1026
      thread_count=48
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 2385493 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f8fd00008c8
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f908008ad30 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55eda61b165e]
      /usr/sbin/mysqld(handle_fatal_signal+0x355)[0x55eda5c356f5]
      /lib64/libpthread.so.0(+0xf5d0)[0x7f941ef1d5d0]
      /usr/sbin/mysqld(+0x472373)[0x55eda5a34373]
      /usr/sbin/mysqld(+0x4825de)[0x55eda5a445de]
      /usr/sbin/mysqld(+0x482dc1)[0x55eda5a44dc1]
      /usr/sbin/mysqld(+0x4831fb)[0x55eda5a451fb]
      /usr/sbin/mysqld(+0x4714f1)[0x55eda5a334f1]
      /usr/sbin/mysqld(+0x4700f1)[0x55eda5a320f1]
      /usr/sbin/mysqld(_Z16acl_authenticateP3THDj+0x37a)[0x55eda5a5013a]
      /usr/sbin/mysqld(+0x5ad7cc)[0x55eda5b6f7cc]
      /usr/sbin/mysqld(_Z16login_connectionP3THD+0x45)[0x55eda5b70a75]
      /usr/sbin/mysqld(_Z22thd_prepare_connectionP3THD+0x19)[0x55eda5b71369]

      Logs on master2 (shuts down automatically):

      2019-02-17 13:52:16 140049974585088 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:17 140049981036288 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:19 140049974892288 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:19 140049977042688 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:25 140049773160192 [Note] WSREP: MDL conflict db=dbname table=message ticket=9 solved by abort
      2019-02-17 13:52:29 140064119604992 [Note] WSREP: MDL BF-BF conflict
      schema:  dbname
      request: (9 	seqno 22055893 	wsrep (1, 1, 0) cmd 0 61 	RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`)
      granted: (13 	seqno 22055894 	wsrep (1, 0, 0) cmd 0 147 	(null))
      2019-02-17 13:52:29 140064119604992 [Note] WSREP: MDL BF-BF conflict
      schema:  dbname
      request: (9 	seqno 22055893 	wsrep (1, 1, 0) cmd 0 61 	RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`)
      granted: (10 	seqno 22055895 	wsrep (1, 0, 0) cmd 0 147 	(null))
      2019-02-17 13:52:29 140064119604992 [Note] WSREP: MDL BF-BF conflict
      schema:  dbname
      request: (9 	seqno 22055893 	wsrep (1, 1, 0) cmd 0 61 	RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`)
      granted: (12 	seqno 22055896 	wsrep (1, 0, 0) cmd 0 147 	(null))
      2019-02-17 13:52:29 140064119604992 [Note] WSREP: MDL BF-BF conflict
      schema:  dbname
      request: (9 	seqno 22055893 	wsrep (1, 1, 0) cmd 0 61 	RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`)
      granted: (11 	seqno 22055897 	wsrep (1, 0, 0) cmd 0 147 	(null))
      2019-02-17 13:52:29 140064119604992 [Note] WSREP: MDL BF-BF conflict
      schema:  dbname
      request: (9 	seqno 22055893 	wsrep (1, 1, 0) cmd 0 61 	RENAME TABLE `dbname`.`_message_new` TO `dbname`.`message`)
      granted: (1 	seqno 22055898 	wsrep (1, 0, 0) cmd 0 147 	(null))
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055900)
      2019-02-17 13:52:29 140064118683392 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055900
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055899)
      2019-02-17 13:52:29 140064119297792 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055899
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: Failed to apply app buffer: seqno: 22055900, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 2th time
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: Failed to apply app buffer: seqno: 22055899, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 2th time
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055900)
      2019-02-17 13:52:29 140064118683392 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055900
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055899)
      2019-02-17 13:52:29 140064119297792 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: Failed to apply app buffer: seqno: 22055900, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 3th time
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055899
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: Failed to apply app buffer: seqno: 22055899, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 3th time
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055900)
      2019-02-17 13:52:29 140064118683392 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055900
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055899)
      2019-02-17 13:52:29 140064119297792 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055899
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: Failed to apply app buffer: seqno: 22055900, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 4th time
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: Failed to apply app buffer: seqno: 22055899, status: 1
      	 at galera/src/trx_handle.cpp:apply():353
      Retrying 4th time
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055900)
      2019-02-17 13:52:29 140064118683392 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064118683392 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055900
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 22055899)
      2019-02-17 13:52:29 140064119297792 [ERROR] Slave SQL: Error executing row event: 'Table 'dbname._message_new' doesn't exist', Internal MariaDB error code: 1146
      2019-02-17 13:52:29 140064119297792 [Warning] WSREP: RBR event 55 Update_rows_v1 apply warning: 1146, 22055899
      2019-02-17 13:52:29 140064118683392 [ERROR] WSREP: Failed to apply trx: source: a2fa1c6d-2f15-11e9-9a6d-67f311b69f7d version: 4 local: 0 state: APPLYING flags: 1 conn_id: 12032195 trx_id: 591123580 seqnos (l: 3121495, g: 22055900, s: 22055890, d: 22055888, ts: 397410921969953)
      2019-02-17 13:52:29 140064119297792 [ERROR] WSREP: Failed to apply trx: source: a2fa1c6d-2f15-11e9-9a6d-67f311b69f7d version: 4 local: 0 state: APPLYING flags: 1 conn_id: 12032194 trx_id: 591123597 seqnos (l: 3121494, g: 22055899, s: 22055884, d: 22054292, ts: 397410921259895)
      2019-02-17 13:52:29 140064118683392 [ERROR] WSREP: Failed to apply trx 22055900 4 times
      2019-02-17 13:52:29 140064118683392 [ERROR] WSREP: Node consistency compromised, aborting...
      2019-02-17 13:52:29 140064119297792 [ERROR] WSREP: Failed to apply trx 22055899 4 times
      2019-02-17 13:52:29 140064119297792 [ERROR] WSREP: Node consistency compromised, aborting...
      2019-02-17 13:52:29 140064118683392 [Note] WSREP: /usr/sbin/mysqld: Terminated.
      2019-02-17 13:52:29 140064119297792 [Note] WSREP: Closing send monitor...
      2019-02-17 13:52:29 140064119297792 [Note] WSREP: Closed send monitor.
      2019-02-17 13:52:29 140064119297792 [Note] WSREP: gcomm: terminating thread

      Show create table:

      CREATE TABLE `message` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `agency_id` int(10) unsigned NOT NULL,
        `ticket_id` int(10) unsigned NOT NULL,
        `contact_id` int(10) unsigned DEFAULT NULL,
        `user_id` int(10) unsigned DEFAULT NULL,
        `whatsapp_message_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `type` enum('INBOUND','OUTBOUND','NOTE') COLLATE utf8mb4_unicode_ci NOT NULL,
        `sent_at` datetime DEFAULT NULL,
        `message` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `file_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `file_caption` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `location_data` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `body_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `is_auto_reply` tinyint(1) DEFAULT NULL,
        `token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `read` tinyint(1) DEFAULT 0,
        `is_analyzed_for_tags` tinyint(1) NOT NULL DEFAULT 0,
        `created_at` timestamp NULL DEFAULT NULL,
        `updated_at` timestamp NULL DEFAULT NULL,
        `deleted_at` timestamp NULL DEFAULT NULL,
        `parent_id` int(11) DEFAULT NULL,
        PRIMARY KEY (`id`),
        KEY `message_agency_id_foreign` (`agency_id`),
        KEY `message_ticket_id_foreign` (`ticket_id`),
        KEY `message_contact_id_foreign` (`contact_id`),
        KEY `message_user_id_foreign` (`user_id`),
        KEY `sent_at` (`sent_at`),
        KEY `deleted_at` (`deleted_at`),
        KEY `created_at` (`created_at`),
        KEY `body_type` (`body_type`),
        KEY `whatsapp_message_id` (`whatsapp_message_id`(191)),
        KEY `type` (`type`),
        KEY `idx_token` (`token`(191)),
        FULLTEXT KEY `message` (`message`),
        CONSTRAINT `__message_agency_id_foreign` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__message_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__message_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__message_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
      ) ENGINE=InnoDB AUTO_INCREMENT=51070360 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
       
      CREATE TABLE `contact` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `agency_id` int(10) unsigned NOT NULL,
        `title` enum('MR','MRS') COLLATE utf8mb4_unicode_ci NOT NULL,
        `first_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `full_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `street_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `house_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `zip_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `whatsapp_phone_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `image_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `is_synced` tinyint(1) NOT NULL DEFAULT 1,
        `custom_field_data` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
        `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
        `deleted_at` timestamp NULL DEFAULT NULL,
        `deleted_by` int(10) unsigned DEFAULT NULL,
        PRIMARY KEY (`id`),
        KEY `contact_agency_id_foreign` (`agency_id`),
        KEY `phone` (`phone`(191)),
        KEY `full_name` (`full_name`(191)),
        KEY `custom_field_data` (`custom_field_data`(191)),
        KEY `email` (`email`(191)),
        KEY `whatsapp_phone_id` (`whatsapp_phone_id`(191)),
        CONSTRAINT `contact_agency_id_foreign` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
      ) ENGINE=InnoDB AUTO_INCREMENT=4968850 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
       
      CREATE TABLE `channel` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `phone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
        `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `status_update` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `status` enum('ACTIVE','UNVERIFIED','CODE_SENT','PENDING','UNASSIGNED') COLLATE utf8mb4_unicode_ci NOT NULL,
        `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'WHATSAPP',
        `is_wa_connector` tinyint(1) NOT NULL DEFAULT 0,
        `logo_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `account_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `last_login_at` datetime DEFAULT NULL,
        `last_activity_at` datetime DEFAULT NULL,
        `expires_at` datetime DEFAULT NULL,
        `telegram_last_update_id` datetime DEFAULT NULL,
        `notification_email` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `is_running` tinyint(1) NOT NULL DEFAULT 0,
        `agency_id` int(10) unsigned DEFAULT NULL,
        `auto_reply` enum('ENABLED','DISABLED','IN_OPENING_HOURS','OUTSIDE_OPENING_HOURS') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ENABLED',
        `wa_server_id` int(10) unsigned DEFAULT NULL,
        `connection_error_notification_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `price` decimal(8,2) NOT NULL DEFAULT 15.00,
        `color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `show_ticket_fields` tinyint(1) NOT NULL DEFAULT 1,
        `show_contact_fields` tinyint(1) NOT NULL DEFAULT 1,
        `can_be_deleted_at` datetime DEFAULT NULL,
        `requested_by` int(11) DEFAULT NULL,
        `reopen_closed_ticket` tinyint(1) NOT NULL DEFAULT 0,
        `deleted_at` timestamp NULL DEFAULT NULL,
        `created_at` timestamp NULL DEFAULT NULL,
        `updated_at` timestamp NULL DEFAULT NULL,
        PRIMARY KEY (`id`),
        KEY `agency_id` (`agency_id`),
        KEY `channel_wa_server_id_foreign` (`wa_server_id`),
        KEY `type` (`type`),
        KEY `username` (`username`(191)),
        KEY `phone` (`phone`(191)),
        KEY `status` (`status`),
        KEY `password` (`password`(191)),
        CONSTRAINT `channel_ibfk_1` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
        CONSTRAINT `channel_wa_server_id_foreign` FOREIGN KEY (`wa_server_id`) REFERENCES `wa_server` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
      ) ENGINE=InnoDB AUTO_INCREMENT=41287 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
       
      CREATE TABLE `ticket` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `agency_id` int(10) unsigned NOT NULL,
        `channel_id` int(10) unsigned DEFAULT NULL,
        `user_id` int(10) unsigned DEFAULT NULL,
        `team_id` int(10) unsigned DEFAULT NULL,
        `contact_id` int(10) unsigned DEFAULT NULL,
        `assigned_by` int(10) unsigned DEFAULT NULL,
        `closed_by` int(10) unsigned DEFAULT NULL,
        `latest_message` datetime DEFAULT NULL,
        `guid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `telegram_chat_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `status` enum('URGENT','OPEN','ASSIGNED','CLOSED','INVALID') COLLATE utf8mb4_unicode_ci NOT NULL,
        `subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `closed_at` datetime DEFAULT NULL,
        `assigned_at` datetime DEFAULT NULL,
        `contact_cc` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `custom_data` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `created_at` datetime NOT NULL,
        `updated_at` datetime DEFAULT NULL,
        `deleted_at` int(11) DEFAULT NULL,
        PRIMARY KEY (`id`),
        KEY `ticket_agency_id_foreign` (`agency_id`),
        KEY `ticket_user_id_foreign` (`user_id`),
        KEY `ticket_contact_id_foreign` (`contact_id`),
        KEY `ticket_assigned_by_foreign` (`assigned_by`),
        KEY `ticket_closed_by_foreign` (`closed_by`),
        KEY `status` (`status`),
        KEY `latest_message` (`latest_message`),
        KEY `ticket_channel_id_foreign` (`channel_id`),
        KEY `idx_guid` (`guid`(191)),
        KEY `closed_at` (`closed_at`),
        KEY `ticket_team_id_foreign` (`team_id`),
        KEY `status_closed_at` (`status`,`closed_at`),
        KEY `sort_index` (`agency_id`,`status`,`closed_at`),
        CONSTRAINT `__ticket_agency_id_foreign` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__ticket_assigned_by_foreign` FOREIGN KEY (`assigned_by`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__ticket_channel_id_foreign` FOREIGN KEY (`channel_id`) REFERENCES `channel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__ticket_closed_by_foreign` FOREIGN KEY (`closed_by`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__ticket_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `__ticket_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
        CONSTRAINT `_ticket_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `team` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
      ) ENGINE=InnoDB AUTO_INCREMENT=10504417 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

      Attachments

        Activity

          People

            sysprg Julius Goryavsky
            prupert Pim Rupert
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.