Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch MySQL insert only synching the first occurence #93

Open
shmox75 opened this issue Apr 2, 2024 · 3 comments
Open

Batch MySQL insert only synching the first occurence #93

shmox75 opened this issue Apr 2, 2024 · 3 comments

Comments

@shmox75
Copy link

shmox75 commented Apr 2, 2024

Batch MySQL insert only synching the first occurence:

INSERT INTO categories (id, category_parent_id, category_name_fr, category_name_ar, category_name_en, category_slug) VALUES
(1, 0, 'Animaux', 'حيوانات', 'Pets', 'animaux'),
(2, 0, 'Art, antiquités', 'الفن والتحف', 'Art, antiques', 'art-antiquites'),
(3, 0, 'Accessoires et pièces auto, moto', 'إكسسوارات وقطع غيار السيارات والدراجات النارية\r\n', 'Auto and motorcycle accessories and parts', 'accessoires-pièces-auto-moto'),
(4, 0, 'Bateaux, voile, nautisme', 'القوارب، الشراعية، بحري', 'Boats, sailing, nautical', 'Bateaux-voile-nautisme'),
(5, 0, 'Beauté, bien-être, parfums', 'الجمال والرفاهية والعطور', 'Beauty, well-being, perfumes', 'beaute-bien-être-parfums'),
(6, 0, 'Bijoux, montres', 'المجوهرات والساعات', 'Jewelry, watches', 'bijoux-montres'),
(7, 0, 'Bricolage', 'أعمال يدوية', 'DIY', 'bricolage'),
(8, 0, 'Bébé, puériculture', 'الطفل، رعاية الأطفال', 'Child, childcare', 'Bebe-puericulture'),
(9, 0, 'Collections', 'المجموعات', 'Collections', 'collections'),
(10, 0, 'Céramiques, verrerie', 'السيراميك والأواني الزجاجية', 'Ceramics, glassware', 'ceramiques-verrerie'),
(11, 0, 'DVD, cinéma', 'دي في دي، سينما', 'DVD, cinema', 'dvd-cinema'),
(12, 0, 'Gastronomie, boissons', 'فن الطهو والمشروبات', 'Gastronomy, drinks', 'gastronomie-boissons'),
(13, 0, 'Image, son', 'الصورة، الصوت', 'Image, sound', 'image-son'),
(14, 0, 'Immobilier', 'العقارات', 'Real estate', 'immobilier'),
(15, 0, 'Informatique, réseaux', 'تكنولوجيا المعلومات والشبكات\r\n', 'Computer, networks', 'informatique-reseaux'),
(16, 0, 'Instruments de musique', 'آلات موسيقية', 'Musical instruments', 'instruments-musique'),
(17, 0, 'Jardin, terrasse', 'حديقة، تراس', 'Garden, terrace', 'jardin-terrasse'),
(18, 0, 'Jeux vidéo, consoles de jeux', 'ألعاب الفيديو، وحدات تحكم الألعاب\r\n', 'Video games, game consoles', 'Jeux-video-consoles-jeux'),
(19, 0, 'Jouets et jeux', 'اللعب والألعاب', 'Toys and games', 'jouets-jeux'),
(20, 0, 'Livres, BD, revues', 'الكتب والقصص المصورة والمجلات\r\n', 'Books, comics, magazines', 'livres-BD-revues'),
(21, 0, 'Loisirs créatifs', 'الهوايات الإبداعية', 'Creative hobbies\r\n', 'loisirs-creatifs'),
(22, 0, 'Maison', 'المنزل', 'Home', 'maison'),
(23, 0, 'Monnaies', 'عملات معدنية', 'Coins', 'monnaies'),
(24, 0, 'Musique, CD, vinyles', 'الموسيقى والأقراص المدمجة والفينيل\r\n', 'Music, CDs, vinyls\r\n', 'musique-CD-vinyles'),
(25, 0, 'Photo, caméscopes', 'الصور وكاميرات الفيديو', 'Photo, camcorders', 'photo-camescopes'),
(26, 0, 'Sports, vacances', 'الرياضة والإجازات', 'Sports, vacations', 'sports-vacances'),
(27, 0, 'Timbres', 'طوابع بريدية', 'Stamps', 'timbres'),
(28, 0, 'Téléphonie, mobilité', 'الهاتف والتنقل\r\n', 'Telephony, mobility\r\n', 'telephonie-mobilite'),
(29, 0, 'Vêtements, accessoires', 'الملابس والإكسسوارات\r\n', 'Clothing & Accessories', 'vetements-accessoires'),
(30, 0, 'Électroménager', 'الأجهزة المنزلية', 'Home appliance\r\n', 'electromenager'),
(31, 0, 'Équipements professionnels', 'المعدات المهنية\r\n', 'Professional equipment\r\n', 'equipements-professionnels');

Only the first value : (1, 0, 'Animaux', 'حيوانات', 'Pets', 'animaux') is added (synched)

Please note that on windows 11 without docker.

@long2ice
Copy link
Owner

long2ice commented Apr 3, 2024

Did you config mysql row_level binlog?

@shmox75
Copy link
Author

shmox75 commented Apr 3, 2024

Did you config mysql row_level binlog?

Yes:
mysql> SET GLOBAL binlog_format = 'ROW';

PS: Now I don't know if I have to set it in every sql query or it is saved whyle mysql is running ?

@KDMW-IO
Copy link
Contributor

KDMW-IO commented May 20, 2024

Proposed fix here

#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants