Re: Select Binary Field when UTF8 and Collate

2004-10-14 Thread Jeremy March
> We have a database that has one particular table, searchdata, that has > the > following columns > > BINARY key_low(5) > BINARY key_high(5) > VARCHAR searchss(255) > > The following query, when the SET QUERY UTF8 option is present, > doesn't work > because MySQL encodes the binary field. > A

Re:RE: Indexing problem with UTF8 in 4.1.4?

2004-09-29 Thread Jeremy March
> Now by our reconing the key of the > fields is 343 bytes, encoding in UTF8 makes that key 343 bytes Not > 1000 > since under utf8 each character is encode in 8 bits. If it is > converting to > utf16 internally then the key would be 328*2+5+4 which is not >1000 > bytes. > If you only use the as

Re: Different default collation in each connection

2004-09-29 Thread Jeremy March
> Ok, I thought that I will be misunderstood... > > I'll try to explain this in example below: > > I have table > > CREATE TABLE `product_descriptions` ( > `id_product_description` mediumint(8) unsigned NOT NULL auto_increment, > `id_product` mediumint(8) unsigned NOT NULL default '0', >

Re: UTF8 columns and MySQL

2004-09-28 Thread Jeremy March
> Hello, > > I have a table with the following column among others: > > text VARCHAR(120) CHARACTER SET utf8 > > The provider I am using however only offers MySQL version 3.23.58, > so I cannot use this statement. At first I thought I was not going > to be able to store UTF8. So I changed the c

Re: Different default collation in each connection

2004-09-28 Thread Jeremy March
I forget which. Collation _can_ be set for individual columns and it sounds like that is what you need to do. This is also important because each column index is collation specific and you need your columns to be indexed for the right collation. best regards, Jeremy March -- MySQL General Mai

Re: Suggestions? Need a foreign key - but there are tradeoffs

2004-08-19 Thread Jeremy March
h myisam tables the whole table is locked anyway for all update/deletes and sometimes for inserts so all you are doing is locking two tables at the same time instead of just one. It all depends on your application and the ratio of updates/inserts/deletes to selects as to whether this will wor

Re: UTF8 collations in 4.1.3

2004-08-04 Thread Jeremy March
rrectly? Clearly, what I was doing earlier was not correct. SELECT hex(your_column) FROM your_table; I usually convert utf8 to ucs2 so that I can recognize the codepoints easier. SELECT hex(CONVERT(your_column USING ucs2)) FROM your_table; There is also a new UNHEX() function which appeared i

re: UTF8 collations in 4.1.3

2004-08-03 Thread Jeremy March
>... > mysql> SELECT col2 FROM test ORDER BY col2 COLLATE utf8_swedish_ci; > ++ > | col2 | > ++ > | M(u-diaresis)ller | > | Muffler| > | MX Systems | > | MySQL | > ++ > ... > I expect M(u-diaeresis)ller to sort after MX Systems in the following:

re: Unicode help

2004-07-12 Thread Jeremy March
> Could someone who has experience with handling the Unicode character > set in a MySQL database please write to me? In particular, I am > trying > to discover how in an ASCII-limited environment one can specify > non-ASCII characters; I do know their Unicode encodings, just not how > to writ

Re: Where is the utf8_general_ci collation in sources?

2004-06-29 Thread Jeremy March
Much has changed with Unicode in MySQL 4.1.3. So you should be sure to look at the newest bitkeeper source. And be sure to look at strings/ctype-uca.c. This is the new implementation of the Unicode Collation Algorithm. best, Jeremy March -- MySQL General Mailing List For list archives

RE: Unicode characters become question marks

2004-06-02 Thread Jeremy March
character set conversions and a new ucs2_general_uca collation which uses the Unicode Collation Algorithm. Another thing to consider is that MySQL only supports utf8 characters up to 3 bytes long. I don't know if this is the case for chinese or not, but if so that might be another reason to

re: german umlaut desperation (a requiem in utf-8)

2004-05-21 Thread Jeremy March
l USING ucs2)), german_col FROM your_table; Good luck, Jeremy March -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

re: Using Indian languages and working with them using C API()

2004-03-15 Thread Jeremy March
> Can somebody give me pointers how to store and > retrieve data in Hindi using MySQL C API and MySQL in > general. Since alll the hindi text will be in unicode > format and C API uses char* parameter how do I > interface between my Hindi text data and C API. DO I > convert them to some other forma

re: How to get configuration info

2004-03-15 Thread Jeremy March
> Is there a way (utility, command, etc...) to find out what config settings > a mysql server was started with? > For example, someone started a server and I'd like to check to make sure > the correct .cnf file was used? > Thanks. > > David e.g. SHOW VARIABLES LIKE 'key_buffer_size%'; etc. --

re: Basic Setup Questions!!!!

2004-03-14 Thread Jeremy March
Have you tried: GRANT privileges ON database.* TO 'jupiter'@'192.168.6.%' IDENTIFIED BY 'sunrise'; See: http://www.mysql.com/doc/en/GRANT.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: utf8 - left function

2004-03-13 Thread Jeremy March
> Problem tested using both version 4.0.18 and 4.1.1 > > This query gets first byte of utf8 character, not two bytes > > If I use > > SELECT LEFT(FieldName, 2) AS FirstLetter, COUNT(*) FROM TableName GROUP BY > FirstLetter > > > gets right utf8 characters but others wrong > > for example; >

re: Union Query Sorting

2004-03-12 Thread Jeremy March
> Can anyone tell me how to sort the combined results of a Union query? > > (Select Name From Employee Group By Name Order By Name) > Union (Select Name From Consultant Group By Name Order By Name); > Just add another order by on the end after the parenthesis: (Select Name From Employee Group B

re: utf8 - left function

2004-03-12 Thread Jeremy March
> Hi, > > I need this query; > > SELECT LEFT(FieldName, 1) AS FirstLetter, COUNT(*) FROM TableName > GROUP BY FirstLetter > > my datas in utf8 format. I can't get first characters of the datas in > utf8 format but others is ok. > > Any suggestion? > > Thank you It works for me. I'm using the

Update field conditionally

2004-03-09 Thread Jeremy March
> UPDATE Table SET CounterValue = CounterValue+1, CounterStartDateTime = > (IF CounterStartDateTime IS NULL, Now()) > > without success. It looks like you just have the syntax wrong. Try: UPDATE Table SET CounterValue = CounterValue+1, CounterStartDateTime = IF(CounterStartDateTime IS NULL, N

COLLATION

2004-03-06 Thread Jeremy March
> But when I do a select for specifcly word like sao, I get all the three !!! > > Internally MySQL isn't distinguing the different words, assuming that à = A, > and O = Ã. > I don't think MySQL has a Portuguese collation yet. You could try one of the other collations to see if its compatible wi

re: inserting huge string

2004-02-24 Thread Jeremy March
> What I am trying to do is to enter a genome sequence which has around > 175 characters. the file size is about 1.5MB which is well within > the longblob size. I am using python to enter the sequence from a file > to the database and the while i am running the python program ,the >connection t

re: WG: [mysql.com #3839] UTF8 and MySQL 4.1

2004-02-24 Thread Jeremy March
What client are you using to connect to the server? If its MyODBC 3.51 then that is your problem. It doesn't support unicode yet. If you are using the mysql command line client try "select Hex(your_column) from your_table;" to see if the proper hex values are being inserted into the table.

re: On database structure -- keys and speed

2004-02-22 Thread Jeremy March
> I didn't key the placename because they're not guaranteed to be >unique, but that means that a search for "Artesia" takes many (~30) >seconds to complete, which is really not very useful. You should not use the placename as a PRIMARY KEY, but it can still have an index. You really should add a

re: Mysqldump problem in output UTF-8 Char

2004-02-21 Thread Jeremy March
> in which table i set to use Charset (UTF-8). > But When i use "mysql>mysqldump -u myname -p mypwd telbook>book.txt", all > string of table friend's c_name will become "?". Have you tried: mysqldump --default-character-set=utf8 -u myname -p mypwd telbook>book.txt If that doesn't work, which

Re: problem with with-extra-charsets=none

2004-02-19 Thread Jeremy March
I think --with-extra-charsets=none means that no additional character sets will be _compiled_ into the server. Complex character sets must be compiled into MySQL, but simple ones can be loaded dynamically. I think the character sets you are seeing are ones that can be loaded dynamically. For ins

re: Newbie Confused with Update involving Multiple Tables

2004-02-18 Thread Jeremy March
http://www.mysql.com/doc/en/UPDATE.html I believe multi-table updates weren't supported until MySQL version 4.04. Are you using a version earlier than this? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: duplicating records

2004-02-17 Thread Jeremy March
> I tried this and doesn't work unforunately. I get "ERROR: Duplicate > entry..." that occurs when copying from the temporary table back into > the original table. > Is there a way to do this, to copy a single record, without moving the > primary key into the temporary table so I can avoid this

Re: Problem with UTF-8 in 4.1.1a

2004-02-09 Thread Jeremy March
It sounds like you are using the mysql client to display your queries. You should do: SELECT HEX(arabic_column) FROM your_table; to really see what characters are stored in the table. To see the unicode codepoints you can do this: SELECT HEX(CONVERT(arabic_column USING ucs2)) FROM your_table;

re: Character sets

2004-01-30 Thread Jeremy March
but can I set multiple "default character set" options to multiple character sets (EUC-JP, EUC-KR, and ISO-8859-1) rather then just one. No, just one in 4.0.x. You have to use 4.1.x for multiple character sets. _ Let the new MSN Prem

re: Query help

2004-01-27 Thread Jeremy March
No. With the method you're using (storing the parent id with each record) you have to use a recursive series of queries to show the subtree levels. Take a look at this article--especially the second and third pages about the modified preorder tree traversal and nested sets. There are many oth

re: auto sorting

2004-01-25 Thread Jeremy March
Why don't you want to use an ORDER BY? I think its the _only_ way to get a stable order. It sounds like you want to retrieve your rows in the order in which they were entered. If you don't want an auto_increment field you could order by a timestamp. __

mySQL character set problem

2004-01-25 Thread Jeremy March
The first things you should check: 1. Do \s from the mysql client to be sure its using the character set you told it to use with default-character-set=latin1. Be sure its the same one you used on your old server. 2. Since you have the Norwegian keyboard set up try typing Norwegian characters

re: Certification Test Questions

2004-01-18 Thread Jeremy March
In the Certification section of the mysql web site there is a short sample test which shows the types of questions. There's a lot of information there too including the broad topics covered in each test. According to amazon.com Paul Dubois will have a MySQL Certification study book coming out

Re: Can't Set SQL_MODE?!

2004-01-17 Thread Jeremy March
Try this: mysql> set @@session.sql_mode = 'ansi'; Query OK, 0 rows affected (0.00 sec) mysql> select @@session.sql_mode; ++ | @@session.sql_mode | +-

Re: how to determine user Privilege fields

2004-01-09 Thread Jeremy March
Can I create a php script like: No. Try this: $privSQL = "SHOW GRANTS FOR 'paul'@'localhost';"; $priv_result = mysql_query($privSQL) or die("Couldn't Select Priv"); while($myrow = mysql_fetch_row($priv_result)) { echo "$myrow[0]"; } I believe this only returns a single row with the grant sta

re: Japanese in MySQL

2004-01-08 Thread Jeremy March
MySQL doesn't support unicode until version 4.1.0. If this isn't a production server I suggest you upgrade to MySQL 4.1.1. Its still in the ALPHA stage but it is pretty stable. I use it every day and I don't have any problems with it. Good luck, Jeremy ___

re: utf8 case insensitive collation, 4.1.1

2004-01-07 Thread Jeremy March
You're right. The LIKE comparison only works properly with the Latin letters in utf8. MySQL hasn't yet fixed it to work with the rest of Unicode yet. I believe there is a valid LIKE comparison for ucs2. From what I remember, however, it has problems too if you start putting wildcards at the

re: Unicode support in 4.0.17

2004-01-05 Thread Jeremy March
Unicode and multiple character sets are not supported until version 4.10. See section 9 of the manual. 4.1.1 is still alpha but its quite stable if your server isn't in a production environment. _ Tired of slow downloads? Compare

re: Japanese in MySQL

2004-01-05 Thread Jeremy March
MySQL doesn't support unicode until version 4.1.0. If this isn't a production server I suggest you upgrade to MySQL 4.1.1. Its still in the ALPHA stage but it is pretty stable. I use it every day and I don't have any problems with it. Good luck, Jeremy ___

re: Japanese in MySQL

2004-01-03 Thread Jeremy March
I don't know what's wrong from your description, but here are some things to watch out for: Are BOTH the client and server using utf8? Is the client application using a unicode font that supports the characters you're using? Most fonts only support a subset of unicode characters. Are you usin

re: Change from loop to single query

2004-01-02 Thread Jeremy March
What language are you using? It's not clear from your example what language you're using (no "$"s, but you also forgot to increment your array so?), so I'll give you an example in PHP: $query_string = implode(" OR name = ", $yourarray); mysql_query("UPDATE users SET status = no WHERE name = $qu

re: mySQL in Hebrew/my.cnf

2004-01-01 Thread Jeremy March
You should check the error log about why the server didn't start. It should be called yourhostname.err in your data directory. I think the problem is that you put spaces around the second equal sign. The first equal sign "set-variable = ..." can be surrounded by spaces but the second one "...

RE: mySQL in Hebrew

2003-12-28 Thread Jeremy March
I don't think you can use alter table to change character sets in version 3.23.51. You must do it at the server level. Try starting mysql with this command line option: --default-character-set=hebrew Hope this helps. Jeremy

CASE...WHEN...THEN..., bug or not?

2003-11-25 Thread Jeremy March
Using CASE... WHEN... THEN in my update query doesn't behave the way I expect it to. It's using the result of the query in the second WHEN condition rather than the original value. See this example: CREATE TABLE t1 (col_a tinyint not null, col_b tinyint not null); INSERT INTO t1 VALUES (1,1);

Re: Changing field type

2003-11-18 Thread Jeremy March
What command do I use to change the field type in my client_info table from: referral_percent | tinyint(4) | YES | NULL to referral_percent | double(3,2) unsigned zerofill | YES | NULL ALTER TABLE yourtable CHANGE referral_percent referral_percent double(3,2) unsigned zerofill default null; or:

Depth-first-traversal order?

2003-11-15 Thread Jeremy March
I don't think you can do what you want in one query if you use the adjacency list tree model (i.e. a self join to the parent node). See the article below comparing the adjacency list and the modified preorder tree traversal: http://www.sitepoint.com/article/1105 I'm not sure if that is what yo

Re: Unicode with MySQL4.1

2003-11-04 Thread Jeremy March
Oops--the Unicode character must have gotten lost in the email, but it does show up in MySQL. Its an "O" with a line above it. _ MSN Messenger with backgrounds, emoticons and more. http://www.msnmessenger-download.com/tracking/cdp_

Re: Unicode with MySQL4.1

2003-11-04 Thread Jeremy March
You need to be sure you are using a Unicode font. Are you using xterm? If so you can go to the edit tab and click Current Profile to change the font. Also note that most Unicode fonts only cover subsets of Unicode not the whole thing so use a font that supports the language you are using. I

Re: Unicode with MySQL4.1

2003-11-03 Thread Jeremy March
character with its utf8 hexidecimal: SELECT hex(my_column), my_column FROM your_table; Hope this helps, Jeremy March _ MSN Shopping upgraded for the holidays! Snappier product search... http://shopping.msn.com -- MySQL General

How to query for 25 records before and 25 records after a record alphabetically

2003-11-03 Thread Jeremy March
good way to do this? Thanks, Jeremy March _ Never get a busy signal because you are always connected with high-speed Internet access. Click here to comparison-shop providers. https://broadband.msn.com -- MySQL General Mailing List For

case insensitive LIKE with utf8 (multibyte)

2003-05-30 Thread Jeremy March
hat the utf8 cs uses the "simple" LIKE function--could that be the problem? LIKE works correctly (case insensitive) for the Latin unicode range, I assume because it isn't multibyte. Has anyone else experienced this with multibyte utf8? Thanks, Jeremy March