Re: [Modeling-users] Double Result
Status: Abandoned
Brought to you by:
sbigaret
From: Yannick G. <yan...@sa...> - 2003-07-30 19:05:55
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On July 30, 2003 01:45 pm, Sebastien Bigaret wrote: > Yes, I'm no sql guru, but I know such things can happen and that's why > I'd like to make sure. If I could reproduce it on my msql 4.0 I'll > conclude the same --but maybe I'm not trying the right thing. > > > Yannick, could you please perform the following: > > - create, if it's not already done, the AUTHOR_BOOKS test database > e.g.: [mysqladmin -h localhost -u root create "AUTHORBOOKS"] > =20 > - change the current directory to Modeling/tests and run python > ./test_EditingContext_Global.py -d MySQL -r (you'll get errors for > DROP TABLE --this is okay) Works perfectly > - at the mysql prompt for db AUTHOR_BOOKS copy-paste the following: > [sniped] > Do you see any duplicates?? No dupes > NB: it seems to me that these requests corresponds to/are variant of > your original query returning duplicates, which was: > > SELECT t0.activity_id, t0.code, t0.enterprise_id, t0.is_active > FROM ABCI18N t1 INNER JOIN ABC t0 ON ( t0.activity_id=3Dt1.activity_id ) > WHERE (t0.code LIKE '%%' AND t0.is_active <> -255 AND t1.title LIKE > '%ABC%') What may be different is that I have 2 records in ABCI18N that in fact all= =20 matcch "%ABC%" :=20 mysql> select * from ABCI18N where title like "%ABC%"; +----+-------------+---------+-------------------------------------------+-= =2D---------------------------------+ | id | activity_id | lang_id | description |= =20 title | +----+-------------+---------+-------------------------------------------+-= =2D---------------------------------+ | 3 | 2 | 1 | Description de l'activit=C3=A9 num=C3=A9ro A= BC123 |=20 Titre de l'activit=C3=A9 ABC123 | | 4 | 2 | 2 | Description of the activity code ABC123 |= =20 Title of the activity code ABC123 | +----+-------------+---------+-------------------------------------------+-= =2D---------------------------------+ So this may explain why the select match twice here and not on you database. =2D --=20 Yannick Gingras Byte Gardener, Savoir-faire Linux inc. http://www.savoirfairelinux.com/ =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/KBVQrhy5Fqn/MRARAiWiAKCRV+l9eVtgV5mUUcudiZAHg4S3dgCcDTbY fKgJCsjlk1AHESpmKAhprts=3D =3DRXii =2D----END PGP SIGNATURE----- |