Is Temporary table right approach

2009-04-15 Thread Manoj Singh
Hi All,

I have a query which returns the large number of ids which i am using in
other queries. I am doing this in PHP. Now the first query can return
unlimited number of ids which might create problem in PHP. I want to store
this ids in MYSQL through temporary table so that i can access that ids in
other queries directly.

Do you think the approach is right or there is any other good approach?

Please suggest.

Regards,
Manoj


Retrieving results of a stored function using MySql C API

2009-04-15 Thread Venu Gopal
Hi guys,
I am using stored procedures and stored functions for the first time.
And currently stuck at a this point where. I am unable to retrieve
results returned by stored function using MySql C API.

Kindly let me know how to do so. In case you need details I'll share
the source code.

Cheers,
Venu


MySQL replication status plugin

2009-04-15 Thread Gabriel - IP Guys
Good morning guys, (and girls), I hope all is well. I've been given the
task to, and I quote - Write a Nagios plugin to test the replication
status of two servers by 
comparing the position on the master to that on the slave 

 

To save myself a lot of work, I'd like to know if anything has been done
in this arena already, I would be over the moon, if someone has beaten
me to it, but I am so not in the mood to write one!

 

Any hints, recommendations, and ideas are wholly welcome!

 

---

Kind Regards,

Mr Gabriel

 



RE: MySQL replication status plugin

2009-04-15 Thread Andrew Braithwaite
You could try this:

http://www.consol.de/opensource/nagios/check-mysql-health

(in German but should be self-explanatory).

Cheers,

Andrew

-Original Message-
From: Gabriel - IP Guys [mailto:gabr...@impactteachers.com] 
Sent: 15 April 2009 10:12
To: replicat...@lists.mysql.com
Cc: mysql@lists.mysql.com
Subject: MySQL replication status plugin

Good morning guys, (and girls), I hope all is well. I've been given the
task to, and I quote - Write a Nagios plugin to test the replication
status of two servers by 
comparing the position on the master to that on the slave 

 

To save myself a lot of work, I'd like to know if anything has been done
in this arena already, I would be over the moon, if someone has beaten
me to it, but I am so not in the mood to write one!

 

Any hints, recommendations, and ideas are wholly welcome!

 

---

Kind Regards,

Mr Gabriel

 


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



Re: MySQL replication status plugin

2009-04-15 Thread Jim Lyons
I'd just write a perl script to do it and return the appropriate status
code/message to nagios.  Shouldn't be hard at all.  PhP or any language that
can talk to mysql would work, too.  You just mentioned the position, you'll
have to compare the names of the binlog files as well: position 100 in file
bin-00010 is ahead of positions 9 in file bin-9.

On Wed, Apr 15, 2009 at 4:12 AM, Gabriel - IP Guys 
gabr...@impactteachers.com wrote:

 Good morning guys, (and girls), I hope all is well. I've been given the
 task to, and I quote - Write a Nagios plugin to test the replication
 status of two servers by
 comparing the position on the master to that on the slave



 To save myself a lot of work, I'd like to know if anything has been done
 in this arena already, I would be over the moon, if someone has beaten
 me to it, but I am so not in the mood to write one!



 Any hints, recommendations, and ideas are wholly welcome!



 ---

 Kind Regards,

 Mr Gabriel






-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com


Re: MySQL replication status plugin

2009-04-15 Thread Baron Schwartz
I would not compare binlog positions.  I would use mk-heartbeat from
Maatkit.  It tells the truth in a much simpler and more direct way.
Instead of checking things that indicate your data is being
replicated, just replicate some data and check the data itself.

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



ANN: Advanced Data Generator 2.5.0 released!

2009-04-15 Thread Martijn Tonies

Dear ladies and gentlemen,

Upscene Productions is happy to announce the next
version of their test data generator tool:
Advanced Data Generator 2 (v2.5.0)

A fast test-data generator tool that comes with a library
of real-life data, can generate data to your database,
SQL script or CSV files, many filling options, presets and 
much more.


Feature highlights:
* Ability to generate more flexible and real-life master/detail data
* Ability to use (legacy) data from CSV files
* Ability to generate proper multi-column referential links
* New ways of generating data for BLOBs, CLOBs and more
* Automatic detection of table order by using Foreign Key Constraints
* Support for custom SQL statements after data generation
* Generate data to your database, SQL scripts or CSV files

This product comes in four versions:
- Pro: ADO and ODBC connectivity
- InterBase Edition
- Firebird Edition
- MySQL Edition

More info and a 30-day trial version on www.upscene.com

Pricing information available on:
http://www.upscene.com/purchase.php#adg

More information available here:
http://www.upscene.com/displaynews.php?item=20090415



With regards,

Martijn Tonies
Upscene Productions - Database Tools for Developers
http://www.upscene.com


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



Shutdown time

2009-04-15 Thread Nico Sabbi
Hi,
after many years that I've been using mysql (with almost all Innodb 
tables) I still can't make myself a reason of the unbearably long 
shutdown times: almost everytime it takes at least 4 minutes to stop 
completely and to kill the process; sometimes I even had to kill -9 
mysqld.


Currently I'm running 150 databases, 12415 tables 1694 users
and 173682 grants.

The servers are configured to use 1GB of innodb_buffer_pool_size,
innodb_log_buffer_size =8M
innodb_log_file_size  =5M
out of 4 GB available. Both run on hardware scsi raid.

What does the shutdown times depend on, and how can I reduce it?


Thanks,
Nico

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



RE: MySQL runs on 16-cores server

2009-04-15 Thread genie.japo

What kind of query do you use?
I think that MySQL is scalable in using best query on the multi-core ( or
SMP ) server.
It is same on InnoDB and MyISAM on over 4-cores.

Regards,
  Genie Japo

-Original Message-
From: Moon's Father [mailto:yueliangdao0...@gmail.com] 
Sent: Friday, April 10, 2009 8:00 PM
To: MySql
Subject: MySQL runs on 16-cores server

Hi.
   If the server has 16 cores, how to set parameters to make MySQL runs
well.
Any reply is appreciated.

-- 
I'm a MySQL DBA in china.
More about me just visit here:
http://yueliangdao0608.cublog.cn


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



Re: Shutdown time

2009-04-15 Thread Baron Schwartz
Hi!

I just blogged about this:
http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/

Short version:

mysql set global innodb_max_dirty_pages_pct = 0;

and wait until Innodb_buffer_pool_pages_dirty is smaller.  Then shut down.

On Wed, Apr 15, 2009 at 9:10 AM, Nico Sabbi nicola.sa...@poste.it wrote:
 Hi,
 after many years that I've been using mysql (with almost all Innodb
 tables) I still can't make myself a reason of the unbearably long
 shutdown times: almost everytime it takes at least 4 minutes to stop
 completely and to kill the process; sometimes I even had to kill -9
 mysqld.


 Currently I'm running 150 databases, 12415 tables 1694 users
 and 173682 grants.

 The servers are configured to use 1GB of innodb_buffer_pool_size,
 innodb_log_buffer_size =8M
 innodb_log_file_size  =5M
 out of 4 GB available. Both run on hardware scsi raid.

 What does the shutdown times depend on, and how can I reduce it?


 Thanks,
        Nico

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





-- 
Baron Schwartz, Director of Consulting, Percona Inc.
Our Blog: http://www.mysqlperformanceblog.com/
Our Services: http://www.percona.com/services.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: Shutdown time

2009-04-15 Thread Nico Sabbi
On Wednesday 15 April 2009 17:24:21 Baron Schwartz wrote:
 Hi!

 I just blogged about this:
 http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-inno
db-shutdown-times/

 Short version:

 mysql set global innodb_max_dirty_pages_pct = 0;

 and wait until Innodb_buffer_pool_pages_dirty is smaller.  Then
 shut down.


thanks a lot, it's very useful ;-)

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



Error msg: MySQL server has gone away

2009-04-15 Thread Pete Wilson


Hi folks --

New to MySQL. I'm developing C-language connector software and, while 
debugging, I often get the error message MySQL server has gone away if, say, 
I've stopped at a breakpoint and then issued a call that resembles:

mysql_query(pmysql, 
 insert into usrs(usr,email) values(\pete\, \p...@pwilson.net\); );

I can imagine this happening when the connector is running in real life. So:

What is the correct and reasonable way for a running connector to deal with 
this error intelligently?

Thanks!

-- Pete Wilson
   http://www.pwilson.net/


  

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