Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 04/12/2005, à 17:01

gillouz

[résolu] mysql un bug sous breezy qui n'existait pas sous hoary??

J'utilise une base de données mysql pour mon travail et en passant a breezy certaines requettes provoquent la déconnection au serveur mysql?? est ce un bug?

Voici le resultat sous hoary et breezy.

Sous hoary

Linux ubuntu 2.6.10-5-686 #1 Mon Oct 10 11:28:02 UTC 2005 i686 GNU/Linux

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
You have new mail.
Last login: Sat Dec  3 09:06:29 2005 from 192.168.11.57
berdoz@ubuntu:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 30497 to server version: 4.1.10a-Debian_2ubuntu0.1-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use berdoz;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> (select 'Total' as jour, @total:=sum(qt_d + qt_g )as quantite, '100' as pourcents from orders where c_mag='15vd') union (select 'Lundi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=2) union (select 'Mardi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=3) union (select 'Mercredi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=4) union (select 'Jeudi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=5) union (select 'Vendredi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=6) union (select 'Samedi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=7);
+----------+----------+-----------+
| jour     | quantite | pourcents |
+----------+----------+-----------+
| Total    |      685 | 100       |
| Lundi    |      104 | 15.2      |
| Mardi    |       80 | 11.7      |
| Mercredi |      106 | 15.5      |
| Jeudi    |      133 | 19.4      |
| Vendredi |       71 | 10.4      |
| Samedi   |      178 | 26.0      |
+----------+----------+-----------+
7 rows in set (0.26 sec)

mysql>

Sous breezy

gilles@ubuntu:~$ mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.12-Debian_1ubuntu3-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use berdoz
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> (select 'Total' as jour, @total:=sum(qt_d + qt_g )as quantite, '100' as pourcents from orders where c_mag='15vd') union (select 'Lundi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=2) union (select 'Mardi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=3) union (select 'Mercredi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=4) union (select 'Jeudi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=5) union (select 'Vendredi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=6) union (select 'Samedi' as jour, sum(qt_d + qt_g )as quantite, format(sum(qt_d + qt_g )/@total*100,1) as pourcents from orders where c_mag='15vd' and dayofweek(date_com)=7);
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>

Dans les deux cas la requette est la même.

Avez vous une idée, car ce bug m'empeche de passer mon seveur sous breezy.

Dernière modification par gillouz (Le 05/12/2005, à 15:56)

Hors ligne

#2 Le 05/12/2005, à 11:30

gillouz

Re : [résolu] mysql un bug sous breezy qui n'existait pas sous hoary??

Dés que ça devient un petit peu plus pointus y'a plus personne sur ce forum!

Hors ligne

#3 Le 05/12/2005, à 11:35

DiCiCat

Re : [résolu] mysql un bug sous breezy qui n'existait pas sous hoary??

je sais pas, tu a une erreur dans les log de mysql?
Le serveur sql continue de fonctionner ou il est planté?

Hors ligne

#4 Le 05/12/2005, à 11:47

gillouz

Re : [résolu] mysql un bug sous breezy qui n'existait pas sous hoary??

le serveur mysql n'est pas planté la connèction se réactive pour la requètte suivante et je n'ai rien dans les logs.

Je viens de trouver que le problème vient de la fonction FORMAT(). Je suis actuellement sur le manuel de mysql et ils ne disent rien sur un éventuel changement avec la version 4.1.12 de mysql.

Je pense que c'est un bug du packetage de ubuntu. Je me demande si il n'est pas possible que je desinstalle mysql 4.1.12 et que je remette 4.1.10 je pense que seuls 4 packetages sont concernées.

Je me demande si il ne faudrait pas le signaler aux personnes qui gèrent les ubuntu mais je ne sait pas bien comment faire.

Hors ligne

#5 Le 05/12/2005, à 13:24

gillouz

Re : [résolu] mysql un bug sous breezy qui n'existait pas sous hoary??

Bon en creusant encore je trouve que c'est le fait d'utiliser la variable @total dans la fonction Format() qui crée le problème.

Hors ligne

#6 Le 05/12/2005, à 15:56

gillouz

Re : [résolu] mysql un bug sous breezy qui n'existait pas sous hoary??

OK j'ai trouvé. Il suffit de remplacer la fonction format() par round() qui utilise la même syntaxe et qui marche avec la version 4.1.12 de breezy

Hors ligne