MySQL Forums
Forum List  »  Stored Procedures

Re: What encoding is used for the text in the mysql.proc table param_list and body columns?
Posted by: Hans Bergsten
Date: October 29, 2008 12:46PM

Hi Peter,

Thanks again, but I'm afraid that doesn't help either.

I know the difference between TEXT and BLOB types. The problem here is that BLOB types are used to store "text" in the mysql.proc system table.

I'll try to clarify. If I enter a CREATE PROCEDURE statement in a client application, the code ("text") for the procedure is stored by the database server in the mysql.proc table as bytes in the two BLOB columns param_list and body. These bytes may be just the raw bytes from my CREATE PROCEDURE statement, or they may be converted from whatever charset the client is using to some other, well-defined charset (by convention or by configuration) used for the BLOB columns.

If I later want to read the SP code into an editor in a client application, I need to know which encoding was used for the bytes in the columns so that I can present (decode) them as the same characters as was used in the CREATE PROCEDURE statement.

What I want to have answered is:
1) Are the raw bytes from the client used? If so, are there established conventions for how to deal with the problem that different encoding can be used by different clients?
2) If the raw bytes are converted to another charset for the BLOB columns, is there a fixed charset (e.g., UTF-8) or is there a configuration parameter that tells which encoding to use?

My experiments when connecting via Connector/J is that the raw bytes are used, but I'd like to get that confirmed or rejected (maybe there are bugs related to this in the versions of the driver and database that I used).

Best Regards,
Hans

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.