XMLWordPrintable

Details

    Description

      The goal is to find all path from a table to got to an other one :

      MariaDB [test]> show create table path\G
      *************************** 1. row ***************************
             Table: path
      Create Table: CREATE TABLE `path` (
        `field` varchar(255) DEFAULT NULL,
        `table` varchar(255) DEFAULT NULL,
        `ref_field` varchar(255) DEFAULT NULL,
        `ref_table` varchar(255) DEFAULT NULL,
        KEY `dba5` (`table`,`ref_table`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8
      1 row in set (0.000 sec)
       
      MariaDB [test]> select * from path;
      +--------------------------------------+-----------------------------------+----------------------+-----------------------------------+
      | field                                | table                             | ref_field            | ref_table                         |
      +--------------------------------------+-----------------------------------+----------------------+-----------------------------------+
      | contact_id                           | batiment_contact                  | id                   | contact                           |
      | batiment_idBatiment                  | batiment_contact                  | idBatiment           | batiment                          |
      | compte_id                            | contact                           | id                   | compte                            |
      | type_contact_id                      | contact                           | id                   | type_contact                      |
      | id_commande_acces                    | crmes                             | idCommandeServices   | commande_services                 |
      | IdService                            | corbeille                         | IdService            | service_corbeille                 |
      | idTypeErreur                         | corbeille                         | idTypeErreur         | type_erreur                       |
      | idUtilistaeur                        | corbeille                         | id                   | user                              |
      | etape_idetape                        | corbeille                         | idetape              | etape                             |
      | idEtapecommandeservice               | histo_etape_commande_service      | id                   | etape_commande_service            |
      | iduser                               | histo_etape_commande_service      | id                   | user                              |
      | idcommandeservices                   | histo_etape_commande_service      | idCommandeServices   | commande_services                 |
      | codeErreur                           | histo_etape_commande_service      | id                   | CodeErreur                        |
      | idEtapecommandeservicesecondaire     | histo_etape_commande_service      | id                   | etape_commande_service_secondaire |
      | idcatalogueservice                   | service_passif                    | idCatalogueService   | catalogue_service                 |
      | idEquipement                         | service_passif                    | idEquipement         | equipement                        |
      | idRouteoptique                       | service_passif                    | idRO                 | route_optique                     |
      | local_id                             | document                          | idLocal              | local                             |
      | equipement_id                        | document                          | idEquipement         | equipement                        |
      | type_document_id                     | document                          | id                   | type_document                     |
      | user_creation_id                     | document                          | id                   | user                              |
      | convention_id                        | document                          | id                   | convention                        |
      | statut_document_id                   | document                          | id                   | statut_document                   |
      | site_idsite                          | document                          | idSite               | site                              |
      | batiment_idBatiment                  | document                          | idBatiment           | batiment                          |
      | idOLT                                | Stack                             | idOLT                | olt                               |
      | type_etape_deploiement_suivante_id   | transition_etape_deploiement      | id                   | type_etape_deploiement            |
      | type_etape_deploiement_precedente_id | transition_etape_deploiement      | id                   | type_etape_deploiement            |
      | idPosition                           | otactivation                      | idPosition           | position                          |
      | idCommandeServices                   | otactivation                      | idCommandeServices   | commande_services                 |
      | idPortEthernet                       | otactivation                      | idPortEthernet       | port_ethernet                     |
      | idCarte                              | otactivation                      | idCarte              | carte                             |
      | idOLT                                | otactivation                      | idOLT                | olt                               |
      | idPon                                | otactivation                      | idPon                | pon                               |
      | idCmdInfoPM                          | arCmdInfoPM                       | id                   | cmdInfoPM                         |
      | idOperateur                          | catalogue_service                 | idOperateur          | operateur                         |
      | idreseau                             | catalogue_service                 | idReseau             | reseau                            |
      | idcommandeservices                   | NotifEcrasement                   | idCommandeServices   | commande_services                 |
      | idcommandeservices                   | NotifReprovisionning              | idCommandeServices   | commande_services                 |
      | cable_id                             | extraction                        | id                   | cable                             |
      | idCr                                 | Intervention                      | idCr                 | cr                                |
      | idOt                                 | Intervention                      | idOT                 | ot                                |
      | idAction                             | droit                             | idmethode            | action                            |
      | idEtape                              | droit                             | idetape              | etape                             |
      | idValeur                             | droit                             | idvaleur             | valeur                            |
      | idChamps                             | droit                             | idChamps             | champs                            |
      | idStatutProtocolePM                  | histoProtocolePM                  | id                   | statutProtocolePM                 |
      | idErreur                             | histoProtocolePM                  | id                   | CodeErreur                        |
      | idCmdInfoPM                          | histoProtocolePM                  | id                   | cmdInfoPM                         |
      | idUser                               | histoProtocolePM                  | id                   | user                              |
      | idcommandeservices                   | CrRaccordement                    | idCommandeServices   | commande_services                 |
      | idhistoriquecrmadpm                  | crmadpm_30                        | id                   | HistoriqueCRMADPM                 |
      | idcommandeservices                   | crmad_services                    | idCommandeServices   | commande_services                 |
      | idConstructeur                       | route_optique                     | idConstructeur       | constructeur                      |
      | idEquipement                         | route_optique                     | idEquipement         | equipement                        |
      | idPortpto                            | route_optique                     | id                   | port_pto                          |
      | idOperateur                          | route_optique                     | idOperateur          | operateur                         |
      | idservicepassif                      | route_optique                     | idservicepassif      | service_passif                    |
      | idStatutRO                           | route_optique                     | id                   | StatutRouteOptique                |
      | idService                            | route_optique                     | idService            | service                           |
      | idPosition                           | otacquittement                    | idPosition           | position                          |
      | idStack                              | otacquittement                    | id                   | Stack                             |
      | idCommandeServices                   | otacquittement                    | idCommandeServices   | commande_services                 |
      | idPortEthernet                       | otacquittement                    | idPortEthernet       | port_ethernet                     |
      | idCarte                              | otacquittement                    | idCarte              | carte                             |
      | idOLT                                | otacquittement                    | idOLT                | olt                               |
      | idPon                                | otacquittement                    | idPon                | pon                               |
      | user_creation_id                     | version_document                  | id                   | user                              |
      | document_id                          | version_document                  | id                   | document                          |
      | fichier_id                           | version_document                  | id                   | fichier                           |
      | idTva                                | catalogue_service_factu           | ID                   | tva                               |
      | idCatalogueService                   | catalogue_service_factu           | idCatalogueService   | catalogue_service                 |
      | pm_id                                | batiment                          | idEquipement         | equipement                        |
      | type_projection_geographique_id      | batiment                          | id                   | type_projection_geographique      |
      | idTypeBatiment                       | batiment                          | idTypeBatiment       | type_batiment                     |
      | idstatutbatiment                     | batiment                          | idstatutbatiment     | StatutBatiment                    |
      | idSite                               | batiment                          | idSite               | site                              |
      | idRoute                              | commande_services                 | idRO                 | route_optique                     |
      | client_id                            | commande_services                 | idClient             | client                            |
      | idfluxannulation                     | commande_services                 | id                   | AnnulationCommandeAcces           |
      | idEquipement                         | commande_services                 | idEquipement         | equipement                        |
      | idOperateur                          | commande_services                 | idOperateur          | operateur                         |
      | idlocal                              | commande_services                 | idLocal              | local                             |
      | idStatutCommande                     | commande_services                 | idStatutCommande     | statut_commande                   |
      | idOtacces                            | commande_services                 | idOT                 | otacces                           |
      | idservicepassif                      | commande_services                 | idservicepassif      | service_passif                    |
      | idfluxacces                          | commande_services                 | id                   | flux_commande_acces               |
      | idOt                                 | commande_services                 | idOT                 | ot                                |
      | idTypeCommande                       | commande_services                 | idTypeCommande       | type_commande                     |
      | idont                                | commande_services                 | idONT                | ont                               |
      | idreseau                             | commande_services                 | idReseau             | reseau                            |
      | idcommande                           | commande_services                 | idCommande           | flux_commande_services            |
      | idAdresse                            | commande_services                 | idAdresse            | adresse                           |
      | idService                            | commande_services                 | idService            | service                           |
      | idhistoriquecrmadpm                  | crmadpm_22                        | id                   | HistoriqueCRMADPM                 |
      | idUtilistaeur                        | enregistrement                    | id                   | user                              |
      | idChamps                             | enregistrement                    | idChamps             | champs                            |
      | iduser                               | reporting                         | id                   | user                              |
      | idArcommande                         | crmad                             | idArcommande         | ar_commande                       |
      | commande_service_id                  | CrStoc                            | idCommandeServices   | commande_services                 |
      | idCodeInfoLivraison                  | ar_commande_services              | id                   | CodeErreur                        |
      | idCommandeServices                   | ar_commande_services              | idCommandeServices   | commande_services                 |
      | idCodeerreur                         | ar_commande_services              | id                   | CodeErreur                        |
      | idReporting                          | reporting_data                    | id                   | reporting                         |
      | idOperateur                          | reporting_data                    | idOperateur          | operateur                         |
      | idVille                              | reporting_data                    | idVille              | ville                             |
      | idDsp                                | reporting_data                    | idDSP                | dsp                               |
      | idSociete                            | dsp                               | idSociete            | societe                           |
      | idhistoriqueipe                      | ipe                               | id                   | historique_ipe                    |
      | idtypematerielpm                     | equipement                        | id                   | type_materiel_pm                  |
      | Parent                               | equipement                        | idEquipement         | equipement                        |
      | idTypePBO                            | equipement                        | idTypePBO            | typePBO                           |
      | idStatuts                            | equipement                        | idStatuts            | status                            |
      | idSousTypeObjet                      | equipement                        | id                   | SousTypeObjet                     |
      | idPlanning                           | equipement                        | idPlanning           | planning                          |
      | equipement_modele_id                 | equipement                        | id                   | equipement_modele                 |
      | idLocal                              | equipement                        | idLocal              | local                             |
      | idreseau                             | equipement                        | idReseau             | reseau                            |
      | idType                               | equipement                        | idTypeObjet          | type_objet                        |
      | idOperateur                          | operateur_contact                 | idOperateur          | operateur                         |
      | idCommandeServices                   | task                              | idCommandeServices   | commande_services                 |
      | idcodepostal                         | ville_cp                          | idcode_postal        | code_postal                       |
      | idville                              | ville_cp                          | idVille              | ville                             |
      | idCarte                              | pon                               | idCarte              | carte                             |
      | idstatutcarteport                    | pon                               | idstatut_carte       | statut_carte_port                 |
      | idCatalogueService                   | parametres                        | idCatalogueService   | catalogue_service                 |
      | idTypePlanning                       | planning                          | idTypePlanning       | type_planning                     |
      | idcodepostal                         | historique_ipe                    | idcode_postal        | code_postal                       |
      | iduser                               | historique_ipe                    | id                   | user                              |
      | idDSP                                | historique_ipe                    | idDSP                | dsp                               |
      | idville                              | historique_ipe                    | idVille              | ville                             |
      | idReseau                             | historique_ipe                    | idReseau             | reseau                            |
      | version_flux_id                      | historique_ipe                    | id                   | version_flux                      |
      | cassette_id                          | port                              | id                   | cassette                          |
      | equipement_idEquipement              | emplacement_cassette              | idEquipement         | equipement                        |
      | idPosition                           | ont                               | idPosition           | position                          |
      | idTypeONT                            | ont                               | idTypeONT            | type_ont                          |
      | idConfiguration                      | ont                               | idConfiguration      | configuration                     |
      | idRo                                 | ont                               | idRO                 | route_optique                     |
      | idstatutont                          | ont                               | id                   | statut_ont                        |
      | idOperateur                          | cmdInfoPM                         | idOperateur          | operateur                         |
      | idPM                                 | cmdInfoPM                         | idEquipement         | equipement                        |
      | idReseau                             | cmdInfoPM                         | idReseau             | reseau                            |
      | idVersion                            | cmdInfoPM                         | id                   | version_flux                      |
      | idFichierProtocolePM                 | cmdInfoPM                         | idFichier            | FichierProtocolePM                |
      | extraction_amont_id                  | tube                              | id                   | extraction                        |
      | extraction_aval_id                   | tube                              | id                   | extraction                        |
      | cable_id                             | tube                              | id                   | cable                             |
      | couleur_id                           | tube                              | id                   | couleur                           |
      | equipement_lien_id                   | tube                              | idEquipement         | equipement                        |
      | idstatutcarte                        | carte                             | idstatut_carte       | statut_carte_port                 |
      | idtypecarte                          | carte                             | idtype_carte         | type_carte                        |
      | idOLT                                | carte                             | idOLT                | olt                               |
      | idstatutposition                     | position                          | id                   | statut_position                   |
      | idPon                                | position                          | idPon                | pon                               |
      | idEtage                              | local                             | idEtage              | etage                             |
      | idTypeLocal                          | local                             | idTypeLocal          | type_local                        |
      | idTypeAdduction                      | local                             | id                   | type_adduction                    |
      | idClient                             | local                             | idClient             | client                            |
      | idBatiment                           | local                             | idBatiment           | batiment                          |
      | idEscalier                           | local                             | idEscalier           | escalier                          |
      | table_couleur_id                     | couleur_table_couleur             | id                   | table_couleur                     |
      | couleur_id                           | couleur_table_couleur             | id                   | couleur                           |
      | idCommandeServices                   | commentaire_commande              | idCommandeServices   | commande_services                 |
      | idUser                               | commentaire_commande              | id                   | user                              |
      | colonne_montante_id                  | cable                             | id                   | colonne_montante                  |
      | idtypecable                          | cable                             | id                   | type_cable                        |
      | cable_modele_id                      | cable                             | id                   | cable_modele                      |
      | convention_id                        | batiment_compte_convention        | id                   | convention                        |
      | compte_id                            | batiment_compte_convention        | id                   | compte                            |
      | batiment_idBatiment                  | batiment_compte_convention        | idBatiment           | batiment                          |
      | idcodepostal                         | adresse                           | idcode_postal        | code_postal                       |
      | idTypeVoie                           | adresse                           | idTypeVoie           | type_voie                         |
      | idRivolie                            | adresse                           | idRivolie            | rivoli                            |
      | idVille                              | adresse                           | idVille              | ville                             |
      | idStatutAdresse                      | adresse                           | idStatutAdresse      | statut_adresse                    |
      | idTypeAdresse                        | adresse                           | idTypeAdresse        | type_adresse                      |
      | idSite                               | adresse                           | idSite               | site                              |
      | idstatus                             | Creneau                           | idStatuts            | statusCreneau                     |
      | iduser                               | Creneau                           | id                   | user                              |
      | idTypeIntervention                   | Creneau                           | idTypeIntervention   | TypeIntervention                  |
      | idCommandeServices                   | Creneau                           | idCommandeServices   | commande_services                 |
      | installateur                         | Creneau                           | idInstallateur       | installateur                      |
      | iddsp                                | Creneau                           | idDSP                | dsp                               |
      | idPosition                           | otresiliation                     | idPosition           | position                          |
      | idCommandeServices                   | otresiliation                     | idCommandeServices   | commande_services                 |
      | idPortEthernet                       | otresiliation                     | idPortEthernet       | port_ethernet                     |
      | idCarte                              | otresiliation                     | idCarte              | carte                             |
      | idOLT                                | otresiliation                     | idOLT                | olt                               |
      | idPon                                | otresiliation                     | idPon                | pon                               |
      | idHistoriqueOntEligibilite           | OntEligibilite                    | id                   | HistoriqueOntEligibilite          |
      | idstatutportethernet                 | port_ethernet                     | idstatutportethernet | statut_port                       |
      | idONT                                | port_ethernet                     | idONT                | ont                               |
      | lien_optique_id                      | fibre                             | id                   | lien_optique                      |
      | tube_id                              | fibre                             | id                   | tube                              |
      | couleur_id                           | fibre                             | id                   | couleur                           |
      | idVersionSoft                        | olt                               | idVersionSoft        | version_soft                      |
      | idreseau                             | reseau_users                      | idReseau             | reseau                            |
      | id                                   | reseau_users                      | id                   | user                              |
      | idEtage                              | otelligibiliteservice             | idEtage              | etage                             |
      | idEquipement                         | otelligibiliteservice             | idEquipement         | equipement                        |
      | idPortPto                            | otelligibiliteservice             | id                   | port_pto                          |
      | idcommandeservices                   | otelligibiliteservice             | idCommandeServices   | commande_services                 |
      | idRo                                 | otelligibiliteservice             | idRO                 | route_optique                     |
      | idLocal                              | otelligibiliteservice             | idLocal              | local                             |
      | idBatiment                           | otelligibiliteservice             | idBatiment           | batiment                          |
      | idEscalier                           | otelligibiliteservice             | idEscalier           | escalier                          |
      | idUser                               | otelligibiliteservice             | id                   | user                              |
      | idOT                                 | cr                                | idOT                 | ot                                |
      | idStack                              | cr                                | id                   | Stack                             |
      | idcommandeservices                   | cr                                | idCommandeServices   | commande_services                 |
      | idtypeont                            | cr                                | idTypeONT            | type_ont                          |
      | idont                                | cr                                | idONT                | ont                               |
      | idCarte                              | cr                                | idCarte              | carte                             |
      | idOLT                                | cr                                | idOLT                | olt                               |
      | idPon                                | cr                                | idPon                | pon                               |
      | idhistoriquecrmadpm                  | CrMadPM                           | id                   | HistoriqueCRMADPM                 |
      | type_etape_deploiement_id            | etape_deploiement                 | id                   | type_etape_deploiement            |
      | projet_deploiement_site_id           | etape_deploiement                 | id                   | projet_deploiement_site           |
      | user_cloture_id                      | etape_deploiement                 | id                   | user                              |
      | user_creation_id                     | etape_deploiement                 | id                   | user                              |
      | idcodepostal                         | HistoriqueOntEligibilite          | idcode_postal        | code_postal                       |
      | iduser                               | HistoriqueOntEligibilite          | id                   | user                              |
      | idville                              | HistoriqueOntEligibilite          | idVille              | ville                             |
      | idreseau                             | HistoriqueOntEligibilite          | idReseau             | reseau                            |
      | iddsp                                | HistoriqueOntEligibilite          | idDSP                | dsp                               |
      | idDsp                                | reseau                            | idDSP                | dsp                               |
      | idHistoriqueIPE                      | ipe_30                            | id                   | historique_ipe                    |
      | idcommandeservices                   | CrmadAcces                        | idCommandeServices   | commande_services                 |
      | idOperateur                          | commande_acces                    | idOperateur          | operateur                         |
      | idlocal                              | commande_acces                    | idLocal              | local                             |
      | idStatutCommande                     | commande_acces                    | idStatutCommande     | statut_commande                   |
      | idTypeCommande                       | commande_acces                    | idTypeCommande       | type_commande                     |
      | idont                                | commande_acces                    | idONT                | ont                               |
      | idreseau                             | commande_acces                    | idReseau             | reseau                            |
      | idcommande                           | commande_acces                    | id                   | flux_commande_acces               |
      | idAdresse                            | commande_acces                    | idAdresse            | adresse                           |
      | idService                            | commande_acces                    | idService            | service                           |
      | cassette_modele_id                   | cassette                          | id                   | cassette_modele                   |
      | equipement_cassette_id               | cassette                          | id                   | emplacement_cassette              |
      | idRorepro                            | otacces                           | idRO                 | route_optique                     |
      | typeaduction                         | otacces                           | id                   | type_adduction                    |
      | idEtage                              | otacces                           | idEtage              | etage                             |
      | idEquipement                         | otacces                           | idEquipement         | equipement                        |
      | idPortPto                            | otacces                           | id                   | port_pto                          |
      | idcommandeservices                   | otacces                           | idCommandeServices   | commande_services                 |
      | idcrraccordement                     | otacces                           | id                   | CrRaccordement                    |
      | idRo                                 | otacces                           | idRO                 | route_optique                     |
      | localisationpbo                      | otacces                           | id                   | SousTypeObjet                     |
      | idLocal                              | otacces                           | idLocal              | local                             |
      | idClient                             | otacces                           | idClient             | client                            |
      | idBatiment                           | otacces                           | idBatiment           | batiment                          |
      | idEscalier                           | otacces                           | idEscalier           | escalier                          |
      | typehabitat                          | otacces                           | idTypeBatiment       | type_batiment                     |
      | idInstallateur                       | otacces                           | idInstallateur       | installateur                      |
      | idUser                               | otacces                           | id                   | user                              |
      | idcommandeservices                   | NotifRaccoKo                      | idCommandeServices   | commande_services                 |
      | idCommandeServices                   | ligne_de_commande                 | idCommandeServices   | commande_services                 |
      | idTemplate                           | ligne_de_commande                 | idTemplate           | template                          |
      | idEscalier                           | etage                             | idEscalier           | escalier                          |
      | idType_site                          | site                              | idType_site          | type_site                         |
      | pm_id                                | site                              | idEquipement         | equipement                        |
      | idcompte                             | site                              | id                   | compte                            |
      | idReseau                             | site                              | idReseau             | reseau                            |
      | idcodepostal                         | HistoriqueCRMADPM                 | idcode_postal        | code_postal                       |
      | idOperateur                          | HistoriqueCRMADPM                 | idOperateur          | operateur                         |
      | iduser                               | HistoriqueCRMADPM                 | id                   | user                              |
      | idDSP                                | HistoriqueCRMADPM                 | idDSP                | dsp                               |
      | idville                              | HistoriqueCRMADPM                 | idVille              | ville                             |
      | idPM                                 | HistoriqueCRMADPM                 | idEquipement         | equipement                        |
      | idReseau                             | HistoriqueCRMADPM                 | idReseau             | reseau                            |
      | version_flux_id                      | HistoriqueCRMADPM                 | id                   | version_flux                      |
      | lien_optique_id                      | lien_route_optique                | id                   | lien_optique                      |
      | route_optique_id                     | lien_route_optique                | idRO                 | route_optique                     |
      | idadresse                            | exclusion_adresse                 | idAdresse            | adresse                           |
      | idbatiment                           | escalier                          | idBatiment           | batiment                          |
      | colonne_montante_id                  | chemin                            | id                   | colonne_montante                  |
      | type_chemin_id                       | chemin                            | id                   | type_chemin                       |
      | local_amont_id                       | chemin                            | idLocal              | local                             |
      | local_aval_id                        | chemin                            | idLocal              | local                             |
      | idCommande                           | ar_commande                       | idCommande           | commande                          |
      | idEtapeRacco                         | histo_racco_commande_service      | id                   | etape_racco                       |
      | iduser                               | histo_racco_commande_service      | id                   | user                              |
      | idcommandeservices                   | histo_racco_commande_service      | idCommandeServices   | commande_services                 |
      | codeErreur                           | histo_racco_commande_service      | id                   | CodeErreur                        |
      | adresse_idAdresse                    | adresse_batiment                  | idAdresse            | adresse                           |
      | batiment_idBatiment                  | adresse_batiment                  | idBatiment           | batiment                          |
      | idcatalogueservice                   | service                           | idCatalogueService   | catalogue_service                 |
      | idPortEthernet                       | service                           | idPortEthernet       | port_ethernet                     |
      | isRouteoptique                       | service                           | idRO                 | route_optique                     |
      | idcommandeservices                   | ArCommandeAcces                   | idCommandeServices   | commande_services                 |
      | table_couleur_id                     | cable_modele                      | id                   | table_couleur                     |
      | idEtage                              | otelligibilite                    | idEtage              | etage                             |
      | idEquipement                         | otelligibilite                    | idEquipement         | equipement                        |
      | idPortPto                            | otelligibilite                    | id                   | port_pto                          |
      | idcommandeservices                   | otelligibilite                    | idCommandeServices   | commande_services                 |
      | idRo                                 | otelligibilite                    | idRO                 | route_optique                     |
      | idLocal                              | otelligibilite                    | idLocal              | local                             |
      | idBatiment                           | otelligibilite                    | idBatiment           | batiment                          |
      | idEscalier                           | otelligibilite                    | idEscalier           | escalier                          |
      | idUser                               | otelligibilite                    | id                   | user                              |
      | idEquipement                         | port_pto                          | idEquipement         | equipement                        |
      | port_id                              | port_pto                          | id                   | port                              |
      | idStatutportpto                      | port_pto                          | id                   | statutportpto                     |
      | statut_convention_id                 | convention                        | id                   | statut_convention                 |
      | compte_id                            | convention                        | id                   | compte                            |
      | equipement_modele_id                 | cassette_modele_equipement_modele | id                   | table_couleur                     |
      | cassette_modele_id                   | cassette_modele_equipement_modele | id                   | cassette_modele                   |
      | idcommandeservices                   | CrAnnulationCommandeAcces         | idCommandeServices   | commande_services                 |
      | type_compte_id                       | compte                            | id                   | type_compte                       |
      | type_voie_id                         | compte                            | idTypeVoie           | type_voie                         |
      | pmt_idEquipement                     | lien_pmr_pmt                      | idEquipement         | equipement                        |
      | pmr_idEquipement                     | lien_pmr_pmt                      | idEquipement         | equipement                        |
      | idOT                                 | CrCommandeAcces                   | idOT                 | otacces                           |
      | idcommandeservices                   | CrCommandeAcces                   | idCommandeServices   | commande_services                 |
      | idObjet                              | champs                            | idObjet              | objet                             |
      | idcommandeservices                   | CmdStoc                           | idCommandeServices   | commande_services                 |
      | chemin_id                            | adduction_site                    | id                   | chemin                            |
      | site_idSite                          | adduction_site                    | idSite               | site                              |
      | port_amont_id                        | lien_optique                      | id                   | port                              |
      | type_lien_optique_id                 | lien_optique                      | id                   | type_lien_optique                 |
      | port_aval_id                         | lien_optique                      | id                   | port                              |
      | idOperateur                          | template                          | idOperateur          | operateur                         |
      | idtypeont                            | template                          | idTypeONT            | type_ont                          |
      | idReseau                             | template                          | idReseau             | reseau                            |
      | idVersionSoft                        | template                          | idVersionSoft        | version_soft                      |
      | idCatalogueService                   | template                          | idCatalogueService   | catalogue_service                 |
      | escalier_id                          | colonne_montante                  | idEscalier           | escalier                          |
      | idhistoriqueipe                      | ipe_22                            | id                   | historique_ipe                    |
      | idcommandeservices                   | AnnulationCommandeAcces           | idCommandeServices   | commande_services                 |
      | idCmdInfoPM                          | CommentaireInterneProtocolePM     | id                   | cmdInfoPM                         |
      | idUser                               | CommentaireInterneProtocolePM     | id                   | user                              |
      | idRorepro                            | ot                                | idRO                 | route_optique                     |
      | idOnt                                | ot                                | idONT                | ont                               |
      | typeaduction                         | ot                                | id                   | type_adduction                    |
      | idEtage                              | ot                                | idEtage              | etage                             |
      | idEquipement                         | ot                                | idEquipement         | equipement                        |
      | idPortPto                            | ot                                | id                   | port_pto                          |
      | idcommandeservices                   | ot                                | idCommandeServices   | commande_services                 |
      | idRo                                 | ot                                | idRO                 | route_optique                     |
      | localisationpbo                      | ot                                | id                   | SousTypeObjet                     |
      | idLocal                              | ot                                | idLocal              | local                             |
      | idcodeerreur                         | ot                                | id                   | CodeErreur                        |
      | idClient                             | ot                                | idClient             | client                            |
      | idBatiment                           | ot                                | idBatiment           | batiment                          |
      | idEscalier                           | ot                                | idEscalier           | escalier                          |
      | idcr                                 | ot                                | idCr                 | cr                                |
      | typehabitat                          | ot                                | idTypeBatiment       | type_batiment                     |
      | idInstallateur                       | ot                                | idInstallateur       | installateur                      |
      | idUser                               | ot                                | id                   | user                              |
      | user_creation_id                     | projet_deploiement_site           | id                   | user                              |
      | site_id                              | projet_deploiement_site           | idSite               | site                              |
      | idLocal                              | abonne                            | idLocal              | local                             |
      +--------------------------------------+-----------------------------------+----------------------+-----------------------------------+
      353 rows in set (0.002 sec)
      

      WITH RECURSIVE paths (cur_path, cur_dest) AS 
      (
      SELECT `table`, `table` FROM `path` WHERE `table`='crmes'   
      UNION     
      SELECT CONCAT(paths.cur_path, ',', `path`.ref_table), `path`.ref_table        
      FROM paths, `path`        WHERE paths.cur_dest = `path`.`table` AND        NOT FIND_IN_SET(`path`.ref_table, paths.cur_path)
       )  
      SELECT * FROM paths where cur_dest = 'catalogue_service';
       
       
      +--------------------------------------------------------------------------------------------------+-------------------+
      | cur_path                                                                                         | cur_dest          |
      +--------------------------------------------------------------------------------------------------+-------------------+
      | crmes,commande_services,service,catalogue_service                                                | catalogue_service |
      | crmes,commande_services,service_passif,catalogue_service                                         | catalogue_service |
      | crmes,commande_services,route_optique,service,catalogue_service                                  | catalogue_service |
      | crmes,commande_services,route_optique,service_passif,catalogue_service                           | catalogue_service |
      | crmes,commande_services,ont,route_optique,service,catalogue_service                              | catalogue_service |
      | crmes,commande_services,ont,route_optique,service_passif,catalogue_service                       | catalogue_service |
      | crmes,commande_services,ot,route_optique,service,catalogue_service                               | catalogue_service |
      | crmes,commande_services,ot,route_optique,service_passif,catalogue_service                        | catalogue_service |
      | crmes,commande_services,otacces,route_optique,service,catalogue_service                          | catalogue_service |
      | crmes,commande_services,otacces,route_optique,service_passif,catalogue_service                   | catalogue_service |
      | crmes,commande_services,service,route_optique,service_passif,catalogue_service                   | catalogue_service |
      | crmes,commande_services,service_passif,route_optique,service,catalogue_service                   | catalogue_service |
      | crmes,commande_services,ot,ont,route_optique,service,catalogue_service                           | catalogue_service |
      | crmes,commande_services,ot,ont,route_optique,service_passif,catalogue_service                    | catalogue_service |
      | crmes,commande_services,ot,cr,ont,route_optique,service,catalogue_service                        | catalogue_service |
      | crmes,commande_services,ot,cr,ont,route_optique,service_passif,catalogue_service                 | catalogue_service |
      | crmes,commande_services,service,port_ethernet,ont,route_optique,service_passif,catalogue_service | catalogue_service |
      +--------------------------------------------------------------------------------------------------+-------------------+
      17 rows in set (0.040 sec)
       
      
      

      if i make directly from `information_schema`.`KEY_COLUMN_USAGE`, it's limited to 64 char, due to length to TABLE_NAME (limited to 64)

      catalogue_service ===> crmes
      crmes,commande_services,service_passif,catalogue_service  | catalogue_service
      crmes,commande_services,service,catalogue_service  | catalogue_service
      crmes,commande_services,route_optique,service_passif,catalogue_s  | catalogue_service
      crmes,commande_services,route_optique,service,catalogue_service  | catalogue_service
      crmes,commande_services,service_passif,route_optique,service,cat  | catalogue_service
      crmes,commande_services,ont,route_optique,service_passif,catalog  | catalogue_service
      crmes,commande_services,otacces,route_optique,service_passif,cat  | catalogue_service
      crmes,commande_services,ont,route_optique,service,catalogue_serv  | catalogue_service
      crmes,commande_services,otacces,route_optique,service,catalogue_  | catalogue_service
      crmes,commande_services,service,route_optique,service_passif,cat  | catalogue_service
      crmes,commande_services,ot,route_optique,service_passif,catalogu  | catalogue_service
      crmes,commande_services,ot,route_optique,service,catalogue_servi  | catalogue_service
      crmes,commande_services,ot,ont,route_optique,service_passif,cata  | catalogue_service
      crmes,commande_services,ot,ont,route_optique,service,catalogue_s  | catalogue_service
      crmes,commande_services,service,port_ethernet,ont,route_optique,  | catalogue_service
      crmes,commande_services,ot,cr,ont,route_optique,service_passif,c  | catalogue_service
      crmes,commande_services,ot,cr,ont,route_optique,service,catalogu  | catalogue_service
      ---------------------------
      

      The result is truncated and it's should be not

      Attachments

        Activity

          People

            Unassigned Unassigned
            Aurelien_LEQUOY Aurélien LEQUOY
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.