About mysql query time-out

2010-06-18 Thread guyson
Hello,everyone,here is my question:
Q1--- in this function (mysql_options() ),the desc of MYSQL_OPT_READ_TIMEOUT in 
the Reference Manual 5.0 is as follows:The timeout in seconds for attempts to 
read from the serverMy question is how should I understand this word 
read,does it means access the result-set or excute sql or something others?I 
mean,what on earth does it read?
 
Q2---About this function mysql_query().If the querying time is too long,how can 
I stop it to let the programm return normally,Is there any options can set or 
should i just Interrupt the work thread?If i choosed to terminate the thread 
,which way is correct?Can you tell me ?
 
---Thank you for bearing my broken English.Waiting for your answers.

Table Consistency/analize/check/repair

2010-06-18 Thread Steven Staples
Hello,

I had an issue yesterday, where one of my tables ended up being closed
improperly, and needed to be repaired.   This isn't really an issue in
itself, but I didn't know about it until 2 hours after it happened, and a
script was trying to write to that table, and it failed, which caused a
backup on that script for inserting into another table.

ANYWAY, what I am wondering is, is what would be the best way to check all
my tables for errors/issues, and then run a repair on the table if it finds
an issue?

I have at least 30 tables, each having about 3-6 million rows in each, and
each table is about 2-3gigabytes in size.   So, I would like to be able to
check them only if they have anything that has changed (there is a table
created for each month of the year, for the last 2 years), it would be nice
if I didn't have to stop or put a lock on each table if I didn't have to,
and it would also be great if it was quick (running at like 2am, and
completing before 6am would be my time frame, and then Sunday morning from
2am to 8-10am is ok)

Any ideas for scripts, or premade scripts would be great.  Also, if this
would traverse to the slave mysql server too, that would be ideal.

Thanks in advance,

Steven Staples



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Table Consistency/analize/check/repair

2010-06-18 Thread a . smith

this built in command is probably a good start:

http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Table Consistency/analize/check/repair

2010-06-18 Thread Prabhat Kumar
might be this will help you.
http://adminlinux.blogspot.com/2010/05/mysql-checking-and-reparing-tables.html


On Fri, Jun 18, 2010 at 6:59 PM, a.sm...@ukgrid.net wrote:

 this built in command is probably a good start:

 http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html





 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?unsub=aim.prab...@gmail.com




-- 
Best Regards,

Prabhat Kumar
MySQL DBA
Datavail-India Mumbai
Mobile : 91-9987681929
www.datavail.com

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


AFTER Delete Trigger question

2010-06-18 Thread Kevin Labecot
Hi,Is there a way to update the same table on a delete trigger ?I need to call an UPDATE statement when a delete occurs.Best regards
--Kevin Labecot,Innovanticwww.innovantic.frTél. : 05.56.45.60.54



Re: AFTER Delete Trigger question

2010-06-18 Thread João Cândido de Souza Neto
As far as I know, you can´t change data on the same table in triggers.

Kevin Labecot ke...@labecot.fr escreveu na mensagem 
news:4d2ce38b-d169-478b-aebf-c19f20dce...@labecot.fr...
  Hi,
  Is there a way to update the same table on a delete trigger ?


  I need to call an UPDATE statement when a delete occurs.


  Best regards


  -- 
  Kevin Labecot, Innovantic
  www.innovantic.fr
  Tél. : 05.56.45.60.54

   



Re: opening a server to generalized queries but not too far

2010-06-18 Thread Don Cohen
Raj Shekhar writes:

  One option here might be to use mysql proxy as a man-in-the-middle and
  filter out unwanted queries...
This seems more or less the same as what I'm doing now with php.
The same question applies there - what would you look for in your
filter?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



CFP for Surge Scalability Conference 2010

2010-06-18 Thread Jason Dixon
We're excited to announce Surge, the Scalability and Performance
Conference, to be held in Baltimore on Sept 30 and Oct 1, 2010.  The
event focuses on case studies that demonstrate successes (and failures)
in Web applications and Internet architectures.

Our Keynote speakers include John Allspaw and Theo Schlossnagle.  We are
currently accepting submissions for the Call For Papers through July
9th.  You can find more information, including our current list of
speakers, online:

http://omniti.com/surge/2010

If you've been to Velocity, or wanted to but couldn't afford it, then
Surge is just what you've been waiting for.  For more information,
including CFP, sponsorship of the event, or participating as an
exhibitor, please contact us at su...@omniti.com.

Thanks,

-- 
Jason Dixon
OmniTI Computer Consulting, Inc.
jdi...@omniti.com
443.325.1357 x.241

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



analyze table issue

2010-06-18 Thread Steven Staples
Ok, I know I am an idiot sometimes, and I think this falls into that
category.

I use SQLYog as my MySQL front end editor.   I was looking to do some
things, and was going to run a check table command, and clicked the
analyze button, and didn't realize that all the tables in the database
were selected.

Long story short, that was at 9am this morning, and it is 230pm now, and it
is still running.  What are the ramifications of killing that process?

The database is only a total of 8 tables, and consuming about 20gb, but it
is approaching home time, and I don't want this to run all weekend long...

Can I just kill it, or will it corrupt the table it is currently on?


Steven Staples




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: analyze table issue

2010-06-18 Thread Steven Staples
Nevermind, it just finished... holy uggh!


Steven Staples



 -Original Message-
 From: Steven Staples [mailto:sstap...@mnsi.net]
 Sent: June 18, 2010 2:31 PM
 To: mysql@lists.mysql.com
 Subject: analyze table issue
 
 Ok, I know I am an idiot sometimes, and I think this falls into that
 category.
 
 I use SQLYog as my MySQL front end editor.   I was looking to do some
 things, and was going to run a check table command, and clicked the
 analyze button, and didn't realize that all the tables in the database
 were selected.
 
 Long story short, that was at 9am this morning, and it is 230pm now, and
it
 is still running.  What are the ramifications of killing that process?
 
 The database is only a total of 8 tables, and consuming about 20gb, but it
 is approaching home time, and I don't want this to run all weekend long...
 
 Can I just kill it, or will it corrupt the table it is currently on?
 
 
 Steven Staples
 
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=sstap...@mnsi.net
 
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 9.0.829 / Virus Database: 271.1.1/2917 - Release Date: 06/18/10
 02:35:00


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 16:30, Dave deal...@gmail.com wrote:
 SELECT * FROM contacts WHERE state = 'CA' and   name = 'bob' or
 name = 'sam' or name = 'sara' 

We begin by asking on the right list (mysql@lists.mysql.com, CC'd
by courtesy).

You're on the right track though.  Try a WHERE...IN statement:

SELECT * FROM contacts WHERE state='CA' AND name IN ('bob','sam','sara');

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org