Page 1 of 1

[patch_done] Bug Incorrect work with : in ZSQLProcessor

Posted: 14.08.2012, 15:34
by ism
Hello
Found problem , with incorrect processing of the script
I found the commit in which the problem occurs
svn rev 1404 testing-egonhugeist

in rev 1391 all working ok

If the script is: if an exception occurs

Image

Example script

http://workism.narod2.ru/archives/test_error_script.7z

If delete : all working
("87621-4L010","876214L010 // ELEC:HTD","Hyundai","Дзеркало праве / скло / // Accent /11--*/",279.96*(100+(-20))/100,"4",246,-20,6),

all options ZSqlProcessor is default


Example Error script , problem in : and \"\"
insert into result_table (number_sapchasti,number_cross,brend,opisanie_sapchasti,cena_zakupki,nalichie,id_sklad_postavshika,skidki_procent,id_valuta) values
("87621-4L010","876214L010 // ELEC:HTD","Hyundai","Дзеркало праве / скло / // Accent /11--*/",279.96*(100+(-20))/100,"4",246,-20,6),
("51712-26100","5171226100 // DISC-FR WHEEL BRAKE","Hyundai","Диск гальмівний передній // Santa Fe MT5, 4WD R16\"\"",840.36*(100+(-20))/100,"10",246,-20,6),
("51712-2B700","517122B700 // DISC-FR WHEEL BRAKE","Hyundai","Диск гальмівний передній // Santa Fe /05--*/",940.92*(100+(-20))/100,"2",246,-20,6);
,

Posted: 15.08.2012, 09:50
by EgonHugeist
ism,

hi, long times not seen here (:.

ism, can you tell me which driver do you use here? Also did we change the download location on sf.net after an software update. New URL: http://svn.code.sf.net/p/zeoslib/code-0 ... es/testing

So checkout Rev 1646.

Michael

Posted: 15.08.2012, 17:02
by ism
I changed the script
But a new problem

Image

If the script is first \' and later ; it pops up an error
If delete ; in 'AUDI 100 A 9 /79-; PASS.T' all ok

Example problem script
insert into result_table (number_sapchasti,number_cross,brend,opisanie_sapchasti,cena_zakupki,nalichie,id_sklad_postavshika,skidki_procent,id_valuta) values
('409169','','HP','Пыльник гранаты R Master 11/00> 16\'',4.69,'10',380,0,3),
('443 498 201B','','HP','МАHЖЕТА ВHУТРЕH. (K-Т) AUDI 100 A 9 /79-; PASS.T4 (c чашкой)',3.93,'10',380,0,3);
Fields number_sapchasti,number_cross,brend,opisanie_sapchasti in table is varchar

database mysql-5

http://svn.code.sf.net/p/zeoslib/code-0 ... es/testing
rev 1648

Posted: 16.08.2012, 20:59
by EgonHugeist
ism,

this seems for me like a bad SQL Token detection. So i removed the ttEscapeQuoted detection from the MySQL-Tokenizer. On PostgreSQL we had a similar trouble before. So i reintroduced the old ttQuoted detaction.

So can you please test Rev.1649 with your first script again? I had no time to test this script today. If it does make trouble again then please add the Table-create script too.

Michael

Posted: 17.08.2012, 11:08
by ism
Error script
insert into result_table (number_sapchasti,number_cross,brend,opisanie_sapchasti,cena_zakupki,nalichie,id_sklad_postavshika,skidki_procent,id_valuta) values
('42X811','','MS Group','Насос Г/У с эл.приводом Opel Astra H/Zafira, 1.6.1.8 \'05 тип',446.15,'5',380,0,3),
('10.774 R=10.413 R','','GP','Колодки тормозные пер. VW PASSAT 88-; A80/100 16mm 20669',6.65,'3',380,0,3);
http://workism.narod2.ru/archives/token_error.7z

Image

Posted: 17.08.2012, 11:19
by EgonHugeist
ism,

ok i'll test it. Seems the error still apears. But i wonder about, because the whole Token detection is now the old one..

Can you add the Create-Table script too?

Michael

Posted: 17.08.2012, 11:22
by ism
CREATE TABLE result_table (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
number_sapchasti VARCHAR(150) NOT NULL DEFAULT '?',
number_sapchasti_compressed VARCHAR(150) NOT NULL DEFAULT '?',
number_cross VARCHAR(150) DEFAULT '...',
number_cross_compressed VARCHAR(150) DEFAULT '...',
brend VARCHAR(50) DEFAULT '?',
opisanie_sapchasti VARCHAR(170) DEFAULT '?',
cena_zakupki DOUBLE UNSIGNED NOT NULL DEFAULT 0,
nalichie VARCHAR(20) DEFAULT '?',
id_sklad_postavshika INT(10) UNSIGNED NOT NULL,
skidki_procent DOUBLE DEFAULT 0,
id_valuta TINYINT(4) UNSIGNED NOT NULL,
stoimost_dostavki_procent DOUBLE NOT NULL DEFAULT 0,
id_random MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT 0,
old_brand VARCHAR(50) DEFAULT NULL,
PRIMARY KEY (id),
INDEX brend (brend),
INDEX FK_result_table_valuta_table_id (id_valuta),
INDEX IX_result_table_id_sklad_postavshika (id_sklad_postavshika),
INDEX IX_result_table_nalichie (nalichie),
CONSTRAINT FK_result_table_skladi_postavshikov_id FOREIGN KEY (id_sklad_postavshika)
REFERENCES skladi_postavshikov(id) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT FK_result_table_valuta_table_id FOREIGN KEY (id_valuta)
REFERENCES valuta_table(id) ON DELETE RESTRICT ON UPDATE RESTRICT
)
ENGINE = INNODB

Posted: 17.08.2012, 11:26
by ism
Packet from sniffer Wireshark
insert into result_table (number_sapchasti,number_cross,brend,opisanie_sapchasti,cena_zakupki,nalichie,id_sklad_postavshika,skidki_procent,id_valuta) values
('42X811','','MS Group','Насос Г/У с эл.приводом Opel Astra H/Zafira, 1.6.1.8 \'05 тип',446.15,'5',380,0,3),
('10.774 R=10.413 R','','GP','Колодки тормозные пер. VW PASSAT 88-
SQL query breaks , but script above is correct

Posted: 18.08.2012, 16:18
by EgonHugeist
ism,

did run you first script with R1650 and it works fine... Can you test it please?

Now i'll check the second script..

Michael

Posted: 18.08.2012, 17:03
by ism
insert into result_table (number_sapchasti,number_cross,brend,opisanie_sapchasti,cena_zakupki,nalichie,id_sklad_postavshika,skidki_procent,id_valuta) values
("87621-4L010","876214L010 // ELEC:HTD","Hyundai","Дзеркало праве / скло / // Accent /11--*/",279.96*(100+(-20))/100,"4",246,-20,6),
("51712-26100","5171226100 // DISC-FR WHEEL BRAKE","Hyundai","Диск гальмівний передній // Santa Fe MT5, 4WD R16\"\"",840.36*(100+(-20))/100,"10",246,-20,6),
("51712-2B700","517122B700 // DISC-FR WHEEL BRAKE","Hyundai","Диск гальмівний передній // Santa Fe /05--*/",940.92*(100+(-20))/100,"2",246,-20,6);
rev 1652 all working good
insert into result_table (number_sapchasti,number_cross,brend,opisanie_sapchasti,cena_zakupki,nalichie,id_sklad_postavshika,skidki_procent,id_valuta) values
('42X811','','MS Group','Насос Г/У с эл.приводом Opel Astra H/Zafira, 1.6.1.8 \'05 тип',446.15,'5',380,0,3),
('10.774 R=10.413 R','','GP','Колодки тормозные пер. VW PASSAT 88-; A80/100 16mm 20669',6.65,'3',380,0,3);
rev 1652
Same error

Image

Posted: 19.08.2012, 11:39
by EgonHugeist
ism,

got now both scripts running. I'm not very happy about because (actually) no more Ansi-/QuotedStr Detection is possible for MySQL (which seems for me they have a algorythm to know how.) Anyway i hope you bug is fixed. And i'll check how to surround my issue in a more stable way.

Ism, can i add your testscripts to our test-suites? This would be great to keep control about what's going wrong..

Patch done Rev 1653

Michael

Posted: 19.08.2012, 20:48
by ism
EgonHugeist wrote:ism,
Ism, can i add your testscripts to our test-suites? This would be great to keep control about what's going wrong
Michael
Yes, of course
This is part of the large text price lists

I'll try to check tomorrow

Posted: 20.08.2012, 14:02
by ism
So far all working normally

Posted: 20.08.2012, 14:35
by EgonHugeist
ism,

thank you for that confirmation. I'll add your scripts to our testsuites later.

Michael