--- rpl/src/instructions_s8.c 2011/09/26 15:57:16 1.39 +++ rpl/src/instructions_s8.c 2011/11/18 21:03:24 1.40 @@ -787,25 +787,17 @@ instruction_sqlquery(struct_processus *s { # define d_LONGUEUR 1024 +# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) logical1 connexion_permanente; - logical1 presence_resultat; +# endif struct_objet *s_copie_1; struct_objet *s_objet_1; struct_objet *s_copie_2; struct_objet *s_objet_2; - struct_objet *s_objet_resultat; - - struct_liste_chainee *l_element_courant; - struct_liste_chainee *l_element_courant_ligne; unsigned char *tampon; - unsigned int i; - unsigned int j; - unsigned int nombre_colonnes; - unsigned int nombre_lignes; - (*s_etat_processus).erreur_execution = d_ex; if ((*s_etat_processus).affichage_arguments == 'Y') @@ -880,7 +872,9 @@ instruction_sqlquery(struct_processus *s if ((*s_objet_1).type == LST) { +# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) connexion_permanente = d_faux; +# endif s_copie_1 = s_objet_1; @@ -910,7 +904,9 @@ instruction_sqlquery(struct_processus *s } } +# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) connexion_permanente = d_vrai; +# endif } if (((*s_objet_1).type == SQL) && ((*s_objet_2).type == CHN)) @@ -952,8 +948,18 @@ instruction_sqlquery(struct_processus *s { # ifdef MYSQL_SUPPORT - MYSQL_RES *resultat_mysql; - MYSQL_ROW ligne; + unsigned int i; + unsigned int nombre_colonnes; + + logical1 presence_resultat; + + MYSQL_RES *resultat_mysql; + MYSQL_ROW ligne; + + struct_objet *s_objet_resultat; + + struct_liste_chainee *l_element_courant; + struct_liste_chainee *l_element_courant_ligne; if (mysql_real_query((*((struct_connecteur_sql *) (*s_objet_1) .objet)).descripteur.mysql, (unsigned char *) (*s_objet_2) @@ -1155,7 +1161,19 @@ instruction_sqlquery(struct_processus *s { # ifdef POSTGRESQL_SUPPORT - PGresult *resultat_postgresql; + unsigned int i; + unsigned int j; + unsigned int nombre_colonnes; + unsigned int nombre_lignes; + + logical1 presence_resultat; + + PGresult *resultat_postgresql; + + struct_objet *s_objet_resultat; + + struct_liste_chainee *l_element_courant; + struct_liste_chainee *l_element_courant_ligne; if (PQstatus((*((struct_connecteur_sql *) (*s_objet_1).objet)) .descripteur.postgresql) != CONNECTION_OK)