Skip to content

Commit 35765d2

Browse files
committed
add: preliminary support for the PARTITION statement (by removing it)
1 parent 429f4b6 commit 35765d2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

mysql2sqlite

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ inView != 0 { next }
100100
# skip comments
101101
/^\/\*/ { next }
102102

103+
# skip PARTITION statements
104+
/^ *[(]?(PARTITION|partition) +[^ ]+/ { next }
105+
103106
# print all INSERT lines
104107
( /^ *\(/ && /\) *[,;] *$/ ) || /^(INSERT|insert)/ {
105108
prev = ""

unit_tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,11 @@ LOCK TABLES `AAAA` WRITE;
9595
UNLOCK TABLES;
9696
SQL
9797

98+
cat <<\SQL
99+
/*!50100 PARTITION BY RANGE (YEAR(date))
100+
(PARTITION p6 VALUES LESS THAN (2012) ENGINE = InnoDB,
101+
PARTITION p7 VALUES LESS THAN (2013) ENGINE = InnoDB)
102+
SQL
103+
98104
cat <<\SQL
99105
SQL

0 commit comments

Comments
 (0)