Re: Subquery returns more than 1 row (1242)

2005-08-18 Thread Philippe Poelvoorde
Alvaro Cobo wrote: Hi guys: I work with some grassroot communities, which we have to keep following up. And we need to know how the population changes in the different years. What I figured out is to have two tables: one to have the name of the organization, and the second which contains the

Re: Replication question

2005-08-18 Thread Jigal van Hemert
- Original Message - From: Kishore Jalleda as per http://dev.mysql.com/doc/mysql/en/replication-compatibility.html there should be no problems On 8/17/05, Jeff [EMAIL PROTECTED] wrote: Does anyone know if there are any problems replicating from a master database on version 4.0.16 to a

mysql-connector-net problem

2005-08-18 Thread yuki_endo
Hello, I am running MySQL 5.0.11-bata and mysql-connector-net-1.0.4. The byte array returns when I issued the following query. SELECT 1/ 2; Perhaps, I think that it is new Precision Math. When can the new feature be used? __ Save the earth

Re: Order By Question

2005-08-18 Thread Felix Geerinckx
On 17/08/2005, Schimmel LCpl Robert B wrote: If I do a select * from the table without an order by clause, I get the results in the order which they were entered into the table (which is how I want them). This is not correct (e.g. on a MyISAM table in which you have done deletes - see

Re: Query from two databases

2005-08-18 Thread Gleb Paharenko
Hello. Something like this: SELECT INET_NTOA((INET_ATON(odip)8)8) AS mask , COUNT(odip) FROM a GROUP BY mask; You can merge results from both tables using UNION. See more about INET_xxx functions at:

Re: Replication question

2005-08-18 Thread Gleb Paharenko
Hello. According to: http://dev.mysql.com/doc/mysql/en/replication-compatibility.html you shouldn't have any problems, but 4.0.16 is a very old version. I strongly recommend you to upgrade. Jeff [EMAIL PROTECTED] wrote: Does anyone know if there are any problems replicating from a

Re: mysqld stops suddenly ... help please

2005-08-18 Thread Gleb Paharenko
Hello. /usr/local/mysql/libexec/mysqld: Out of memory (Needed 32704 bytes) /usr/local/mysql/libexec/mysqld: Can't read dir of '/var/tmp/' (Errcode: 11) /usr/local/mysql/libexec/mysqld: Out of memory (Needed 8156 bytes) Decrease your memory related variables. You have rather old versions

Re: views in 5.0.11

2005-08-18 Thread Gleb Paharenko
Hello. This is very similar to: http://bugs.mysql.com/bug.php?id=12382 Fix will appear in 5.0.12 Rich Allen [EMAIL PROTECTED] wrote: iH i have a view created in 5.0.11 on several innodb tables. when doing a select * on the view after first getting into the mysql command

Deleted rows

2005-08-18 Thread Scott Hamm
If I got a table as follows: ID foo 1 12345 2 12346 4 12348 6 12349 7 12388 9 12390 How do I execute a query that shows missing ID's like so: 3 5 8 I wouldn't expect for it to show deleted data that was deleted, just show the skipped ID's. That way I determine if operator deleted too much

Re: Deleted rows

2005-08-18 Thread SGreen
Scott Hamm [EMAIL PROTECTED] wrote on 08/18/2005 08:59:00 AM: If I got a table as follows: ID foo 1 12345 2 12346 4 12348 6 12349 7 12388 9 12390 How do I execute a query that shows missing ID's like so: 3 5 8 I wouldn't expect for it to show deleted data that was deleted,

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
Sujay Koduri said the following on 08/18/2005 12:31 AM: Hi, The problem here is that you have two input bind variables, but you declaring MysQL BIND array as parm_bind[1], which can hold only one input bind variable. Make it parm_bind[2]. That should work. sujay Thank you for your

RE: prepared statement problems

2005-08-18 Thread Sujay Koduri
Send the code if it is still not working. sujay -Original Message- From: Darrell Cormier [mailto:[EMAIL PROTECTED] Sent: Thursday, August 18, 2005 7:16 PM To: mysql_list Subject: Re: prepared statement problems Sujay Koduri said the following on 08/18/2005 12:31 AM: Hi, The problem

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
/ Developer: Darrell Cormier Date : 10-Aug-2005 App Name : msql_conn_env Purpose : Test MySQL connection using an environment variable for the connection string.

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
Sorry, the text of my message did not come through for some reason. I have included it below. DC Sujay Koduri said the following on 08/18/2005 08:48 AM: Send the code if it is still not working. sujay Not sure what you mean by send the code since it is included at the end of this

Trigger exception handling

2005-08-18 Thread Burke, Dan
Hello, I've been looking into converting our existing Oracle PL/SQL code to mysql. A lot of the syntax is pretty straight forward, and really doesn't require much change from what I've been testing with thus far. However, I'm trying to handle exceptions, and I cannot seem to find any

RE: prepared statement problems

2005-08-18 Thread Sujay Koduri
hi, you should use strlen() instead of sizeof() to pass the length of input bind parameter, otherwise it will read past the actual parameter and tries to compare with the whole thing which is not intended. str_length[0]= sizeof(facility); str_length[1]=sizeof(lot); is_null[0] is not

Re: Subquery returns more than 1 row (1242). Solved.

2005-08-18 Thread Alvaro Cobo
Thanks Phillipe: Perfect. It worked!!!. All solved with your help. And actually, the subquery returns more than one row, and it inserts all the data I need under the WHERE condition without any problem. Thanks again and best regards, Alvaro. - Original Message - From: Philippe

Re: Deleted rows

2005-08-18 Thread Peter Brawley
Scott, How do I execute a query that shows missing ID's like so: SELECT id AS i FROM tbl WHERE i 1 AND NOT EXISTS( SELECT id FROM tbl WHERE id = i - 1 ); PB - Scott Hamm wrote: If I got a table as follows: ID foo 1 12345 2 12346 4 12348 6 12349 7 12388 9 12390 How do I

Partial Filtering

2005-08-18 Thread Blue Wave Software
I'm having one of those slow brain days. I want a partial filter egg. All records where field1 begins with ABC any body know the where clause to do this. In Access it's where field1 = 'ABC*' but I can't find the MYSQL equivalent, or isn't there one. Regards, Justin

Re: Partial Filtering

2005-08-18 Thread Alec . Cawley
Blue Wave Software [EMAIL PROTECTED] wrote on 18/08/2005 15:57:34: I'm having one of those slow brain days. I want a partial filter egg. All records where field1 begins with ABC any body know the where clause to do this. In Access it's where field1 = 'ABC*' but I can't find the

Cost-Effective Database Scale-Out Using MySQL

2005-08-18 Thread Scott Hamm
I just got an email from MySQL concerning web seminar. Since I'm deaf I would like to attend, is there any accomodations that I can use to get in touch? There is a Video Relay Interpreting service online and am wondering if MySQL could use that service? -- Please avoid sending me Word or

Re: Partial Filtering

2005-08-18 Thread Dan Baker
Blue Wave Software [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm having one of those slow brain days. I want a partial filter egg. All records where field1 begins with ABC any body know the where clause to do this. In Access it's where field1 = 'ABC*' but I can't find the

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
Sujay Koduri said the following on 08/18/2005 09:33 AM: hi, you should use strlen() instead of sizeof() to pass the length of input bind parameter, otherwise it will read past the actual parameter and tries to compare with the whole thing which is not intended. str_length[0]= sizeof(facility);

Re: Deleted rows

2005-08-18 Thread SGreen
Peter, Your query may work for data with single-row gaps (like his example data) but it will not work if the sequence skips more than one number. Look at this sequence: 1,2,3,8,9,10 The OP would like to detect that 4,5,6, and 7 are missing from the sequence. Your query would have only found

SQL statement generated from prepared statement

2005-08-18 Thread Darrell Cormier
Is there a way to get MySQL to report the SQL statement it receives from a prepared statement execution (from a program using the C-API )? I am wondering what the SQL statement looks like that is being generated from my program to help debug it. Thanks, DC -- Darrell Cormier [EMAIL

Re: Deleted rows

2005-08-18 Thread Scott Hamm
On 8/18/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Peter, Your query may work for data with single-row gaps (like his example data) but it will not work if the sequence skips more than one number. Look at this sequence: 1,2,3,8,9,10 The OP would like to detect that 4,5,6,

Re: Deleted rows

2005-08-18 Thread Peter Brawley
Scott, Shawn, The OP would like to detect that 4,5,6, and 7 are missing from the sequence. Your query would have only found that 7 was missing. Right! For sequences longer than 1 you need something like... SELECT a.id+1 AS 'Missing From', MIN(b.id)-1 AS 'To' FROM test AS a, test AS b

MySQLDUMP Problem

2005-08-18 Thread Carlos J Souza
Sirs, When i use mysqldump on Version 4.1.x, all tables had a one record insert generated in script. When i use mysqldump on a 4.0.x version this problem dos not occurs. How to solve it? Regards For all Carlos J Souza -- MySQL General Mailing List For list archives:

how does mysql treat the these two different deleting methods?

2005-08-18 Thread James
Method A: Delete from STORIES where story_id = '1' Delete from STORIES where story_id = '3' Delete from STORIES where story_id = '5' or Method B: Delete from STORIES where story_id IN (1,3,5)...I guess this is the same as using OR's What is the state of the database if the deletion on

Re: how does mysql treat the these two different deleting methods?

2005-08-18 Thread Chris
Comments are inline. Just a friendly reminder, you replied to an existing thread then changed the subject to send this email. So people whose email clients thread messages might not even be seeing your email if they don't look inside the thread you originally replied from. James wrote:

Mysqldump Problem

2005-08-18 Thread Carlos J Souza
Sirs, When i use  mysqldump on Version 4.1.x, all tables had a one record insert generated in script. When i use mysqldump on a 4.0.x version this problem does not occurs. How to solve it? Regards For all Carlos J Souza -- MySQL General Mailing List For list archives:

Re: Mysqldump Problem

2005-08-18 Thread SGreen
Carlos J Souza [EMAIL PROTECTED] wrote on 08/18/2005 03:16:15 PM: Sirs, When i use mysqldump on Version 4.1.x, all tables had a one record insert generated in script. When i use mysqldump on a 4.0.x version this problem does not occurs. How to solve it? Regards For all Carlos J

fehler

2005-08-18 Thread Odin
hallo ich habe eine fehler meldung von mysql: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /srv/www/htdocs/web1/html/inc/class/sql.php on line 88Warning: mysql_list_tables(): supplied argument is not a valid MySQL-Link resource in

Re: fehler

2005-08-18 Thread Scott Noyes
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /srv/www/htdocs/web1/html/inc/class/sql.php on line 88 I would guess that there is some problem with the syntax of your SQL. If you make it a habit to do queries like this: $sql = SELECT * FROM table; $result =

RE: Mysqldump Problem

2005-08-18 Thread Ryan Stille
Carlos J Souza wrote: Sirs, When i use  mysqldump on Version 4.1.x, all tables had a one record insert generated in script. When i use mysqldump on a 4.0.x version this problem does not occurs. How to solve it? Not 100% sure what you are looking for, but try using --skip-extended-insert.

RE: Deleted rows

2005-08-18 Thread emierzwa
I beleive the below solution will not detect rows missing from the very top of the table, try this... select ifnull((select max(a.test_id) +1 from tests a where a.test_idb.test_id),1) as 'from' ,b.test_id -1 as 'to' from tests b left outer join

Re: Mysqldump Problem

2005-08-18 Thread SGreen
I think what you are seeing is called the extended insert format. It's much faster to process a single large INSERT statement than several smaller ones. There are two things to remember: a) if you have a lot of data in your table, an extended insert statement may become too long to re-read

MySQL 4.1 full throttled?

2005-08-18 Thread Andrew stolarz
Hi folks, I just downloaded MySQL 4.1 to see if its a go ahead with our application, I am doing a tranfser from our current datafile to MySQL, its taking about 45 min to do this process.. when I do the same process and transfer to a M$ SQL server, it takes about 2 min max. is the 4.1 of

Re: MySQL 4.1 full throttled?

2005-08-18 Thread SGreen
Andrew stolarz [EMAIL PROTECTED] wrote on 08/18/2005 03:29:39 PM: Hi folks, I just downloaded MySQL 4.1 to see if its a go ahead with our application, I am doing a tranfser from our current datafile to MySQL, its taking about 45 min to do this process.. when I do the same process and

Re: MySQL 4.1 full throttled?

2005-08-18 Thread Andrew stolarz
Hi Shawn, I am using the MySQL ODBC driver to connect from our application to the MySQL database, The actual server setting are default stright from the origional install, I am running all this from my laptop localy (both MySQL and MS SQL tests), P4 2.8GHZ, and 512mb ram. its doing

Re: MySQL 4.1 full throttled?

2005-08-18 Thread SGreen
Nope, it's not throttled by default but a bad set of INI settings can ruin your day. I also run MySQL locally on a laptop (with worse hardware figures than yours) and I have achieved Access to MySQL conversion speeds of 2000-8000 records per second (depending on the physical size of the

Re: MySQL 4.1 full throttled?

2005-08-18 Thread Brent Baisley
MySQL is not limited in anyway if you don't have a license. The default install is not optimal for the hardware you are running it on. The default parameters are set pretty low so as not to monopolize your system. If you are doing a big insert, you should adjust the appropriate buffers

Re: fehler

2005-08-18 Thread Pooly
Hallo, Ich werde in english sprechen, so : You get this error usually, when your connection with the DB juste broke, or it's not working, try to test the return value of mysql_connect, and see what is going on. Or you can have this error when the server is too busy. Tschüss ! 2005/8/18, Scott

Info

2005-08-18 Thread ajay.damarapu
Could you let me know if mysql-standard-4.1.13-sun-solaris2.9-sparc works with snort-2.4.0. I was not able to dump the log from snort into mysql. Thank you -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

password(), sha1() and md5()

2005-08-18 Thread Martin Schwarz
Hello! I am facing the following problem: When using 'update TABLE set FIELD=PASSWORD('foo');' the query 'select * from TABLE where FIELD=PASSWORD('foo');' delivers an empty set. Same with the SHA1 or MD5 functions. I am using Mac OS X Tiger (same problem with Panther) and MySQL

Re: password(), sha1() and md5()

2005-08-18 Thread Felix Geerinckx
On 18/08/2005, Martin Schwarz wrote: When using 'update TABLE set FIELD=PASSWORD('foo');' the query 'select * from TABLE where FIELD=PASSWORD('foo');' delivers an empty set. Same with the SHA1 or MD5 functions. What is the data type of your FIELD column? -- felix -- MySQL General

Re: MySQL 4.1 full throttled?

2005-08-18 Thread Andrew stolarz
Hello, I did a complete new install on another machine but this time I selected the dedicated server option during the first setup, reran the same process and its going about 3 times faster then it did before.. so it looks like I am on the right track! the current sizes I have for the

mysql_hex_string()

2005-08-18 Thread Karima Velasquez
hi everyone... i need to store binary data (corresponding to audio and video) into mysql. i'm using a longblob field. i already used the mysql_real_query() and mysql_real_escape_string(), but had no luck... :( my next idea is to try mysql_hex_string() to store the data in hex format. my

Re: mysql_hex_string()

2005-08-18 Thread Paul DuBois
At 18:41 -0400 8/18/05, Karima Velasquez wrote: hi everyone... i need to store binary data (corresponding to audio and video) into mysql. i'm using a longblob field. i already used the mysql_real_query() and mysql_real_escape_string(), but had no luck... :( my next idea is to try

Commit needed even after a select statement ??

2005-08-18 Thread Sujay Koduri
hi, i am using MysQL4.1.13. I tried doing the following. * Open a new session to DB. (Say session 1) * Using prepared statements provided by C API, issued a select statement to get some rows from a table. * This worked absolutely fine. * I didnt close the session, but