Skip to content

Commit 7fda8f6

Browse files
committed
Ignore SPATIAL KEY during replication
1 parent 3eb6d4e commit 7fda8f6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

mysql_ch_replicator/converter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,8 @@ def parse_mysql_table_structure(self, create_statement, required_table_name=None
600600
continue
601601
if line.lower().startswith('fulltext'):
602602
continue
603+
if line.lower().startswith('spatial'):
604+
continue
603605
if line.lower().startswith('primary key'):
604606
# Define identifier to match column names, handling backticks and unquoted names
605607
identifier = (Suppress('`') + Word(alphas + alphanums + '_') + Suppress('`')) | Word(

test_mysql_ch_replicator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,11 @@ def test_runner():
315315
name varchar(255),
316316
age int,
317317
rate decimal(10,4),
318+
coordinate point,
318319
KEY `IDX_age` (`age`),
319320
FULLTEXT KEY `IDX_name` (`name`),
320-
PRIMARY KEY (id)
321+
PRIMARY KEY (id),
322+
SPATIAL KEY `coordinate` (`coordinate`)
321323
) ENGINE=InnoDB AUTO_INCREMENT=2478808 DEFAULT CHARSET=latin1;
322324
''')
323325

0 commit comments

Comments
 (0)