Post - subscribe

2007-06-06 Thread Jayadevan M
DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communicat

How to trace statements executed in a procedure called by a client?

2007-06-06 Thread Daniel Caune
Hi, First of all, I would like to apologize if I didn't send my message to the right mailing list. My question is related to MySQL administration, where I don't have any particular experience. I would to trace every SQL statement executed inside a procedure that is called by a client: CREATE PR

Re: explain

2007-06-06 Thread Baron Schwartz
Hola Ricardo, Ricardo Conrado Serafim wrote: Hi group, Someone can answer me if when I execute the "explain" in a select statement, the select is executed to get the parameters or this information came from other place? In other words, the explain covers the table and indexes or it calculate

Re: MySQL Magazine - Issue 1 available NOW!!!!

2007-06-06 Thread Peter Rosenthal
I would disagree on the use of mysql_real_escape_string(). The use of placeholders is much safer from a maintenance and 'oops look I typoed it' perspective. On 04/06/07, Jon Ribbens <[EMAIL PROTECTED]> wrote: On Mon, Jun 04, 2007 at 02:44:25PM -0700, Daevid Vincent wrote: > Thanks for the magaz

Restoring Large Tables Created with --extended-insert in mysqldump

2007-06-06 Thread dpgirago
Using mysqldump and mysql (Distribution 5.0.22) on CentOS: [?] Is it theoretically possible to create a mysqldump file using the default --opt option (i.e., with extended-inserts...) that would create packet sizes so large that the restore of the backup would fail because max_allowed_packet wo

explain

2007-06-06 Thread Ricardo Conrado Serafim
Hi group, Someone can answer me if when I execute the "explain" in a select statement, the select is executed to get the parameters or this information came from other place? In other words, the explain covers the table and indexes or it calculate based on numbers of rows, etc. regards -- R

Re: Figuring out the difference in value between 2 fields

2007-06-06 Thread Baron Schwartz
But beware unsigned math, if your columns are unsigned: create table t( a int unsigned, b int unsigned); Query OK, 0 rows affected (0.00 sec) mysql> insert into t(a, b) values(0, 100); Query OK, 1 row affected (0.00 sec) mysql> select a-b from t; +--+ | a-b

Re: Figuring out the difference in value between 2 fields

2007-06-06 Thread Peter Bradley
Ysgrifennodd Jason Pruim: Okay, so I have been gooling all over trying to figure this out. I'm sure it's easy enough to do, but I can't seem to find it. All I want to do is figure out the difference between 2 fields. IE: Field 1= 20 Field 2 =10 Difference between Field 1 & 2 is: 10 Any ideas?

recurring table corruption problems (MyISAM)

2007-06-06 Thread Quentin Gouedard
Hello, So I have this somewhat busy mysql box (300qps - 1100 qps) holding a bunch (20) of myISAM tables. The Box is Core2Duo 2.4 / 4GB RAM / Gentoo64 / MySQL 5.0.38 There are a number of scripts accessing those tables, both located on the same machine and on others. Every day, 1 to 3 tables get c

Re: Figuring out the difference in value between 2 fields

2007-06-06 Thread Dan Buettner
If they're both numeric fields, then it's as easy as: SELECT field1-field2 AS difference FROM table; and if you always want a positive number: SELECT ABS(field1-field2) AS difference FROM table; HTH, Dan On 6/6/07, Jason Pruim <[EMAIL PROTECTED]> wrote: Okay, so I have been gooling all over t

RE: Figuring out the difference in value between 2 fields

2007-06-06 Thread Chris Boget
> Okay, so I have been gooling all over trying to > figure this out. I'm sure it's easy enough to do, > but I can't seem to find it. > All I want to do is figure out the difference between > 2 fields. IE: > Field 1= 20 > Field 2 =10 > Difference between Field 1 & 2 is: 10 > Any ideas? Umm, basi

Figuring out the difference in value between 2 fields

2007-06-06 Thread Jason Pruim
Okay, so I have been gooling all over trying to figure this out. I'm sure it's easy enough to do, but I can't seem to find it. All I want to do is figure out the difference between 2 fields. IE: Field 1= 20 Field 2 =10 Difference between Field 1 & 2 is: 10 Any ideas? -- MySQL General Maili

Re: privileges and deleting from tables

2007-06-06 Thread Baron Schwartz
Hi Sergei, I can't think of anything else, but I would suggest checking the output of SHOW INNODB STATUS for clues, just in case the foreign key is causing an odd error message. I would not be surprised, as InnoDB FK error messages are sometimes hard to understand. Cheers Baron Sergei wrote

Re: privileges and deleting from tables

2007-06-06 Thread Sergei
Hello, Thanks for the answer! I checked the thing you suggested: 1) output of SHOW GRANT is correct 2) the problematic table is not a view 3) no triggers - only foreign key constraint. "ADD CONSTRAINT `mydb2_table2_ibfk_1` FOREIGN KEY (`table2_user_id`) REFERENCES `table1` (`usr_id`) ON DELETE

Re: privileges and deleting from tables

2007-06-06 Thread Baron Schwartz
Hi Sergei, Sergei wrote: Hello, I have a weird problem with privileges and deleting from tables. I have a MySQL user that has only "mydb2" database specific privileges (no SUPER privileges). All tables were created prior to granting any privileges. Privileges have been granted by this quer

privileges and deleting from tables

2007-06-06 Thread Sergei
Hello, I have a weird problem with privileges and deleting from tables. I have a MySQL user that has only "mydb2" database specific privileges (no SUPER privileges). All tables were created prior to granting any privileges. Privileges have been granted by this query: "GRANT ALL PRIVILEGES ON