Re: Foreign key and uppercase / lowercase values

2012-06-15 Thread Walter Tross
At 16.40 15/06/2012 -0400, Shawn Green wrote:
On 6/15/2012 3:19 PM, Rick James wrote:
Those refer _only_ to German 'ß' LATIN SMALL LETTER SHARP S.  The example GF 
gave did not involve that character.

To my knowledge, that is the only case where MySQL changed a collation after 
releasing it.

Yes, it has been the only occurrence. However, the esset (sharp S) is just one 
example of the alternative spelling letters that were affected by the 
collation change. Thorn, the AE ligand, and many others fall into that same 
category.

ß = Eszett (which in German is the spelling of SZ, although it originated as a 
double S ligature (U+017F + s) - SZ comes from its sharp pronunciation).
The absence of an uppercase equivalent and its ligature behavior more evident 
than for other ligatures (although this has changed with the 1996 reform of 
German writing) have caused more than a headache to people dealing with 
charsets and collations.
Speaking of collations, I found this website useful (especially when I had to 
compare collations of different RDBMSs):
http://www.collation-charts.org/
Sorry for being OT, but every now and then it's worthwhile to share also some 
OT knowledge.
Walter Tross



Regards,
-- 
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN



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


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



Re: Fwd: why must user variable in EXECUTE USING clause ?

2012-03-26 Thread Walter Tross
Harald,
keep in mind that
a) this mailing list is badly set up: unless you do a reply all, the reply 
goes only to the poster (happened to me too)
b) Microsoft products have made inline (bottom) answering almost impossible. I, 
like many others, am forced to used Outlook at the office, and therefore I had 
to give up, and now I stick to top-posting :-(
ciao
W.
P.S. the only thing I have not given up yet is not using empty lines to avoid 
the feature (?) of Outlook that glues lines together. This feature can be 
disabled/reverted (although this is not widely known)

At 21.38 26/03/2012 +0800, Cifer Lee wrote:


-- Forwarded message --
From: Reindl Harald mailto:h.rei...@thelounge.neth.rei...@thelounge.net
Date: Mon, Mar 26, 2012 at 9:17 PM
Subject: Re: why must user variable in EXECUTE USING clause ?
To: Cifer Lee mailto:mantia...@gmail.commantia...@gmail.com


would you PLEASE send to the list instead off-list
and put your answer BELOW instead to-posting?

is it really so difficult to use mailing-lists?


Am 26.03.2012 14:34, schrieb Cifer Lee:
 thanks for reply
 and .sorry for my poor English ...
 I wrote a procedure program which contains prepare clause , please see below

 CREATE PROCEDURE `iter_table`(IN type int)
 BEGIN
 DECLARE tablename VARCHAR(24) DEFAULT '';
 DECLARE shop_id int DEFAULT 0;
 DECLARE count int DEFAULT 0;
 DECLARE row_count int DEFAULT 0;
 DECLARE x varchar(24);
 DECLARE cur1 CURSOR FOR SELECT `id` FROM shop;

 SELECT COUNT(*) INTO row_count FROM shop;

 OPEN cur1;
 REPEAT
 FETCH cur1 INTO shop_id;
   SET @shop_id := shop_id;
   SET @type := type;
   SET tablename= CONCAT('shop',@shop_id);
 SET @sqlstr = CONCAT('SELECT 
 `id`,`name`,`repertory`,`photo`,`type`,`price`,@shop_id AS shop_id FROM
 ',tablename,' WHERE `type`=?;');
 PREPARE stat FROM @sqlstr;
 EXECUTE stat USING type; - Must be EXECUTE stat USING @type ;
 SET count=count+1;
 UNTIL count = row_count
 END REPEAT;
 CLOSE cur1;
 END

 I got an error at the red line when I creating this procedure
 and the solution is replace the 'type'  with  '@type'

 I found  here  
 http://dev.mysql.com/doc/refman/5.5/en/execute.htmlhttp://dev.mysql.com/doc/refman/5.5/en/execute.html
 and knows that
 /you must supply a |USING| clause that lists user variables containing the 
 values to be bound to the parameters.
 Parameter values can be supplied only by user variables/,

 but, I don't know why .   why must parameter be user variables ? why can't 
 be  local variables ,  as declared in
 DECLARE clause..

 thanks!

 On Mon, Mar 26, 2012 at 8:15 PM, Reindl Harald 
 mailto:h.rei...@thelounge.neth.rei...@thelounge.net 
 mailto:h.rei...@thelounge.net wrote:



 Am 26.03.2012 14:13, schrieb Cifer Lee:
  why can't be local variable which  declared in  DECLARE  clause?

 what are you speaking about?
 keep in mind that we can not read your thoughts


Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc
X-Attachment-Id: 2caae85bfd1f082d_0.1


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


Re: big character constant

2012-03-25 Thread Walter Tross
I guess what you mean is Unicode characters U+2714 'HEAVY CHECK MARK' and 
U+2718 'HEAVY BALLOT X' 
(http://www.fileformat.info/info/unicode/char/2714/index.htm and 
http://www.fileformat.info/info/unicode/char/2718/index.htm).
Unicode has several encodings, of which the most used are UTF-8 and UTF-16.
The answer to your question depends on the encoding of your column and on your 
interface to the database.
As an example, IF your encoding is UTF-8 and you talk to the database using 
PHP, you need something like:
$qry = mysql_query(insert into mytable (mycolumn) values ('\xE2\x9C\x94'), 
('\xE2\x9C\x98'));
Inside double quotes PHP replaces the hex escape sequences with the bytes that 
form the correct UTF-8 encoding of your characters (see the above web pages).
ciao
Walter

At 19.14 23/03/2012 -0500, Halász Sándor wrote:
How does one enter characters U02714 and U02718 in a query? or insert them 
into a record?


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


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