I have problems with Turkish characters, as I mentioned in the title. I created a MySQL function:
DELIMITER $$ CREATE DEFINER=`root`@`localhost` FUNCTION `ilgiAlaniFunc`( idKullanici INT, ilgi_alani_ismi varchar(255) CHARSET utf8 COLLATE utf8_turkish_ci ) RETURNS varchar(255) CHARSET utf8 COLLATE utf8_turkish_ci READS SQL DATA DETERMINISTIC BEGIN
This is a dump of the queries I run:
111 Connect root@localhost on anketsis_main 111 Query select ilgiAlaniFunc(43,'kıvılcım') 111 Query select id Into ret from ilgi_alanlari where ilgi_alani_adi= NAME_CONST('ilgi_alani_ismi',_utf8'k' COLLATE 'utf8_turkish_ci') limit 1 111 Query insert into kullanici_ilgi_alani(kullanici_id, ilgi_alani_id) values ( NAME_CONST('idKullanici',43), NAME_CONST('ret',54))
Here you can see that 'kıvılcım' turns into 'k'. After the first Turkish character, MySQL then erases everything.
And here is the correct dump:
120 Query select ilgiAlaniFunc(44,'Hello') 120 Query select id Into ret from ilgi_alanlari where ilgi_alani_adi= NAME_CONST('ilgi_alani_ismi',_utf8'Hello' COLLATE 'utf8_turkish_ci') limit 1 120 Query INSERT INTO ilgi_alanlari(ilgi_alani_adi) values ( NAME_CONST('ilgi_alani_ismi',_utf8'Hello' COLLATE 'utf8_turkish_ci')) 120 Query SELECT last_insert_id() into ret 120 Query insert into kullanici_ilgi_alani(kullanici_id, ilgi_alani_id) values ( NAME_CONST('idKullanici',44), NAME_CONST('ret',56))
As you can see, “Hello” is “Hello” everywhere.
Each sort is utf8_turkish_ci in my schema. Edit: I noticed that my question does not include the question. So here it is: how can I get MySQL to believe that I'm sending more rows than I think