utf8, 4.1, and character length truncation in mysql system tables

2005-05-12 Thread Adam Fields
I changed the default character set on a 4.1 server to utf8.

As expected, this caused the lengths of character fields to be
shortened, requiring alter table to be run on them to extend the
lengths.

But I didn't expect that this would also shorten the mysql system
tables (the mysql db), so that usernames for newly inserted users
have been truncated to fit the next field lengths.

Is this a known issue?

Should I set the character set for the mysql db back to latin1?
Running alter table on the mysql tables to extend all of the column
lengths seems like a bad idea, but seems like what's recommended for
other tables in the manual.

Also, on a related note, these are really big tables, and running
alter table on them to modify the column lengths is taking a LOOONG
time. Any hints on speeding this up?

-- 
- Adam

** I can fix your database problems: http://www.everylastounce.com/mysql.html **

Blog... [ http://www.aquick.org/blog ]
Links.. [ http://del.icio.us/fields ]
Photos. [ http://www.aquick.org/photoblog ]
Experience. [ http://www.adamfields.com/resume.html ]
Product Reviews: .. [ http://www.buyadam.com/blog ]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: utf8, 4.1, and character length truncation in mysql system tables

2005-05-12 Thread Adam Fields
On Thu, May 12, 2005 at 10:08:33PM +0300, Gleb Paharenko wrote:
 Hello.
 
  Is this a known issue?
 
 It is interesting for me. According to the:
 
   http://dev.mysql.com/doc/mysql/en/charset-metadata.html
 
 MySQL stores usernames in utf8. Yes, you should convert your
 tables to utf8, however, in my opinion, you don't have to do
 this with 'mysql' database. Could you lose the characters from the
 users' names due to other reasons (wrong character set for your client
 application)?

I suppose that's possible. This was done through the stock mysql
client, which defaults to latin1 even if you set the server character
set to utf8 (which makes sense, as most terminals don't support utf8).

Is there something else I should be doing to create new users post
4.1?

Is this behavior something I should be worried about? (I am,
currently.)


 Adam Fields [EMAIL PROTECTED] wrote:
  I changed the default character set on a 4.1 server to utf8.
  
  As expected, this caused the lengths of character fields to be
  shortened, requiring alter table to be run on them to extend the
  lengths.
  
  But I didn't expect that this would also shorten the mysql system
  tables (the mysql db), so that usernames for newly inserted users
  have been truncated to fit the next field lengths.
  
  Is this a known issue?
  
  Should I set the character set for the mysql db back to latin1?
  Running alter table on the mysql tables to extend all of the column
  lengths seems like a bad idea, but seems like what's recommended for
  other tables in the manual.
  
  Also, on a related note, these are really big tables, and running
  alter table on them to modify the column lengths is taking a LOOONG
  time. Any hints on speeding this up?
  

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Query execution times in general query log?

2003-02-26 Thread Adam Fields
I have a need to find out how long each of the queries executed
against a mysql server are taking.

I found this post, which indicates that this information can be found
in the general query log:

http://www.phpbuilder.com/mail/php-general/2002122/0876.php

The manual note about it says the binary update log includes execution
times for writes only, and if you want timing info for general
queries, to use the general query log. However, the output in my
general query log (v3.23.54) only has a timestamp, not an execution
time.

So, a few questions...

1) Has this changed in 4.0?

2) Are there options to get this info put in the log (in 3.23 or
   otherwise)?

3) Does anybody have a better way to get this info from a running
   instance (not necessarily in realtime)?


-- 
- Adam

-
Adam Fields, Managing Partner, [EMAIL PROTECTED]
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.adamfields.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php