Bug #1401 | An Update Query doesn't work (in 4.0.14 it is working | ||
---|---|---|---|
Submitted: | 25 Sep 2003 12:46 | Modified: | 26 Sep 2003 0:10 |
Reporter: | Guislain Duthieuw | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
Version: | OS: | ||
Assigned to: | CPU Architecture: | Any |
[25 Sep 2003 12:46]
Guislain Duthieuw
[26 Sep 2003 0:10]
Alexander Keremidarski
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to 'Open'. Thank you for your interest in MySQL. Please elaborate more. What do you mean by "Doesn't work"? Send us also your table structure along with some data. Otherwise following your How-to-repeat instructions will simply return Table does not exist error.
[26 Sep 2003 9:57]
Guislain Duthieuw
I add some comments so ... This query goes ok on my current version of Mysql (4.0.14). It makes what it has to do... update some lines (with an order by, a limit) But on MysqL4.1a for Windows (sorry guys!! :-( ) this query makes my PCU silly (all of my resources!! arch!), and then I got a message on windows "An error has occured for this application : mysqld-nt.exe, click here to send the error report..." sorry i'm french and i don't know the exact english version). Then, mysqd-nt.exe has crashed for an unkown reason... Is there enough informations?
[26 Sep 2003 10:03]
Guislain Duthieuw
My table structure... but I have changed my query in order to be read by english.... so here is my real query, and the table structure, and the Data I have... Query : UPDATE `troupesarmees` T SET T.`bTraitement` = 8 WHERE T.`bTraitement` = 0 AND T.`bEntrainement` = 1 AND 1064518445 - T.`dDateDernierXP` > 120 ORDER BY T.`dDateDernierXP` ASC LIMIT 10 Table structure : Please, note that the field `dDateDernierXP` is a unsigned int, used like a unix_timestamp (that is why I compared it to a define time (1064518445) CREATE TABLE `troupesarmees` ( `idTroupe` int(11) NOT NULL auto_increment, `refArmee` int(11) NOT NULL default '0', `refClasse` tinyint(4) NOT NULL default '0', `nNiveau` tinyint(4) NOT NULL default '0', `nSalaire` int(11) NOT NULL default '0', `nEntretien` int(11) NOT NULL default '0', `fExperience` double NOT NULL default '0', `nNbHommes` int(11) NOT NULL default '0', `bEntrainement` tinyint(4) NOT NULL default '0', `nNiveauLimiteEntrain` tinyint(4) default NULL, `fXPProchainNiv` double default NULL, `fEvolXPParSec` double NOT NULL default '0', `dDateDernierXP` int(10) unsigned default NULL, `nCapacitePlaine` tinyint(4) NOT NULL default '0', `nCapaciteAccidente` tinyint(4) NOT NULL default '0', `nCapaciteMeuble` tinyint(4) NOT NULL default '0', `bTraitement` tinyint(4) NOT NULL default '0', PRIMARY KEY (`idTroupe`), KEY `bTraitement` (`bTraitement`), KEY `refArmee` (`refArmee`) ) TYPE=MyISAM AUTO_INCREMENT=49 ; Table Content : # # Contenu de la table `troupesarmees` # INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (2, 77, 1, 18, 2506, 250, '2185985.6812612', 26, 1, 36, '2540032', '0.132348268645358', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (20, 120, 1, 15, 1898, 189, '551276.71672944', 666, 1, 36, '747446', '0.0580043625356125', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (4, 92, 1, 19, 2794, 279, '3593483.8350241', 1, 1, 36, '3753055', '0.175495225694444', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (22, 169, 1, 1, 1204, 120, '10', 1, 0, 1, '73', '0.000729166666666667', 1062969188, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (23, 94, 1, 15, 1898, 189, '486844', 500, 0, 15, '747446', '0.0580043625356125', 1063807755, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (26, 100, 1, 10, 1413, 141, '45026', 1000, 0, 36, '75481', '0.014099537037037', 1064063762, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (36, 120, 1, 12, 1552, 155, '184049.59798475', 10, 1, 36, '198378', '0.0254588779956427', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (30, 166, 1, 1, 1204, 120, '10', 1, 0, 1, '73', '0.000729166666666667', 1063219977, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (29, 153, 1, 1, 1204, 120, '10', 1, 0, 1, '73', '0.000729166666666667', 1063054097, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (28, 158, 1, 1, 1204, 120, '10.85546875', 1, 0, 2, '73', '0.000729166666666667', 1063050703, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (25, 93, 1, 16, 2065, 206, '747446', 100, 0, 16, '1134658', '0.0772693167305236', 1063990733, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (32, 166, 1, 1, 1204, 120, '10', 1, 0, 1, '73', '0.000729166666666667', 1063219977, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (33, 166, 1, 1, 1204, 120, '10', 1, 0, 1, '73', '0.000729166666666667', 1063220157, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (34, 166, 1, 1, 1204, 120, '10', 1, 0, 1, '73', '0.000729166666666667', 1063220157, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (39, 41, 1, 13, 1646, 164, '305017.87167772', 1, 1, 36, '313062', '0.0331840277777778', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (38, 83, 1, 14, 1760, 176, '316807.32264147', 5000, 0, 36, '486844', '0.0446970164609053', 1064344063, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (40, 120, 1, 12, 1552, 155, '193729.71805555', 20, 1, 36, '198378', '0.0254588779956427', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (41, 120, 1, 10, 1413, 141, '71271.553004303', 5000, 1, 36, '75481', '0.014099537037037', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (43, 103, 1, 0, 0, 0, '0', 1, 1, 36, '10', '0.000115740740740741', 1064072221, 4, 3, 3, 66); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (44, 84, 1, 9, 1362, 136, '39820.533965985', 5000, 1, 36, '45026', '0.0109484953703704', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (45, 85, 1, 9, 1362, 136, '39785.995373269', 1, 1, 36, '45026', '0.0109484953703704', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (46, 86, 1, 9, 1362, 136, '39767.727026708', 50, 1, 36, '45026', '0.0109484953703704', 1064594310, 4, 3, 3, 0); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (47, 171, 1, 0, 0, 0, '0', 1000, 1, 36, '10', '0.000115740740740741', 1064436300, 4, 3, 3, 94); INSERT INTO `troupesarmees` (`idTroupe`, `refArmee`, `refClasse`, `nNiveau`, `nSalaire`, `nEntretien`, `fExperience`, `nNbHommes`, `bEntrainement`, `nNiveauLimiteEntrain`, `fXPProchainNiv`, `fEvolXPParSec`, `dDateDernierXP`, `nCapacitePlaine`, `nCapaciteAccidente`, `nCapaciteMeuble`, `bTraitement`) VALUES (48, 171, 1, 0, 0, 0, '0', 1000, 1, 17, '10', '0.000115740740740741', 1064436518, 4, 3, 3, 94); #I hope this could be useful...