Переглянути джерело

duplicate primary keys are generated by STRAIGHT_JOIN selections, so work around subsequent broken sql INSERT logic with IGNORE to allow for MySQL's 4.1.X more strict (ISO standard?) database operations

Michael Schloh von Bennewitz 21 роки тому
батько
коміт
1d878817d7
2 змінених файлів з 14 додано та 1 видалено
  1. 13 0
      ripe-dbase/ripe-dbase.patch
  2. 1 1
      ripe-dbase/ripe-dbase.spec

+ 13 - 0
ripe-dbase/ripe-dbase.patch

@@ -36,6 +36,19 @@ diff -Nau modules/ud/ud_main.c.orig modules/ud/ud_main.c
  #else/* default is Solaris implementation */
   hptr=gethostbyname_r(nrtm->server,  &result, host_info, sizeof(host_info), &error);
  #endif
+Index: modules/qi/query_instructions.h
+diff -Nau modules/qi/query_instructions.h.orig modules/qi/query_instructions.h
+--- modules/qi/query_instructions.h.orig	2005-01-05 13:34:01 +0100
++++ modules/qi/query_instructions.h	2005-01-05 13:34:21 +0100
+@@ -92,7 +92,7 @@
+ 
+ 
+ 
+-#define Q_REC         "INSERT INTO %s SELECT pe_ro_id FROM %s IDS STRAIGHT_JOIN %s WHERE object_id = IDS.id"
++#define Q_REC         "INSERT IGNORE INTO %s SELECT pe_ro_id FROM %s IDS STRAIGHT_JOIN %s WHERE object_id = IDS.id"
+ 
+ #if 0
+ #define Q_NO_OBJECTS  "SELECT object_id, sequence_id, object FROM last WHERE object_id = 0"
 Index: Makefile.site.in
 diff -Nau Makefile.site.in.orig Makefile.site.in
 --- Makefile.site.in.orig	Wed Jul 30 10:17:29 2003

+ 1 - 1
ripe-dbase/ripe-dbase.spec

@@ -34,7 +34,7 @@ Class:        EVAL
 Group:        Database
 License:      RIPE NCC
 Version:      3.2.0
-Release:      20041028
+Release:      20050105
 
 #   package options
 %option       with_extobjs  no