Batch MySQL insert only synching the first occurence · Issue #93 · long2ice/meilisync · GitHub
Skip to content

Batch MySQL insert only synching the first occurence #93

Open

Description

@shmox75

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.

Activity

  1. long2ice commented on Apr 3, 2024

    @long2ice
    Owner

    Did you config mysql row_level binlog?

  2. shmox75 commented on Apr 3, 2024

    @shmox75
    Author

    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 ?

  3. KDMW-IO commented on May 20, 2024

    @KDMW-IO
    Contributor

    Proposed fix here

    #103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions