IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

SQL Oracle Discussion :

J'ai (encore) trouvé un bug


Sujet :

SQL Oracle

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Expert confirmé
    Avatar de StringBuilder
    Homme Profil pro
    Chef de projets
    Inscrit en
    Février 2010
    Messages
    4 197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Chef de projets
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2010
    Messages : 4 197
    Billets dans le blog
    1
    Par défaut J'ai (encore) trouvé un bug
    Décidément, quand on pousse un peu, Oracle c'est vraiment pas fiable comme SGBD...

    Avec une structure de table :

    TIE (CODSOC number, TYPTIE varchar2(3), SIGTIE varchar2(12), TYPGRP varchar2(3), SIGGRP varchar2(12), + d'autres colonnes)

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    select 'dtc'
    from tie t1
    left outer join tie t2 on t2.codsoc = t1.codsoc and t2.typtie = t1.typgrp and t2.sigtie = t1.siggrp
    left outer join tie t3 on t3.codsoc = t2.codsoc and t3.typtie = t2.typgrp and t3.sigtie = t2.siggrp
    left outer join tie t4 on t4.codsoc = t3.codsoc and t4.typtie = t3.typgrp and t4.sigtie = t3.siggrp
    left outer join tie t5 on t5.codsoc = t4.codsoc and t5.typtie = t4.typgrp and t5.sigtie = t4.siggrp
    left outer join tie t6 on t6.codsoc = t5.codsoc and t6.typtie = t5.typgrp and t6.sigtie = t5.siggrp
    left outer join tie t7 on t7.codsoc = t6.codsoc and t7.typtie = t6.typgrp and t7.sigtie = t6.siggrp
    left outer join tie t8 on t8.codsoc = t7.codsoc and t8.typtie = t7.typgrp and t8.sigtie = t7.siggrp
    where t1.codsoc = 100
    and t1.typtie = 'CLI'
    and t1.sigtie = '243392';
    => Si on enlève 'dtc' et qu'on met une étoile :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    ORA-00600: internal error code, arguments: [qctstc2o1], [1], [0], [0], [1], [0], [0], []
    00600. 00000 -  "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
    *Cause:    This is the generic internal error number for Oracle program
               exceptions.	This indicates that a process has encountered an
               exceptional condition.
    *Action:   Report as a bug - the first argument is the internal error number


    Super pratique pour écrire une requête à tâtons si on ne peut plus utiliser *...

  2. #2
    Expert confirmé
    Avatar de StringBuilder
    Homme Profil pro
    Chef de projets
    Inscrit en
    Février 2010
    Messages
    4 197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Chef de projets
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2010
    Messages : 4 197
    Billets dans le blog
    1
    Par défaut
    Et pendant qu'on y est, un deuxième

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
     
    select c.clequi, decode(c.clequi, t1.sigtie, '1', t2.sigtie, '2', t3.sigtie, '3', t4.sigtie, '4', t5.sigtie, '5', t6.sigtie, '6', t7.sigtie, '7', t8.sigtie, '8'/*, t9.sigtie, '9', t10.sigtie, '10', t10.siggrp, '11'*/, 'X') niveau, c.cleqoi, c.prxnet, c.datapp, c.datval
    from cts c
    inner join tie t1 on t1.codsoc = c.codsoc
    left outer join tie t2 on t2.codsoc = t1.codsoc and t2.typtie = t1.typgrp and t2.sigtie = t1.siggrp
    left outer join tie t3 on t3.codsoc = t2.codsoc and t3.typtie = t2.typgrp and t3.sigtie = t2.siggrp
    left outer join tie t4 on t4.codsoc = t3.codsoc and t4.typtie = t3.typgrp and t4.sigtie = t3.siggrp
    left outer join tie t5 on t5.codsoc = t4.codsoc and t5.typtie = t4.typgrp and t5.sigtie = t4.siggrp
    left outer join tie t6 on t6.codsoc = t5.codsoc and t6.typtie = t5.typgrp and t6.sigtie = t5.siggrp
    left outer join tie t7 on t7.codsoc = t6.codsoc and t7.typtie = t6.typgrp and t7.sigtie = t6.siggrp
    left outer join tie t8 on t8.codsoc = t7.codsoc and t8.typtie = t7.typgrp and t8.sigtie = t7.siggrp
    --left outer join tie t9 on t9.codsoc = t8.codsoc and t9.typtie = t8.typgrp and t9.sigtie = t8.siggrp
    --left outer join tie t10 on t10.codsoc = t9.codsoc and t10.typtie = t9.typgrp and t10.sigtie = t9.siggrp
    where c.codsoc = 100
    and c.achvte = 'V'
    and c.typcot = 'LIG'
    and decode(c.datval, ' ', '99999999') >= '20110606'
    and c.datapp <= '20110606'
    and t1.typtie = 'CLI' and t1.sigtie = '243392'
    and c.cleqoi like '2750300%';
    => Si je remet l'auto-jointure sur tie t9 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    01445. 00000 -  "cannot select ROWID from, or sample, a join view without a key-preserved table"
    *Cause:    
    *Action:
    Erreur à la ligne 20, colonne 13
    Heureusement que je devrais pouvoir m'en sortir avec une CTE...

  3. #3
    Expert confirmé
    Avatar de StringBuilder
    Homme Profil pro
    Chef de projets
    Inscrit en
    Février 2010
    Messages
    4 197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Chef de projets
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2010
    Messages : 4 197
    Billets dans le blog
    1
    Par défaut
    Bugs constatés sur la version :

    Oracle Database 10g Release 10.1.0.5.0 - Production

  4. #4
    Modérateur
    Avatar de Waldar
    Homme Profil pro
    Sr. Specialist Solutions Architect @Databricks
    Inscrit en
    Septembre 2008
    Messages
    8 454
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Sr. Specialist Solutions Architect @Databricks
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2008
    Messages : 8 454
    Par défaut
    Oui, les ORA-00600 arrivent de temps à autre.
    Par contre votre requête... Ne serait-ce pas une "simple" récursion ?

    Est-ce que vous ne pouvez pas vous appuyer sur ce bout de code pour construire votre requête ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
        select level, t1.*
          from tie t1
    start with t1.typtie = 'CLI'
           and t1.sigtie = '243392'
    connect by t1.codsoc = prior t1.codsoc
           and t1.typgrp = prior t1.typtie
           and t1.siggrp = prior t1.sigtie;
    NB : j'ai peut-être mis les prior du mauvais côté, je me trompe toujours tant que je n'ai pas essayé.

  5. #5
    Expert confirmé
    Avatar de StringBuilder
    Homme Profil pro
    Chef de projets
    Inscrit en
    Février 2010
    Messages
    4 197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Chef de projets
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2010
    Messages : 4 197
    Billets dans le blog
    1
    Par défaut
    Citation Envoyé par Waldar Voir le message
    Ne serait-ce pas une "simple" récursion ?
    Oui c'est ça, sauf qu'au départ j'avais que 3 niveaux, du coup j'étais parti sur une auto-jointure, mais finalement il y en a plus

    Citation Envoyé par Waldar Voir le message
    Est-ce que vous ne pouvez pas vous appuyer sur ce bout de code pour construire votre requête ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
        select level, t1.*
          from tie t1
    start with t1.typtie = 'CLI'
           and t1.sigtie = '243392'
    connect by t1.codsoc = prior t1.codsoc
           and t1.typgrp = prior t1.typtie
           and t1.siggrp = prior t1.sigtie;
    NB : j'ai peut-être mis les prior du mauvais côté, je me trompe toujours tant que je n'ai pas essayé.
    C'est ce que j'essaie de faire (dans l'autre topic que j'ai créé ensuite).
    Mais j'y arrive pas

  6. #6
    Expert confirmé
    Avatar de laurentschneider
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Décembre 2005
    Messages
    2 944
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Suisse

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : Finance

    Informations forums :
    Inscription : Décembre 2005
    Messages : 2 944
    Par défaut
    bravo d'avoir trouvé un bug sur une version qui n'est plus supportée depuis 4 ans. As-tu essayé en 11.2.0.3 ? Sinon ça ne vaut vraiment pas la peine de contacter Oracle Support...

Discussions similaires

  1. Réponses: 40
    Dernier message: 21/08/2014, 15h35
  2. Réponses: 2
    Dernier message: 14/11/2008, 19h47
  3. Réponses: 5
    Dernier message: 11/07/2007, 12h15
  4. [XHTML] Internet Explorer Bug encore ???
    Par Risike dans le forum Balisage (X)HTML et validation W3C
    Réponses: 7
    Dernier message: 04/05/2006, 22h24
  5. [VB.NET] Bug de dll : référence non trouvée
    Par boulete dans le forum Windows Forms
    Réponses: 4
    Dernier message: 22/04/2006, 10h13

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo