Re: Lost connection to MySQL server during query
Hi Peter, thanks for the quick reply...
the quotes are just for safety as the query is generated dynamically...they don't cause a problem...
the tables are:
mysql> describe chatroom;
+---------------------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------------------------+------------------+------+-----+---------+----------------+
| chatroom_id | int(63) unsigned | NO | PRI | NULL | auto_increment |
| lang_id | int(10) unsigned | NO | | 0 | |
| chatroom_label | varchar(255) | YES | | NULL | |
| chatroom_date_created_timestamp | int(32) unsigned | NO | | 0 | |
| chatroom_is_permanent_chatroom | tinyint(1) | NO | | 0 | |
| chatroom_date_deleted_timestamp | int(32) unsigned | YES | | NULL | |
| user_id | int(63) unsigned | NO | | 0 | |
+---------------------------------+------------------+------+-----+---------+----------------+
and
mysql> describe chatroom_allowed_user;
+----------------------------------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------------------------+------------------+------+-----+---------+----------------+
| chatroom_allowed_user_id | int(63) unsigned | NO | PRI | NULL | auto_increment |
| chatroom_id | int(63) unsigned | NO | | 0 | |
| user_id | int(63) unsigned | NO | | 0 | |
| chatroom_allowed_user_date_deleted_timestamp | int(32) unsigned | YES | | NULL | |
+----------------------------------------------+------------------+------+-----+---------+----------------+
the query produces a valid result:
mysql> select distinct chatroom.chatroom_label as label, chatroom.chatroom_id as id from chatroom inner join chatroom_allowed_user using(chatroom_id) where chatroom.chatroom_date_deleted_timestamp is null and chatroom.chatroom_is_permanent_chatroom!="1" and (chatroom_allowed_user.user_id="1" or chatroom.user_id="1") order by chatroom_label asc;
+-------+----+
| label | id |
+-------+----+
| fwfwe | 29 |
+-------+----+
1 row in set (0.00 sec)
the conf is:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# For compatibility to other Debian packages that still use
# libmysqlclient10 and libmysqlclient12.
old_passwords = 1
#
# Instead of skip-networking you can listen only on
# localhost which is more compatible and is not less secure.
# bind-address = 127.0.0.1
#skip-networking
#
# * Fine Tuning
#
key_buffer = 18M
max_allowed_packet = 18M
thread_stack = 256K
#
# * Query Cache Configuration
#
query_cache_limit = 1048576
query_cache_size = 16777216
query_cache_type = 1
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
log = /var/log/mysql.log
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
log-bin = /var/log/mysql/mysql-bin.log
expire-logs-days = 20
max_binlog_size = 104857600
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
#
# * BerkeleyDB
#
# According to an MySQL employee the use of BerkeleyDB is now discouraged
# and support for it will probably cease in the next versions.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# If you want to enable SSL support (recommended) read the manual or my
# HOWTO in /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt.gz
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the ndbd storage daemons,
# not from the ndb_mgmd management daemon.
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1
and i am running PHP5.1.4 as an apache2 module which were installed from dotdeb via apt...
is that enough info?
Thanks again
Neil
Subject
Written By
Posted
Re: Lost connection to MySQL server during query
June 05, 2006 06:25AM
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.