IDS2000 v9.20.tc1 MATCHES BUG !!!
Posted in 2000
The matches search bug found in VARCHAR(NVARCHAR) fields containing national
Russian symbols!
-- DB_LOCALE = ru_ru.1251
-- CLIENT_LOCALE = ru_ru.1251
CREATE TABLE test (
sn SERIAL NOT NULL,
txt1 VARCHAR(50),
txt1 NVARCHAR(50),
primary key(sn)
);
INSERT INTO test(txt1,txt2) values ("LESSON","'''''''");
INSERT INTO test(txt1,txt2) values ("LES", "'''");
INSERT INTO test(txt1,txt2) values ("ESS", "'''");
SELECT * FROM test WHERE txt1 MATCHES "LES*";-- 2 rows retrieved
SELECT * FROM test WHERE txt1 MATCHES "*ESS*";-- 2 rows retrieved
SELECT * FROM test WHERE txt2 MATCHES "'''*";-- 2 rows retrieved
-- !!! BUG
SELECT * FROM test WHERE txt1 MATCHES "*'''*";-- 0 rows retrieved
SELECT * FROM test WHERE txt1 MATCHES "*'''**";-- 2 rows retrieved
SELECT * FROM test WHERE txt1 MATCHES "**'''**";-- 2 rows retrieved
SELECT works "properly" in case using _double_ asterisk at both side of
search criteria !!!
In I searching in fields containg English symbols, I not add _double_
asterisk (as written in SQL Syntax Guide :-)
--
Kind Regards Mark Lobanov
--------------------------------------------------
ICQ: 54124832