Re: excessive time spent in statistics status

2007-09-17 Thread Pete Harlan
On Fri, Sep 14, 2007 at 01:33:51AM -0700, Jeremy Cole wrote: Hi Shawn, Lucio, SELECT STRAIGHT_JOIN FROM ... LEFT JOIN ... WHERE ... ... Just to correct a point here... if a query uses only LEFT JOIN or RIGHT JOIN, the join order is fixed by the query's order itself, so using

Re: segment fault when using mysql++

2007-08-02 Thread Pete Harlan
He's saying that instead of this: fprintf (fp1, r[content]); You at least want something like this: fprintf (fp1, %s, r[content]); if you're going to use fprintf, or, if you want something more c++-like, you'd use a function besides fprintf altogether.

Re: su-like functionality

2007-07-24 Thread Pete Harlan
On Tue, Jul 24, 2007 at 02:18:21AM +0200, Mogens Melander wrote: On Mon, July 23, 2007 10:19, Carlo Sogono wrote: Is there a way for mysql to login as an administrator and su to a normal user? What I'd like to achieve is a way to log in to our clients' accounts (we are a web-hosting

Re: My bin.log directory is getting full

2007-04-27 Thread Pete Harlan
Perhaps the expire_logs_days variable does what you're looking for. --Pete On Thu, Apr 26, 2007 at 09:01:58PM -0400, Tim Lucia wrote: # cat /etc/cron.mysql/20-purgemasterlogs #!/bin/sh /usr/bin/mysql --defaults-file=/root/.my.cnf -e 'show master logs; purge master logs before date_sub(now(),

Bug in 4.1.21 with between comparing datetime and dates?

2006-09-13 Thread Pete Harlan
to a date in the where clause, the row is returned in both versions. --Pete -- Pete Harlan ArtSelect, Inc. [EMAIL PROTECTED] http://www.artselect.com ArtSelect is a subsidiary of a21, Inc. -- MySQL General Mailing List For list archives: http://lists.mysql.com

Re: swapping column values in update

2006-08-01 Thread Pete Harlan
On Wed, Aug 02, 2006 at 12:35:30AM +0200, Martin Jespersen wrote: I just ran the following sql (on mysql 4.1.20): update tbl set col1=col2, col2=col1 I went through this recently with the MySQL folks and the long and short of it is that the above statement is undefined in MySQL. It may

Re: MySQL 5.0.18 crashing on AMD64

2006-03-28 Thread Pete Harlan
On Tue, Mar 28, 2006 at 10:12:58AM +0200, Sander Smeenk wrote: Hello! I have a dual Opteron 250 system with 4GB memory running Debian with MySQL version 5.0.18 and unfortunately it keeps crashing at (somewhat) random intervals with messages like: | Mar 14 00:32:59 zwart mysqld[29820]: ***

Re: Question about interactive timeout

2006-03-15 Thread Pete Harlan
On Wed, Mar 15, 2006 at 05:42:40PM +0100, Mechain Marc wrote: I have a Mysql Server (4.1.8) where some sessions stay connected for a value greater than Interactive timeout value. Here is an abstract of the show processlist command: | 129996 | fret | mtt04.back:33598 | fret | Sleep

Re: display a hierarchic tree

2006-01-30 Thread Pete Harlan
On Mon, Jan 30, 2006 at 03:04:20PM +0200, Gleb Paharenko wrote: Hello. This is not an exact answer on your question, however it could be interesting for you: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html This is a good article. One thing it leaves out of the

Re: Help with SQL DELETE issue

2006-01-16 Thread Pete Harlan
Agreed. OTOH, I would recommend 4.1.15 until they solve the problem with updates in 4.1.16 apparently not using index prefixes. --Pete On Sun, Jan 15, 2006 at 05:07:08PM +, Jocelyn Fournier wrote: Hi, Excepted if he found a bug in an older version of MySQL, it's of course false ! (it

4.1.16: updates not using index prefixes

2006-01-05 Thread Pete Harlan
FYI, 4.1.16 appears not to be using prefixes of compound indexes when doing updates. Reverting to 4.1.15, or adding an index consisting of only the desired field, restores reasonable behavior. I have added feedback to a possibly-related bug, http://bugs.mysql.com/bug.php?id=15935, but wanted to

Re: R: MySQL 5.0 : error using max(idrow) on a null value

2005-11-04 Thread Pete Harlan
select ( select max(c.idrow)+1 from provasql c ) , 'This is only a test'; Does changing max(c.idrow)+1 to coalesce(max(c.idrow),0)+1 solve your problem? --Pete On Fri, Nov 04, 2005 at 04:56:26PM +0100, AESYS S.p.A. [Enzo Arlati] wrote: For a while my application should support both

Re: Per-thread memory use question

2005-08-26 Thread Pete Harlan
as they're done with it or hold onto it for (probable) future use. If I had to guess from reading that page, I'd say they probably free it, but if I had to guess from the memory use of our db server, I'd say they don't. --Pete Pete Harlan [EMAIL PROTECTED] wrote: Hi, This formula shows up

Per-thread memory use question

2005-08-25 Thread Pete Harlan
, is finished, then I only have to figure out how many threads are likely to need a sort_buffer at any given time. I looked through the manual, various online documentation, and the source, but haven't been able to determine an answer. Thanks, -- Pete Harlan [EMAIL PROTECTED] -- MySQL General Mailing

Re: Problems with x86_64 mysql-standard-4.1.12 [SOLVED]

2005-05-24 Thread Pete Harlan
On Mon, May 23, 2005 at 11:52:50PM -0700, Kevin Burton wrote: Pete Harlan wrote: In addition to failing the tests, I deployed the server on Machine 1 for a while and it failed quickly, with a simple insert hanging up and kill threadID being unable to kill it. (The thread's state was Killed

Problems with x86_64 mysql-standard-4.1.12

2005-05-23 Thread Pete Harlan
it. (The thread's state was Killed, but it didn't go away and continued to block other threads from accessing the (MyISAM) table.) Any help would be appreciated, and please let me know if I can provide further information. Thanks, -- Pete Harlan [EMAIL PROTECTED] -- MySQL General Mailing List

Re: bug or feature, 'blah' does NOT work with null records

2004-10-29 Thread Pete Harlan
On Thu, Oct 28, 2004 at 11:50:12AM +0200, Jigal van Hemert wrote: ... Fortunately there is function COALESCE() that will return the first argument that is not NULL. In case of NULL values you can use a default value for an expression: COALESCE( `col`*2, 14) will produce 14 if `col` is NULL.

Trouble compiling 4.0.21 under amd64 Debian unstable

2004-10-04 Thread Pete Harlan
/mysql \ --with-mysqld-ldflags=-all-static \ --disable-shared --enable-thread-safe-client \ --with-extra-charsets=all === Any advice appreciated. Thanks, -- Pete Harlan [EMAIL PROTECTED

Re: mysql 4.0.20 uses just one CPU on Gentoo (now: glibc patches)

2004-08-19 Thread Pete Harlan
On Wed, Aug 18, 2004 at 08:03:36AM +0400, Mike Blazer wrote: Mike Blazer wrote: In addition to my previous posting - on this machine I have glibc.2.3.2 which was installed using the Gentoo emerge native installer. Dunno, the mysql manual says a lot about various bugs and patches for glibc

Re: what os to use for mysql on amd64?

2004-07-30 Thread Pete Harlan
On Thu, Jul 29, 2004 at 06:26:23PM +0300, Egor Egorov wrote: ... No. I've forgot to tell that the -Max binary is linked dynamically because it uses SSL. Is there a reason the SSL libraries can't also be linked statically? Do you recommend against running the -Max binary, because it doesn't use

Re: NULL problem

2004-07-19 Thread Pete Harlan
It might help if you say what version of MySQL you're using, give the table schema, etc. I couldn't reproduce the behavior you describe here. --Pete On Mon, Jul 19, 2004 at 12:13:47PM -0500, Deepak Vishwanathan wrote: Hi, I have a table with a column that has the Unique key constraint

Re: Between Operator

2004-07-09 Thread Pete Harlan
On Fri, Jul 09, 2004 at 09:39:02AM -0500, Craig Hoffman wrote: Style: Traditional Area: Yosemite Rating: From: 5.5 To: 5.10c ... SELECT * FROM routes, users WHERE area='$area' AND style='$style' BETWEEN rating='[$rating1]' AND rating='[$rating2]' GROUP BY route ORDER BY rating ASC ;

Re: Help with apostrophe and FTS

2004-06-11 Thread Pete Harlan
On Fri, Jun 11, 2004 at 03:34:14PM +0300, Egor Egorov wrote: Andrea Gangini [EMAIL PROTECTED] wrote: Well yes, it's an option. I really need this functionality. But on mysql site, under source downloads, there's this warning: For maximum stability and performance, we recommend that

Re: Why can't I use an AS value in the WHERE clause.

2004-04-06 Thread Pete Harlan
On Mon, Apr 05, 2004 at 08:03:33PM -0500, Paul DuBois wrote: At 17:29 -0700 4/5/04, Daevid Vincent wrote: I'm curious when will I be able to do something like this: SELECT *, IF(( (unix_timestamp()-unix_timestamp(last_seen)) 600),1,0) as active FROM wifi_table WHERE active = 1; I think

Re: MySQL on Linux

2004-04-06 Thread Pete Harlan
The 2GB (not 2 Mb) file size limitation on Linux went away years ago. Unless your distribution is very old you won't have a problem. --Pete On Tue, Apr 06, 2004 at 05:05:59PM -0300, Ronan Lucio wrote: Hi All, I always worked with MySQL on FreeBSD systems. Now I need to install am MySQL

Re: How stable is 4.0.18?

2004-03-26 Thread Pete Harlan
My two cents: Just upgrade. We hammer on it pretty hard and the transition has not only been smooth, it's been a delight. The query cache, on our load, handles 60% of the queries, which I never imagined would happen. 4.0.18 feels as boringly stable as most released MySQLs :) --Pete On Thu,

Re: Performance Koan

2004-03-22 Thread Pete Harlan
Do a mysqldump -d on both machines to make sure the schema, and the indexes in particular, are exactly the same. Run analyze table on all tables. Make sure the MySQL conf files (e.g., /etc/my.cnf) are the same. Do an 'explain query' on both machines; the output should be the same. 4.0.1 isn't

Re: *Forcing* use of TCP/IP by clients for localhost

2004-01-30 Thread Pete Harlan
In this case it might be easier for you to just modify the MySQL source to disable looking for the socket, and treat localhost as 127.0.0.1. --Pete On Fri, Jan 30, 2004 at 06:33:22AM -0800, [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote --- i've never set up tunnels and such, but are

Re: max_user_connections problem after upgrading

2003-11-12 Thread Pete Harlan
What does show processlist say when the connections are maxed out? (You may have to leave a client logged in to reserve a slot so you can submit this query.) If it shows only a few connections, then there's something seriously wrong. If it shows a ton of idle connections, it should tell you

Re: Strategies for optimizing a read-only table

2003-11-10 Thread Pete Harlan
On Mon, Nov 10, 2003 at 05:03:35PM +0100, Harald Fuchs wrote: In article [EMAIL PROTECTED], gerald_clark [EMAIL PROTECTED] writes: Matt W wrote: Hi Jeremy, Sorry, it seems like I'm saying this a lot lately. Is it not true that if the whole table will fit in [free] RAM, that the OS

Re: InnoDB and raw tablespace

2003-11-05 Thread Pete Harlan
On Wed, Nov 05, 2003 at 12:08:29PM +1100, Chris Nolan wrote: To my knowledge, ext2 does have the [2GB filesize] limitation but ext3 does not. ext2 does not have this limitation. It was never a limitation of the filesystem, only kernel/glibc. On 64bit architectures ext2 has been handling large

Re: Hardware Raid and 2 Gig Limit

2003-10-31 Thread Pete Harlan
On Fri, Oct 31, 2003 at 05:44:02AM -0500, David T-G wrote: % % Does the 2 Gig file size limit on Linux get broken when I have a hardware % raid controller? The limit applies only to ext2 filesystems, and not all of them at that; ext3 and reiserfs (and others) can happily write much larger

Re: Using SQL variables

2003-09-23 Thread Pete Harlan
You have to initialize @var to something first, or it's just null. So try set @var := 0; before your query. Also, you don't say which version of MySQL you're using, but I'm using 4.0.14 and I can't say ... as number, * from ..., but have to say ... as number, tableName.* from HTH, --Pete

Re: ERROR 2013:Lost connection to MySQL server

2003-07-01 Thread Pete Harlan
On Wed, Jul 02, 2003 at 12:55:38AM +0300, Heikki Tuuri wrote: ... 4.0.13 has better diagnostics. Please upgrade to it if you are not using MySQL replication. Is there something wrong with 4.0.13's replication, or does it not replicate properly with 4.0.12? --Pete -- MySQL General Mailing

Upgraded 3.23 to 4.0: No problems at all.

2003-06-23 Thread Pete Harlan
packaged version, but clearly the problems aren't at the database end of things. Good work. Thanks again, -- Pete Harlan harlan @artselect.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: SQL no-op?

2003-06-06 Thread Pete Harlan
On Fri, Jun 06, 2003 at 05:19:20PM -0500, Paul DuBois wrote: At 15:11 -0700 6/6/03, Jeremy Zawodny wrote: On Fri, Jun 06, 2003 at 04:15:29PM -0500, Mark Rages wrote: I need a placeholder statement that does nothing. Is there something more elegant than SELECT FROM ... WHERE 0=1; ? I

Re: [More Info] Unique compound index slower than non-unique?

2003-04-04 Thread Pete Harlan
Following up to my own question. Some more information. SLOW: Create unique compound index on a table, do a query. FAST: Create same index, only non-unique, do a query. FAST: Do slow method, but ANALYZE TABLE before doing query. It looks like the key-distribution information that's stored by

Unique compound index slower than non-unique?

2003-03-27 Thread Pete Harlan
Hi, When querying a largish (370,000 rows) table, a unique compound index on its three int columns performs slower (as slow as no index at all) than when I use the same index created without the unique keyword. I've repeated it dozens of times: Create the index unique, and it's slow, create it

Re: Using ssh tunnel and mysql

2003-03-10 Thread Pete Harlan
On Fri, Mar 07, 2003 at 05:43:29PM -0800, Jeremy Zawodny wrote: On Fri, Mar 07, 2003 at 05:37:38PM -0800, LZ Orders wrote: Hi. I wanted to connect from a client machine to a MySQL server using ssh. I execute the following on the local machine (the server is foo.bar.com): % ssh -n -N

Re: Using ssh tunnel and mysql

2003-03-10 Thread Pete Harlan
On Mon, Mar 10, 2003 at 11:32:06AM -0600, Paul DuBois wrote: Whether it's a feature or not, it's not always so easy to figure out what to do. If you specify -h localhost, it can be argued that you really want the socket even if you specify the port. It can be argued conversely that if you

Re: Linux Filesystem Type and Performance

2003-03-05 Thread Pete Harlan
If you have that many files in a directory, I would try a filesystem that indexes directories. Reiserfs does, and there's a patch somewhere for ext2 (and probably for ext3). I don't know about the other filesystems. Otherwise the application has to do a linear search through the directory every

Re: Row numbers

2003-02-14 Thread Pete Harlan
, but that doesn't mean they want to add anything whatsoever and then maintain it forever.) 4. Those numbers probably already exist, how else does it ORDER BY, it has to put the results in an array of some kind I believe those numbers are unknown when generating the row values. -- Pete Harlan, who

Re: MySQL 4.0.9 is released

2003-01-14 Thread Pete Harlan
On Tue, Jan 14, 2003 at 12:42:18AM +0200, Jani Tolonen wrote: ... * Added join operator `FORCE INDEX (key_list)'. This acts likes `USE INDEX (key_list)' but with the addition that a table scan is assumed to be VERY expensive. One bad thing with this is that it makes `FORCE'

Re: InnoDB and auto_increment fields

2002-10-28 Thread Pete Harlan
stored? Why isn't this done automatically as it is for [ISAM] tables? As for the why, I'm not a MySQL developer, but I believe the reason goes something like this: When ISAM tables were implemented, they did it the wrong way. When other table types came along, they fixed this bug and do it the

Re: How to see whether a field is contained in a string (reverse of LIKE)

2002-10-14 Thread Pete Harlan
Or you could just reverse the arguments to LIKE, so your field is on the right and your string is on the left. You may have to surround your field with concat('%', field_name, '%') (or just use regexp), but LIKE is a binary string comparison operator and doesn't care which, if either, arguments

Re: Re: Max NB of MyISAM tables / DB ( Ext3 linux )

2002-09-26 Thread Pete Harlan
On Wed, Sep 25, 2002 at 08:49:43PM +0300, Iikka Meril?inen wrote: Hello, If the number of files is your concern, have you considered using InnoDB? It spans tables across any number of data files you want. The performance is great, too. The .frm files are still there, though, one per file.

Re: 3.23.52 hangs sometimes

2002-09-25 Thread Pete Harlan
Some people have had problems with the binary of 3.23.5x. We had that problem, and when we went back to a self-compiled 3.23.46 things worked normally again. The bad behavior looked like normal operation for anywhere from two hours to five days, followed by a CPU meltdown with loads over 200,

Re: Max NB of MyISAM tables / DB ( Ext3 linux )

2002-09-25 Thread Pete Harlan
If not, i know that ext3 can have ten of thousands files in a directory. But commande like 'ls' will become slower and slower ... Is this also slowing mysql ? I believe it would have to. There is a patch somewhere (I don't know if it's maintained) for adding indexed directories to ext2/ext3

Re: Rename Table in Replication failed / command missing in slave log

2002-08-12 Thread Pete Harlan
If you're using InnoDB tables, replication stops the slaves from running. Heikki said he'd try to get this fixed for 3.23.52. --Pete On Mon, Aug 12, 2002 at 04:05:11PM +0200, Lutz Maibach wrote: Hi, today I noticed a strange behaviour in MySQL 3.23.49a-Replication I can't explain. A

Re: Re: InnoDB: Looong pause when log file is full?

2002-08-04 Thread Pete Harlan
Hi Heikki, Thank you for responding. (http://www.innodb.com/ibman.html#InnoDB_tuning), but am getting bit when the log files are full and the buffer pool is checkpointed. InnoDB does 'fuzzy checkpoints'. That means modified database pages in the buffer pool are flushed to disk in

InnoDB: Looong pause when log file is full?

2002-08-01 Thread Pete Harlan
? Alternately, is there a way to trigger this action at night, so we can avoid it happening during the day? It shut us down for about five minutes today. Details follow. Many thanks, --Pete Harlan [EMAIL PROTECTED] Possibly relevant details: 1. Binary mysql-max-3.23.51-pc-linux-gnu-i686.tar.gz. 2

Re: Re: InnoDB: Looong pause when log file is full?

2002-08-01 Thread Pete Harlan
Thanks for your feedback (and your general untiring devotion to the cause...) On Thu, Aug 01, 2002 at 04:30:10PM -0700, Jeremy Zawodny wrote: about what we can do to alleviate this? Instead of having three 150mb log files, would we be better off with 30 15mb log files? It shouldn't

InnoDB, replication and create table w/3.23.51?

2002-07-30 Thread Pete Harlan
I just switched to using InnoDB tables (Linux, using binary mysql mysql-max-3.23.51, autocommit on), and now my replication dies when I rename a table, with: ERROR: 1192 Can't execute the given command because you have active locked

Re: NUMERIC field contents

2001-09-18 Thread Pete Harlan
On Tue, Sep 18, 2001 at 01:45:30PM -0700, Dana Powers wrote: And my question is, if you've defined your column to have (10,2) precision, why would you try to insert a higher precision number? Perhaps he's writing a report, and the application needs to know the size of the data to expect. It's

Re: How to make this code pretty?

2001-08-21 Thread Pete Harlan
Doesn't doing it that way preclude using $dbh-quote? That could mess up if the name had a single quote in it. Placeholders remove the need for manual quoting. One of their benefits. --Pete On 16 Aug 2001, Harald Fuchs wrote: I'd do it like that: my $sql = q{ REPLACE INTO

Re: Creating Table with a Default Datetime field

2001-06-27 Thread Pete Harlan
TIMESTAMP is not the solution to his problem; he wants the date to default to now() when the record is created, not updated. There's currently no way to do this in MySQL; default values must be constants. --Pete hi. check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column

Re: mysqldump bug during regenerate enum field.

2001-06-19 Thread Pete Harlan
It would seem that there is a bug, and it's that create table accepts an 'illegal' definition. It should either convert the integer to a literal (making the definition legal and dumpable), or it should barf on it. IMO, of course. --Pete [Charset iso-8859-1 unsupported, filtering to ASCII...]

Re: Re: Plase Let us know if there is a Racialism for Mysql productand

2001-04-19 Thread Pete Harlan
it on the grounds that it isn't confusing to a native English speaker is silly: It isn't English, and it's slightly ambiguous. I thought Yusuf's explanation of why it was confusing was clear, if not the King's English. -- Pete Harlan [EMAIL PROTECTED

Re: backup mysql using crontab

2001-04-02 Thread Pete Harlan
Probably because you need to redirect your output into the file AFTER all the options. Rewrite your command like this: In which shell? In SunOS /bin/sh, or in bash, the shell strips out the redirection, and the program sees what's left. It doesn't matter where the redirection is; it can even

Re: am I alone? (scale)

2001-03-14 Thread Pete Harlan
use precompiled binaries ;) Obviously one person's good experience doesn't mean there's not a problem somewhere, but we sure haven't had any trouble, and it's not for lack of hammering on it. -- Pete Harlan [EMAIL PROTECTED

Re: Quoting numbers? (was Re:MySQL Tables)

2001-02-23 Thread Pete Harlan
at as bugs the cases where it turns out to. -- Pete Harlan [EMAIL PROTECTED] (Is "Antwort" Swedish?) Tis true Rolf but you can bet your bottom dollar that at somepoint a confusion will arise when it is most inconvenient. There is always a conversion somewhere in the co

Quoting numbers? (was Re:MySQL Tables)

2001-02-21 Thread Pete Harlan
I think you'll get better results if you don't quote your numbers. Quotes should be used for text and dates (depending) but not numbers. Out of curiosity, why? We use quotes for numbers all the time here, for consistency's sake; the programmer doesn't have to worry about the representation

Re: forcing tcp/ip connect when connecting to localhost

2001-01-19 Thread Pete Harlan
can I force the mysql clients to use a tcp/ip connect if connecting to 'localhost'? Normally connecting to the true DNS hostname or the ip address of the machine will do the trick. Connecting to localhost will connect via the loopback address of 127.0.0.1. If you connect to the true DNS