SQL Crash in calendar.php

Started by Martyn, May 30, 2004, 09:27:14 AM

Previous topic - Next topic

Martyn

everytime i save a profile, the sql service crashes
its version 4.1.1 nt (windows 200)

the error the page then gives is:
QuoteDatabase Error: Lost connection to MySQL server during query
File: Calendar.php
Line: 226

line 226 is part of the following query:
Quote// Collect all of the birthdays for this month.  I know, it's a painful query.
   // !!!SLOW At least it works, but could this really be any faster and still actually work?
   $result = db_query("
      SELECT DAYOFMONTH(birthdate) AS dom, ID_MEMBER, realName, YEAR(birthdate) AS birthYear
      FROM {$db_prefix}members
      WHERE birthdate BETWEEN '$allyear_low' AND '$allyear_high'
         OR CONCAT('{$year_low}-', LPAD(MONTH(birthdate), 2, '0'), '-', LPAD(DAYOFMONTH(birthdate), 2, '0')) BETWEEN '$low_date' AND '$high_date'" . ($year_low == $year_high ? '' : "
         OR CONCAT('{$year_high}-', LPAD(MONTH(birthdate), 2, '0'), '-', LPAD(DAYOFMONTH(birthdate), 2, '0')) BETWEEN '$low_date' AND '$high_date'"), __FILE__, __LINE__);

by the looks of the comment its not a favorite query, but either way, it has a nice habit of killing server lol

not a moan at all, since i know its in beta, just a pointout since that query may need to tweaked

[edit]i dont have masses of members either, its just me and a test account, in an empty board[/edit]

[Unknown]

It's not that slow, it's only slow if you have a lot of members.  It should never crash a proper installation of MySQL.

Remember that 4.1.1 is alpha; it may be prone to errors and crashing.  I recommend you use an earlier and more stable version.

-[Unknown]

Martyn

bah, windows 200, what was i thinking *remembers to reread posts before posting*

yea, i wont need to change sql servers, i was just running it on my test server (its going to be moved off server once i have tweaked it more (leaving the copyright in tact of course ;))) and that version of sql hasnt failed me in any other sence, so i see no need to change it, just thought id give you a heads up in  case that query will cause problems for others

Advertisement: