回复: Re: MySQL 4.1.13 and utf-8 lang uage encoding

2006-02-02 Thread 立 周
--- Chenzhou Cui <[EMAIL PROTECTED]>写道: > 由于MySQL > 列表中绝大多数都是英文用户,我建议你在给大家发送或者回复消息时 > 不要带上许多汉字,这样会让那些非中文的朋友很尴尬。 > Chinese chracters are automatically added by Yahoo, not me. Regards, Lionel ___ 雅虎

update a Blob field using UPDATE

2006-02-02 Thread Kerry Frater
I am importing data from a non MySQL table into MySQL. In the table there is a text field of up to length 4000 chars. I have defined the column as "blob" in the MySQL table. I can read the text field of the source table into a variable e.g. mystring$. The MySQL table has been set, except for this

Re: MySQL LEFT JOIN Optimization Using LIMIT CLAUSE

2006-02-02 Thread Augusto Bott
Try this: [EMAIL PROTECTED]:ule> select * from a; ++--+ | id | data | ++--+ | 1 | a| | 2 | b| | 3 | c| | 4 | d| | 5 | e| ++--+ 5 rows in set (0.00 sec) [EMAIL PROTECTED]:ule> select * from b; ++--+ | id | data | ++--+ | 1 | aa |

Re: MySQL Connection Problem

2006-02-02 Thread mysql
do # my_print_defaults mysqld --port=3306 --socket=/var/lib/mysql/mysql.sock --skip-locking --key_buffer=16M --max_allowed_packet=1M --table_cache=64 --sort_buffer_size=512K --net_buffer_length=8K --myisam_sort_buffer_size=8M --server-id=1 To give you the defaults for your mysqld server. It may

MySQL Connection Problem

2006-02-02 Thread Rhodes, Casey
When testing my connection via Dreamweave MX, I get the following error message: 2002 Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) It was suggested to me that the server may not be running, though when I go to my System Preferences Panel (MacOSX), I have

Re: How to Find the Max/Min from Multiple Columns (in each row)

2006-02-02 Thread Aleksandar Ivanisevic
select max(greatest(measurement_01, measurement_02, measurement_03)) from table select min(least(measurement_01, measurement_02, measurement_03)) from table Henry Chang wrote: Hello everyone, I have a table where measurement values are collected in mulitple columns. Table Schema ==

SSL connection problems with Fedora Core 4

2006-02-02 Thread Julian C. Dunn
I'm trying to set up SSL connectivity to a Fedora Core 4 server running mysql-server-4.1.16-1.FC4.1 and not having much success. I keep getting ERROR 2026 (HY000): SSL connection error no matter what I do. I followed the directions on http://dev.mysql.com/doc/refman/4.1/en/secure-create-certs.ht

Re: How to Find the Max/Min from Multiple Columns (in each row)

2006-02-02 Thread Peter Brawley
Henry, >My question is that for each row, what's the sql query that determine the >max value and the min value from all the columns?? SELECT ...   GREATEST(col1,col2,...), /// PB - Henry Chang wrote: Hello everyone, I have a table where measurement values are collected in mulitple c

Re: NOT IN vs IS NULL

2006-02-02 Thread Devananda
Shawn, I've just found out that most of my emails during this discussion were NOT posted to the list because I was sending mail in HTML format and Yahoo was not delivering the bounce notices to me. That explains why you believed I was not listening to Peter's input - only _his_ messages were

MySQL LEFT JOIN Optimization Using LIMIT CLAUSE

2006-02-02 Thread Scott Klarenbach
I have a table `requirement` which is left joining to a table `inventory` based on a matching `partNumber` column. The inventory table has millions of records, the requirement table has tens of thousands. I'm noticing that the left join between requirement and inventory doesn't take advantage of

How to Find the Max/Min from Multiple Columns (in each row)

2006-02-02 Thread Henry Chang
Hello everyone, I have a table where measurement values are collected in mulitple columns. Table Schema == ID, measurement_01, measurement_02, measurement_03 == 1, 300, 350, 325(max is 350, min is 300) 2, 225, 275

Re: Differences between numbers of rows in tables

2006-02-02 Thread Dan Trainor
Joerg Bruehe wrote: Hi Dan, all! Dan Trainor wrote: Thanks for the prompt reply, Augusto - I completely understand what you're saying. To have anything such as a real-time measurement to the exact number of tables would be an incredible preformance degration, not to mention overhead and th

Re: Fastest way to log IP's

2006-02-02 Thread Jay Paulson
> I'm logging IP addresses and also searching for existing ones. Does > anyone happen to know which is more resource intensive: storing the > IP's as integers using INET_NTOA() and INET_ATON() to convert them at > each query; or simply storing the IP as a varchar? In each case the > IP field would

Re: Unclear about key_len in EXPLAIN output

2006-02-02 Thread James Harvard
'That other statement' that I quoted is actually just part of the paragraph from the manual that you quoted! My point was that it doesn't say what units the key length is given in or explain _how_ to determine the number of parts used. However the more I think about it the more I see that it mu

Re: Out of Range value adjusted?

2006-02-02 Thread SGreen
"Kerry Frater" <[EMAIL PROTECTED]> wrote on 02/02/2006 11:21:44 AM: > I am trying to test some code on the new 5.0 version and am getting > problems. > > I currently have two MYSQL's running on two differing machines. Both have > the same schema set up by the my own program. The difference is t

Re: "tmpdir" option

2006-02-02 Thread Gleb Paharenko
Hello. It'll say that the disk is full, and will not make any attemt to ignore it and use the second partition. Eamon Daly wrote: > This is wishful thinking, but I figured I'd ask anyway: the > manual states: > > "Starting from MySQL 4.1, the --tmpdir option can be set > to a list of severa

Re: Fastest way to log IP's

2006-02-02 Thread Asad Habib
Storing the IP addresses as integers requires less memory but incurrs the cost of a call to these functions for every IP address. If you are going to use these addresses in string comparisons it's best to store them as varchars. - Asad On Thu, 2 Feb 2006, Brian Dunning wrote: I'm logging I

Re: Sporadically empty result set

2006-02-02 Thread sheeri kritzer
Hi Alexander, Very weird! I tried the query myself, setting it up as such: CREATE TABLE TEMP (id int not null AUTO_INCREMENT primary_key); and inserted 18 values into it. I am amazed that: SELECT * FROM temp WHERE id=( (SELECT id FROM temp WHERE id < (SELECT ROUND(RAND()*MAX(id)) from t

Re: Fastest way to log IP's

2006-02-02 Thread SGreen
Brian Dunning <[EMAIL PROTECTED]> wrote on 02/02/2006 11:21:25 AM: > I'm logging IP addresses and also searching for existing ones. Does > anyone happen to know which is more resource intensive: storing the > IP's as integers using INET_NTOA() and INET_ATON() to convert them at > each query; or

Re: Query Speed

2006-02-02 Thread SGreen
Sorry, but you gave us a "best guess" situation. Your tables do not have any PRIMARY KEYs defined on them so I had to guess at what made each row in each table unique from all other rows in that table based only on your sample query. What value or combination of values will allow me to uniquel

Out of Range value adjusted?

2006-02-02 Thread Kerry Frater
I am trying to test some code on the new 5.0 version and am getting problems. I currently have two MYSQL's running on two differing machines. Both have the same schema set up by the my own program. The difference is that Machine 1 was set up on version 4.1 and then upgraded to 5. Machine 2 was a f

Fastest way to log IP's

2006-02-02 Thread Brian Dunning
I'm logging IP addresses and also searching for existing ones. Does anyone happen to know which is more resource intensive: storing the IP's as integers using INET_NTOA() and INET_ATON() to convert them at each query; or simply storing the IP as a varchar? In each case the IP field would be

Re: Unclear about key_len in EXPLAIN output

2006-02-02 Thread sheeri kritzer
according to: http://dev.mysql.com/doc/refman/5.0/en/explain.html "The key_len column indicates the length of the key that MySQL decided to use. The length is NULL if the key column says NULL. Note that the value of key_len enables you to determine how many parts of a multiple-part key MySQL actu

Re: database/table size

2006-02-02 Thread sheeri kritzer
Hi there, As far as I know, MySQL does not have a CREATE TABLE command do that. The only thing I can think of is if by "size" you mean "number of rows". (Which is directly proportional to the size in bytes if you do not use variable-length fields, anyway.) If so, you can have an autoincrement f

Re: items quantity

2006-02-02 Thread Peter Brawley
Gyurasits, >I have a query: >SELECT > i1.item_ID, > SUM(i1.quant) as Incoming, > SUM(IF(i2.quant is NULL, 0,i2.quant)) as Outgoing >FROM header h1 >INNER JOIN items i1 ON i1.header_ID=h1.id >LEFT JOIN header h2 ON h2.type_="2" >LEFT JOIN items i2 ON i2.header_ID=h2.id AND i1.item_ID=i2.item_

Re: latin1 ->utf8 conversion

2006-02-02 Thread Gleb Paharenko
Hello. Start from reading this part of the manual: http://dev.mysql.com/doc/refman/5.0/en/charset.html > From my understanding, the database itself never do any conversion, > meaning if you insert utf8 data into tables declared as latin1 it > doesn't really matter if you retrieve the data as ut

Re: error 1146 X.1 does not exist

2006-02-02 Thread Gleb Paharenko
Hello. MySQL CC is not supported now, and could have some problems with a fresh versions of MySQL. If error doesn't appear in latest MySQL Administrator then everything is ok. > [local] ERROR 1146: Table 'llcopy.1' doesn't exist Have a look here: http://dev.mysql.com/doc/refman/5.0/en/cannot-f

Sporadically empty result set

2006-02-02 Thread Alexander Mueller
Hi, I am trying to get the following query in MySQL 4.1 to return all rows with the next larger value of the one generated by RAND()*MAX(field) and then to randomly choose a row from these. SELECT * FROM table WHERE field= (SELECT field FROM table WHERE field

Re: items quantity

2006-02-02 Thread nigel wood
Gyurasits Zoltán wrote: Hi ALL! Please help DATA: header_iditem_idquant 1110 1220 21100 22200 3120 3215 "header" is the moving type, and "items" is the items table. If header.type_ is "1" then incoming move, if "2" o

Re: Type and Size of JOIN fields

2006-02-02 Thread Gleb Paharenko
Hello. In my opinion it shouldn't because, according to the manual the value in brackets affects only the display characteristics of the fields. See: http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html C.R.Vegelin wrote: > Hello All, > > More than once I read on this list that problems

Re: Problem storing lonf files

2006-02-02 Thread Gleb Paharenko
Hello. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/gone-away.html I suggest you to check the max_allowed_packet. See: http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html Celestino Gomez Cid wrote: >

Re: Help please

2006-02-02 Thread Gleb Paharenko
Hello. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/crashing.html If you feel that there are too much sockets in a TIME_WAIT have a look here: http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html Logg, Connie A. wrote: > Two days ago, a system that has been running f

items quantity

2006-02-02 Thread Gyurasits Zoltán
Hi ALL! Please help I have 2 tables... header -- id type_ DATA: --- id type_ 11 21 32 items -- header_id item_id quantity DATA: header_iditem_idquant 1110 1220 21100 22200 31

latin1 ->utf8 conversion

2006-02-02 Thread mel list_php
Hi list, I guess this is a classic problem...! I found that on the web: http://www.oreillynet.com/pub/wlg/9022?wlg=yes, where basically the guy did " dump data, change the charset in the table definition and reinsert the records into an utf8 database" and ended up with some problems... I saw

RE: error 1146 X.1 does not exist

2006-02-02 Thread Kerry Frater
I have seen the problem with the INSERT syntax. The new version doesn't like the use of "'s to surround text and prefers single quotes. I still don't see where the dbname.1 error is from Kerry -Original Message- From: Kerry Frater [mailto:[EMAIL PROTECTED] Sent: 02 February 2006 10:05 T

error 1146 X.1 does not exist

2006-02-02 Thread Kerry Frater
Can someone point me in the right direction. I had 4.1 running and all was well with my little program. I decided to test the code with the newer 5.0.18. I updated my DB and then tried to access it using the MYSQl Control Centre - 0.9.4-Beta and query browser 1.0.4 alpha. The Administrator allows

Re: Rows counted but not returned after join

2006-02-02 Thread Dougal Watson
> It seems like a job for a LEFT JOIN. To see the records which > are present in table A and not present in table B use this query: > > SELECT A.* > FROM A > LEFT JOIN B > USING(common_field) > WHERE B.common_field is NULL. Thanks Jeb, I¹ve been working with this idea thi

Type and Size of JOIN fields

2006-02-02 Thread C.R.Vegelin
Hello All, More than once I read on this list that problems may occur, because of unequal types and/or sizes of join fields. Suppose a Countries table with primary key ID SmallInt(5), and a Accounts table with CountryID SmallInt(4). Does this have any negative affect, eg. on performance ? By the w

Re: Differences between numbers of rows in tables

2006-02-02 Thread Joerg Bruehe
Hi Dan, all! Dan Trainor wrote: Thanks for the prompt reply, Augusto - I completely understand what you're saying. To have anything such as a real-time measurement to the exact number of tables would be an incredible preformance degration, not to mention overhead and the like. Right. This