Annoying notice: SET NAMES 'latin1'

Author Message

Felipe Jaramillo

Tuesday 17 January 2006 7:05:17 am

Hi,
In a recent installation of 3.7.2 in a production enviroment we are getting this message on every page view:

Notice: eZMySQLDB::query(0.000 ms) query number per page:0 Jan 16 2006 15:54:51
SET NAMES 'latin1'

Anyone knows why this is? The site works perfectly, but we don't want the log files getting filled up with this message.

Thanks in advance,

Felipe

Felipe Jaramillo
eZ Certified Extension Developer
http://www.aplyca.com | Bogotá, Colombia

Hans Melis

Tuesday 17 January 2006 9:35:45 am

Hi Felipe,

That's a MySQL command to signal which character set to use in communications with the client. Taken from the MySQL manual:

NAMES {'charset_name' | DEFAULT}

SET NAMES sets the three session system variables character_set_client, character_set_connection, and character_set_results to the given character set. Setting character_set_connection to charset_name also sets collation_connection to the default collation for charset_name. See Section 10.4, “Connection Character Sets and Collations”.

The default mapping can be restored by using a value of DEFAULT.

Note that the syntax for SET NAMES differs from that for setting most other options. This statement is available as of MySQL 4.1.0.

http://dev.mysql.com/doc/refman/4.1/en/set-option.html

IIRC, this statement is executed before most of the ini settings are read. That would explain why disabling SQLOutput doesn't get rid of that message.

Hans
http://blog.hansmelis.be

Felipe Jaramillo

Wednesday 18 January 2006 3:08:40 pm

Thanks for your input.

We are using Mysql 4.1, so the message is reasonable.

Is there a way to prevent the notices from showing up in the logs?

Thanks a lot,

Felipe

Felipe Jaramillo
eZ Certified Extension Developer
http://www.aplyca.com | Bogotá, Colombia

Marc Boon

Sunday 22 January 2006 6:45:28 am

If you really don't want that notice to appear, you could comment out line 198 of lib/ezdb/classes/ezmysqldb.php:

$query = "SET NAMES '" . $charset . "'";
$status = @mysql_query( $query, $connection );
// $this->reportQuery( 'eZMySQLDB', $query, false, false );

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 07:15:46
Script start
Timing: Jan 19 2025 07:15:46
Module start 'layout'
Timing: Jan 19 2025 07:15:46
Module start 'content'
Timing: Jan 19 2025 07:15:47
Module end 'content'
Timing: Jan 19 2025 07:15:47
Script end

Main resources:

Total runtime1.1424 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.2813152.6406
Module start 'layout' 0.00620.0037 741.921939.4766
Module start 'content' 0.00981.1310 781.3984580.5547
Module end 'content' 1.14090.0015 1,361.953112.1406
Script end 1.1424  1,374.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3464160.0002
Check MTime0.00190.1666160.0001
Mysql Total
Database connection0.00070.065110.0007
Mysqli_queries1.088795.2970620.0176
Looping result0.00070.0586600.0000
Template Total1.109997.220.5550
Template load0.00260.226520.0013
Template processing1.107396.927820.5536
Template load and register function0.00020.020110.0002
states
state_id_array0.00090.079410.0009
state_identifier_array0.00070.057420.0003
Override
Cache load0.00220.1936280.0001
Sytem overhead
Fetch class attribute can translate value0.00080.068330.0003
Fetch class attribute name0.00120.107750.0002
XML
Image XML parsing0.00080.067830.0003
class_abstraction
Instantiating content class attribute0.00000.000850.0000
General
dbfile0.00090.0812150.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs