Re[2]: Proposition: Attach a comment to each connection
Bonjour Justin, user agent was just an example of what the commentary could be. You could put what you want as long as it's a string. I agree with you and I already had this reflection that it could be a modification that could create some problems to some. Instead of modifying the protocol and the connection handshake, we could maybe do that through a query. This would be a new type of query which would only modify a field in the connection's data : ... mysql_real_connect(,,,.); mysql_query(SET CONNECTION_COMMENTARY 'Query from page xxx.phtml on server X'); ... JF 4. MySQL sticks this user agent into a (new) JF datastructure somewhere associated with JF the connection. Yes. But once more user agent was an example. On my own I think that there are other information more interesting that could go there. JF 5. A (new) API call to MySQL can fetch this JF information Not necessarily. I mentioned that this connection's commentary could be return in the process list of Mysql (when you do a 'mysqladmin process' for example). Or it could be returned by a query like : mysql_query(GET CONNECTION_COMMENTARY); My idea of this feature is that it could really help a lot in administrating a big database with a lot of connections. JF It seems to me that all you are asking for is JF 1. Change in the wire protocol No. JF 2. Design change in the MySQL API No modification of the API. Only a new query understood by Mysql. I've already been at the source of some modifications in the SQL syntax of Mysql (SQL_BUFFER_RESULT) so I know that when something improves Mysql, something can be coded in Mysql. JF 3. Upgrade of all applications using the API JF in the world No. By default the commentary would be empty or maybe any default information. You would not HATE TO give a commentary. JF 4. Depending on all programs to stick data in JF this requested comment field in the JF same consistent manner, unless you are JF asking for more riders/piggybacks and more fields JF in the wire protocol such as user agent. Nothing new in the communication protocol. A new field in the connection structure + a new query type. Regards, Alex. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re[2]: Proposition: Attach a comment to each connection
Bonjour Justin, JF I don't know why I got interested in this thread... More important (or less), why are you so negative ? JF I suppose you don't need a change to the wire protocol if JF you have, logically, something like below. The API has JF to be changed, however. JF id = do_a_connedtion(arg) JF set_comment_on_connection(id, this_is_my_comment) JF // later JF some_array = get_connection_comments() JF // parse the array comments JF // do something or other as function of comment Not even have to modify the API. Read my previous email. JF Question: Why, again, do you want this? You must see some utility JF in this other than academic interest, or taking statistics, or JF mischief, such as munging some field returning data to a Windows JF client with Screw Bill Gates prepended to his blob requests, or JF kicking off connections to, say, any client in Tana Tuva. I see an interest has an administrator of a really big site with 10 Mysql servers each answering more than 1000 queries each seconds. Queries that could come from hundreds of dynamic web pages, scripts, cronjobs, applications ... When something goes wrong, this feature would really help to debug and to fine a lot more quickly where the problems comes from. JF For readers like me, sitting on the sidelines, the need for this JF facility is obscure. Please make your case more evident. Hope this is more clear to you now. Regards, Alex. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re[2]: Proposition: Attach a comment to each connection
Bonjour Scott, SH Beyond that, you can already accomplish 90% of what you'd want by SH simply coding your queries as /* Comment */ SELECT ..., and so SH on. For connections which are not currently running a query, this SH won't work - but in my experience, you usually don't care much SH about connections which aren't currently running a query. A really good idea !!! Is the /* comment */ shown in the Info column when you run 'mysqladmin process' ? Or is it showing only the Query itself ? I have to test that. Regards, Alex. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php