forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Sqlyogtunnel Bug
- This topic is empty.
-
AuthorPosts
-
-
February 16, 2007 at 6:03 am #10186sdozonoMember
This is about SQLyog 5.23 RC2.
1) For mysql_connect(), you need to publish “SET NAMES (Your Character Code)” everytime after reconnecting to MYSQL.
(P.S. I noticed the thread http://www.webyog.com/forums//index.php?showtopic=3039 after writing this post. and from the query log, I confirmed the SQLyog forgets “SET NAMES…” again!)
(This was an old issue..)
2) As for mysqli(mysqli_connect()), At SQLyogtunnel.php, I added “mysqli_set_charset”. Then, garbaged characters disappeared.
Code:function yog_mysql_connect ($host, $port, $username, $password, $db_name=””)
{case “mysqli”:
$port=(int)$port;
$GLOBALS[“___mysqli_ston”] = mysqli_connect($host, $username, $password, $db_name, $port);mysqli_set_charset($GLOBALS[“___mysqli_ston”], “(MY CHARACTER CODE)”); //here
$ret=$GLOBALS[“___mysqli_ston”];
break;
}
return $ret;
}I hope this info useful.
-
February 16, 2007 at 7:32 am #23424peterlaursenParticipant
Thanks!
maybe you are right both of you, and I was wrong!
we will study this!
-
February 16, 2007 at 8:02 am #23425peterlaursenParticipantCode:1) For mysql_connect(), you need to publish “SET NAMES (Your Character Code)” everytime after reconnecting to MYSQL.
We do .. but not if charset is (default)
this function is called every time:
Code:[code]function SetName ( $mysql )
{
global $charset;
WriteLog ( “Enter SetName” );
if ( $charset === NULL )
return;
$query = 'SET NAMES ' . $charset;
if ($charset!=”[default]”) {
yog_mysql_query ( $query, $mysql );
}
WriteLog ( “Exit SetName” );
return;
}[/code]
note:
Quote:if ($charset!=”[default]”)We have reproduced the issue with 'copy ..' using HTTP-tunnel, but this is too simple!
And still NEVER use the 'default' setting in the connections manager when connecting to a server haveing Utf8/ucs2 as default – except for migration of Unicode data.
-
February 19, 2007 at 12:34 pm #23426peterlaursenParticipant
The bug was in the compiled C-code and not in the tunneller. It is fixed now.
-
-
AuthorPosts
- You must be logged in to reply to this topic.