Re: IF() problem

2004-11-17 Thread Jon Stephens
A clarification. If a string value begins with a digit, MySQL does not convert it to zero (FALSE), but rather to an integer made up of the leading digits in the value (until a non-digit is reached). This can be shown by using the CAST() function. mysql> SELECT '21b' = 0, CAST('21b' AS SIGNED);

using IN() clause

2004-11-17 Thread Mitul Bhammar
I've a bunch of IDs fetched(around 60,000) from a DB. I'm using these IDs to fetch data from another DB having a related fields in its tables. I'm using IN clause for it. i.e. for e.g. SELECT * FROM site_users WHERE parentUserId IN (1,2,3,4) Again here parentUserId is Indexed. The query is run

using IN()

2004-11-17 Thread Mitul Bhammar
I've a bunch of IDs fetched(around 60,000) from a DB. I'm using these IDs to fetch data from another DB having a related fields in its tables. I'm using IN clause for it. i.e. for e.g. SELECT * FROM site_users WHERE parentUserId IN (1,2,3,4) Again here parentUserId is Indexed. The query is r

want to post to mysql lists

2004-11-17 Thread Mitul Bhammar
want to post to mysql lists __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PRO

Re: Question on date calculation +

2004-11-17 Thread Simon
Ok, you said you were using a scripting language, what is it, PHP? If it is the case, I suggest you drop the last column 'DaysLeft' and make a function in the scripting language of your choice that takes the 'PostStart' and 'LenChoice' as arguments: in PHP it would write like this: (hope you un

Re: copy data only from one table to another table

2004-11-17 Thread Jim McAtee
- Original Message - From: "Daniel Kasak" <[EMAIL PROTECTED]> To: "Chip Wiegand" <[EMAIL PROTECTED]>; "MySQL List" <[EMAIL PROTECTED]> Sent: Wednesday, November 17, 2004 5:04 PM Subject: Re: copy data only from one table to another table Chip Wiegand wrote: How do I copy all data only f

Set unique from Control Centre

2004-11-17 Thread Paul Wallace
Hi, Using MYSQL Control Centre 0.9.4 Beta, I would like to set a column to be a unique field. When I choose to edit the table, the Unique radio, along with Index and Fulltext is dulled out (deactivated). No amount of 'fiddling' has enabled me to select this feature. How may I sel

Re: copy data only from one table to another table

2004-11-17 Thread Daniel Kasak
Chip Wiegand wrote: How do I copy all data only from one table into another table? Both tables are in the same database. I have phpMyAdmin and it suppossedly does this, but it is not working, and there are no error messages. Thanks, -- Chip create table table_2 select * from table_1 -- Daniel

RE: Trying to dump from GUI client

2004-11-17 Thread Sergei Skarupo
I think for your purpose the best choice in the command line utility mysqldump, which comes with mysql. MySQL CC will also let you save the results as a TSV or CSV (this is set in the preferences somewhere). Use File -> Save -> Save Results from the menu. -Original Message- From: Eve At

Re: IF() problem

2004-11-17 Thread Przemyslaw Popielarski
Jon Stephens <[EMAIL PROTECTED]> wrote: > *Any* string value evaluates as 0 (FALSE), not just the empty string. Right. Didn't know that. > You want "If BOOK1PL is not empty, return BOOK1PL, otherwise return > BOOK1EN", correct? > > Then try this instead: > > SELECT IF(BOOK1PL <> '', BOOK1PL, B

copy data only from one table to another table

2004-11-17 Thread Chip Wiegand
How do I copy all data only from one table into another table? Both tables are in the same database. I have phpMyAdmin and it suppossedly does this, but it is not working, and there are no error messages. Thanks, -- Chip -- MySQL General Mailing List For list archives: http://lists.mysql.com/my

Re: Question on date calculation +

2004-11-17 Thread Bernard Clement
No, but it will tell you how to compute the field or, maybe, change your design! You definitely need an update statement, something like: update set DaysLeft=wathever your figure out from your reading. Now how to run this automatically? Well I do not know if you are using MS WIndows or Linux.

RE: MySQL Behind Firewall

2004-11-17 Thread Dathan Vance Pattishall
3306 DVP Dathan Vance Pattishall http://www.friendster.com > -Original Message- > From: A. Clausen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 17, 2004 1:21 PM > To: MySQL Mailing List > Subject: MySQL Behind Firewall > > We are running MySQL 3.23.58-max-nt and are p

Re: Question on date calculation +

2004-11-17 Thread John McCaskey
You can't automatically update it, that would require triggers which are not supported in mysql, you would need some sort of script that runs once a day and manually uses the functions described in the linke Bernard sent you to update the field. However I would recommend a different table structur

Re: Error 1043 Bad handshake [In MySQL Administrator]

2004-11-17 Thread Chris Bailey
I have just installed MySQL Administrator on FreeBSD 5.2.1. I am trying to use the "Connect to MySQL Server Instance" dialog to establish a connection to a version: 4.0.22 MySQL server. I can establish a remote connection using: mysql -h hostname -p -u username databasename However, using MySQL A

RE: Trying to dump from GUI client

2004-11-17 Thread Eve Atley
Alright, using TOAD, I managed to get my data into CSV. When using PHPMYADMIN to load into another database, it tells me it can't read the file! -Original Message- From: Sergei Skarupo [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 4:00 PM To: Adam; [EMAIL PROTECTED]; MyS

Re: Question on date calculation +

2004-11-17 Thread Stuart Felenstein
--- Bernard Clement <[EMAIL PROTECTED]> wrote: > > You will get your answers by reading carefully the > Date Time Functions > in the MySQL Reference Manual. > This will tell me how to automatically update the column in question ? Stuart -- MySQL General Mailing List For list archives: http

Re: Question on date calculation +

2004-11-17 Thread Bernard Clement
You will get your answers by reading carefully the Date Time Functions in the MySQL Reference Manual. Look at the URL: http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html Bernard On Wednesday 17 November 2004 16:40, Stuart Felenstein wrote: > While I'm figuring this needs to be addre

Question on date calculation +

2004-11-17 Thread Stuart Felenstein
While I'm figuring this needs to be addressed via my scripting language wanted to ask here. Customers will buy a block of time to use my service. Time meaning "number of days". 90, 45, 60, etc. Here are the fields relevant to this question: PostStart [Date] LenChoice [int] DaysLeft [int] Wh

MySQL Behind Firewall

2004-11-17 Thread A. Clausen
We are running MySQL 3.23.58-max-nt and are preparing to put the server it's running on behind a firewall. What ports do I have to leave open to the outside world so that outside customers can still access their databases, run queries, manage databases, etc? -- A. Clausen[EMAIL PROTECTED]

Re: Mysql 4.1 and the LIMIT sql statement

2004-11-17 Thread Mark Papadakis
I suppose they fixed it. Relying on 'undocumented features' is a bad habbit. Update your code to exclude the LIMIT clause if you do not wish to use it. Its the best thing ou can do. Mark Papadakis On Wed, 17 Nov 2004 12:21:31 -0800, Matt Babineau <[EMAIL PROTECTED]> wrote: > Hi all- > > Has

RE: Trying to dump from GUI client

2004-11-17 Thread Sergei Skarupo
If I remember correctly, with "select into outfile" the outfile has to be on the server. -Original Message- From: Adam [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 4:04 PM To: [EMAIL PROTECTED]; MySQL General Subject: Re: Trying to dump from GUI client Eve, >From the comm

Re: Mysql 4.1 and the LIMIT sql statement

2004-11-17 Thread Dan Nelson
In the last episode (Nov 17), Matt Babineau said: > Has anyone run into problems with this sql syntax? > > LIMIT -1 > > I've used this extensively in my code to get back all records rather then > specifing a limit. I've done this programmatically with PHP, so all my > queries have a limit even if

Re: Server Won't Start "Next record offset is nonsensical"

2004-11-17 Thread Clif Smith
>Cliff, your OS or hardware has probably corrupted the ibdata file. Ouch! Next record offset is nonsensical 28769 in record at offset 7022 Before writing an index page to the file, InnoDB checks that offsets are sensible (< 16 kB). InnoDB: rec address 407b1b6e, first buffer frame 401c InnoDB

Mysql 4.1 and the LIMIT sql statement

2004-11-17 Thread Matt Babineau
Hi all- Has anyone run into problems with this sql syntax? LIMIT -1 I've used this extensively in my code to get back all records rather then specifing a limit. I've done this programmatically with PHP, so all my queries have a limit even if I don't need one, I just have it specify LIMIT -1, but

RE: Trying to dump from GUI client

2004-11-17 Thread Matt Babineau
I'm not sure what the answer here is but check your user's permissions on the database to make sure it has the necessary items GRANTED to it. Matt Babineau Web Developer Criticalcode - http://www.criticalcode.com -Original Message- From: Eve Atley [mailto:[EMAIL PROTECTED] Sent: Wednes

RE: Trying to dump from GUI client

2004-11-17 Thread Eve Atley
I am trying MySQL Query Browser, but I get this error... SELECT * INTO OUTFILE 'c:\temp\candidate.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM candidate; ERROR 1045: Access denied for user: 'wowdba'@'%' (Using password: YES) ...even though I am logged i

RE: MySQL 4.0.2 is topping out at 1024 threads!

2004-11-17 Thread Matt Babineau
FIXED! Ok Thanks to Eric on this one, the wait_timeout configuration was what fixed my sleepy connection problems! Thanks ERIC! Matt Babineau Web Developer Criticalcode - http://www.criticalcode.com -Original Message- From: Eric Gunnett [mailto:[EMAIL PROTECTED] Sent: Wednesd

RE: question about showing db and/or table size

2004-11-17 Thread Jay Blanchard
[snip] I know there must be a command line query to show the size of the database or of specific tables. What is it? I've been unable to find anything in the online manual (of course that presupposes I've been looking in the right place). [/snip] SHOW TABLE STATUS [FROM `table`] http://dev.mysql.

Static library for MySQL C API

2004-11-17 Thread Karam Chand
Hello, Is it possible to get static library for MySQL C API() instead of libmysql.dll? Regards, Karam __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com -- MySQL General Mailing List For list archives: http:

Re: IF() problem

2004-11-17 Thread Jon Stephens
Date: Wed, 17 Nov 2004 12:50:47 +0100 To: [EMAIL PROTECTED] From: "Przemyslaw Popielarski" <[EMAIL PROTECTED]> Subject: IF() problem Message-ID: <[EMAIL PROTECTED]> select IF(BOOK1PL,BOOK1PL,BOOK1EN) from tBooksextra where ksi='id' -> (content of BOOK1EN) select BOOK1PL from tBooksextra WHERE BOOK

question about showing db and/or table size

2004-11-17 Thread Susan Ator
I know there must be a command line query to show the size of the database or of specific tables. What is it? I've been unable to find anything in the online manual (of course that presupposes I've been looking in the right place). Thanks, Susan -- MySQL General Mailing List For list archives:

RE: MySQL 4.0.2 is topping out at 1024 threads!

2004-11-17 Thread Matt Babineau
Ok, this is making a bit more sense now, I took a look at show processlist and this is what I found: | 25687 | inetusr | 62.13.102.133:48206 | protected | Sleep | 454 | | NULL The screen scrolls up with these sleeping connections, any way I can get these guys dumped if they've been sleeping t

Re: MySQL 4.0.2 is topping out at 1024 threads!

2004-11-17 Thread Dan Nelson
In the last episode (Nov 17), Matt Babineau said: > This is a very strange problem. As you can see there isn't a lot going on, > under a million queries. No problem right? This is a dual cpu 2.8 Ghz > server. Ok Great. I am also including my.cnf so you can see my > configuration. > > Here is some

RE: MySQL 4.0.2 is topping out at 1024 threads!

2004-11-17 Thread Alvaro Avello
threads or connections ? if the problem is about connection maybe change the parameter in your my.cnf : max_connections = 1024 to a higher value ... Hope this helps... Saludos / Regards, Alvaro. On Wed, 2004-11-17 at 11:18 -0800, Matt Babineau wrote: > From: >

RE: MySQL 4.0.2 is topping out at 1024 threads!

2004-11-17 Thread Matt Babineau
This is a very strange problem. As you can see there isn't a lot going on, under a million queries. No problem right? This is a dual cpu 2.8 Ghz server. Ok Great. I am also including my.cnf so you can see my configuration. Here is some more info on the problem I am experiencing: mysql> status ---

Re: MySQL 4.1.7 connections hang with earlier clients

2004-11-17 Thread Gleb Paharenko
Hello. There were several bugs which cause server crashes on some queries. What queries did you use? On which tables? Send us yor my.ini files and output of show create table on tables used in your queries. Can you produce a test case for your problems? You may upload your error log to ftp:

Re: Mysql & NTFS

2004-11-17 Thread Gleb Paharenko
Hello. Not enough info to make a conslusion. Send us your my.ini and a piece of error log file which corresponds to your problem. Do you use named pipes? Can server start if you use tcp instead? May be some antivirus concurently uses your files? Or another copy of MySQL is running. Can you che

Re: Error 1043 Bad handshake

2004-11-17 Thread Gleb Paharenko
Hello. A very comprehensive answer posted by Shawn Green you may read at: http://lists.mysql.com/mysql/173657 Aslo see: http://dev.mysql.com/doc/mysql/en/Programs_Known_to_Work_With_MyODBC.html May be you should really carefully read topics of documentation related to MyODBC. See: ht

Re:[SOLVED] Limit error

2004-11-17 Thread Stuart Felenstein
Note to self, check variables for typos before posting to list! --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Limit error

2004-11-17 Thread Stuart Felenstein
I'm trying to paginate my record results. Running into a sql syntax error that is boggling my limited brain cells. The print out of my statement as it is parsed: This is before the error occurs, the first 15 records return fine: WHERE VendorJobs.Industry IN ('3') AND VendorJobs.JobTitle LIKE '%%

Re: MySQL 4.0.2 is topping out at 1024 threads!

2004-11-17 Thread Dan Nelson
In the last episode (Nov 17), Gleb Paharenko said: > > Help! I can't figure out a way to stop my server from topping out > > at 1024 threads. This is a very strange behavoir. I have tons of > > legit use on my database server but I don't think the threads are > > dying does anyone have any suggesti

Re: Error 1043 Bad handshake

2004-11-17 Thread jabbott
An answer to my own question. I have solved this problem which seems to be due to the way mysql 4.1.7 stores it's passwords. I used the mysql function OLD_PASSWORD to make mysql store it's passwords in the pre 4.1.x method. Basically the syntax is: mysql> UPDATE mysql.user SET Password = OLD

MySQL 4.1.7 connections hang with earlier clients

2004-11-17 Thread Klaus Prückl
Hi, we are running a MySQL 4.1.7 database on a Windows Server 2003 configured as "server machine" with "transactional databases only" and "decision support". With this server we are experiencing troubles with old clients (MySQL Control Center 0.94 and ByteFX .NET Provider 0.76) when running a s

Re: MySQL 4.0.2 is topping out at 1024 threads!

2004-11-17 Thread Gleb Paharenko
Hello. Similar problems are often found in lists. Usually they are solved by increasing file limits. You likely need to increase open-files-limit. >Help! I can't figure out a way to stop my server from topping out at 1024 >threads. This is a very strange behavoir. I have tons of legit use

Re: Table # of rows changing?

2004-11-17 Thread Gleb Paharenko
Hello. I've found a good answer of Heikki Tuuri: "InnoDB does not keep accurate row counts. They are only estimates based on 10 random dives into the clustered index tree." See: http://dev.mysql.com/doc/mysql/en/InnoDB_restrictions.html "Jeff Burgoon" <[EMAIL PROTECTED]> wrote: > I hav

Re: Error 1043 Bad handshake

2004-11-17 Thread Gleb Paharenko
Hello. Did you use mysql client program from 4.1.7 installation? When you use it from 4.1.0 or older (on another machine) there some differences in authentication handshake. [EMAIL PROTECTED] wrote: > > I have done some looking in the archive for this but can't seem to find > anyth

Re: Server Won't Start "Next record offset is nonsensical"

2004-11-17 Thread Gleb Paharenko
Hello, Clif. Some times such problems were solved by increasing variables responsible for memory usage. Also if you dig deeper in lists archives you may find a lot of succesfull solutions on similar problems. What exact version of MySQL do you use? In old versions there were several bugs with

Re: mysqld-nt error 23. Urgent pls

2004-11-17 Thread A Z
Thanks, We tried copying the file but with no success. Running Norton DD reported errors with file descriptors. regards --- Heikki Tuuri <[EMAIL PROTECTED]> wrote: > Hi! > > 4.0.14 on Windows prints a wrong (errno) > explanation. You should look at > http://dev.mysql.com/doc/mysql/en/Operat

Mysql & NTFS

2004-11-17 Thread A Z
MySQL 4.0.14 Are there any known issues with MySQL (above version) and NTFS file system with 120 GB of hard-disk and Win 2000 pro. We are facing a problem of mysqld-nt crashing intermittently, throwing error numbers 995, 32. any help is appreciated. regards ___

IF() problem

2004-11-17 Thread Przemyslaw Popielarski
select IF(BOOK1PL,BOOK1PL,BOOK1EN) from tBooksextra where ksi='id' -> (content of BOOK1EN) select BOOK1PL from tBooksextra WHERE BOOK1PL IS NOT NULL AND BOOK1PL!='' AND ksi='id' -> (content of BOOK1PL). Why didn't I get the content of BOOK1PL in 1st query? (checked in 4.0.21 and 4.1.7) ./

Problems with simultaneous reads and writes to database

2004-11-17 Thread Pawel Marzec
Hi, I work in an internet company that runs a web site with classifieds. We have got more than million page views daily and over a half a million classifieds with 2 weeks long life-cycle on an average. We use PHP and MySQL 4.0.18. We have got problems with simultaneous reads and writes to a databa

Re: Mysql-4.1.7 Start - Ended error - Solaris 8

2004-11-17 Thread Heikki Tuuri
Alessio, the error means that the user running mysqld does not have the access rights to the MySQL 'datadir' (datadir is typically `/usr/local/mysql/data' for a binary installation). Use Unix commands man chown man chmod to get advice on how to set the owner and the access rights of a directory.

Fw: Mysql-4.1.7 and client library - Client does not support authentication protocol requested by server; consider upgrading MySQL client

2004-11-17 Thread webmaster
> Yare sure that this resolves my problem? > My problem is the client graphical (webmin or phpmyadmin), working from > shell (SSH) is all to place. > Thanks > Alessio > > > - Original Message - > From: "Dathan Vance Pattishall" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECT

Re: Mysql taking 100% Mem utilisation

2004-11-17 Thread Heikki Tuuri
Naveen, the size of the mysqld process is only 1.7 GB, and you have plenty of free memory. Swap usage is zero. Best regards, Heikki Tuuri Innobase Oy Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables htt

Re: mysqld-nt error 23. Urgent pls

2004-11-17 Thread Heikki Tuuri
Hi! 4.0.14 on Windows prints a wrong (errno) explanation. You should look at http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html " 23 (ERROR_CRC) Data error (cyclic redundancy check). " Your file (system) is corrupt, and Windows notices it. It is a hardware fault or a Windows bug.

Re: Server Won't Start "Next record offset is nonsensical"

2004-11-17 Thread Heikki Tuuri
Cliff, your OS or hardware has probably corrupted the ibdata file. Next record offset is nonsensical 28769 in record at offset 7022 Before writing an index page to the file, InnoDB checks that offsets are sensible (< 16 kB). InnoDB: rec address 407b1b6e, first buffer frame 401c InnoDB: buffer

RE: SELECT DISTINCT : I've found one trick !

2004-11-17 Thread BARBIER Luc 099046
Answer to my query "select distinct" http://lists.mysql.com/mysql/175839 To select properly only one time one element of a column in a list (here the journal name) I have to add a selection on the end of the name that it is not a space or a return ! Both a