Transaction Question

2002-08-18 Thread Randy Johnson

Hello,


 I am using innodb tables via mysql max

 if i do a select * for update
 and then do an update statement

 will this unlock the record for another update or will it wait for me to do
 a commit?

 thanks,

 Randy

 query,sql




-
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




Instalation problems

2002-08-18 Thread dnroldan

To whom it may concern,
I had a bad starts!!!
I was trying to start working with MySQL with Windows 98 so I downloaded 
the file "myodbc-21.50.39-win95.zip" to install the drivers for ODBC, after 
unzip this file (obviously) I executed the file "SETUP.EXE" receiving the 
following message: "Insufficient Memory or Disk Space", which is difficult to 
belive because I have a Pentium 4 with 256 Mb of RAM and a Hard Disk with 30 Gb 
of free space.
What I am doing bad?
I would appreciate a lot your help.
Kind regards,
Daniel
Roldán


-
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




Operations in a select statement

2002-08-18 Thread John Berman

Hi

I asked a question and had a response and answer within the hour - I
will try my lucj and ask another

In my table I have amongst other things two fields ProjectPrice and
ProjectBalance and in this example they are currently

Projectprice = 100
Projectbalance = 90

Now I only want my select statement to work if project balance it at
least or greater than 90% of the Projectprice - Im sure this must be
possible 


sqlst = "select * FROM sfProducts WHERE the calculation"

Regards
John Berman

[EMAIL PROTECTED]



-
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: Instalation problems

2002-08-18 Thread Iikka Meriläinen

Hi,

Try installing it in Safe Mode.

Regards,
Iikka

**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**

On Sun, 18 Aug 2002 [EMAIL PROTECTED] wrote:

> To whom it may concern,
> I had a bad starts!!!
> I was trying to start working with MySQL with Windows 98 so I downloaded
> the file "myodbc-21.50.39-win95.zip" to install the drivers for ODBC, after
> unzip this file (obviously) I executed the file "SETUP.EXE" receiving the
> following message: "Insufficient Memory or Disk Space", which is difficult to
> belive because I have a Pentium 4 with 256 Mb of RAM and a Hard Disk with 30 Gb
> of free space.
> What I am doing bad?
> I would appreciate a lot your help.
> Kind regards,
> Daniel
> Roldán
>
>
> -
> 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
>


-
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: Lost connections on Freebsd

2002-08-18 Thread Michael Widenius


Hi!

> "Chris" == Chris Knipe <[EMAIL PROTECTED]> writes:

Chris> Lo Victoria
Chris> FreeBSD 4.6-STABLE (Master), MySQL 3.23.51
Chris> Windows 2000 Professional (Slave):, MySQL 3.23.49-nt

Chris> I've recompiled the master about three times now, and it still crashed.
Chris> Eventually, it came to such a extend that the moment I open port 3306 MySQL
Chris> would crash.  I can just use telnet  3306, or open a netcat on port
Chris> 3306, and MySQL would die.

Can you try to configure MYSQL with CFLAGS=-g and run the server under
gdb.

If we could get a full back trace where it fails, it could help us
find out what's wrong.

Chris> So far, the only way I found to keep the FreeBSD Port up, was to recompile
Chris> it with debug support.  I so far have 90 minutes uptime on the Master with
Chris> debug support compiled in, but it's needless to say not really the desired
Chris> result.

How did you configure MySQL in this case ?

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Michael Widenius <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
   <___/   www.mysql.com


-
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: Operations in a select statement

2002-08-18 Thread Benjamin Pflugmann

Hi.

On Sun 2002-08-18 at 11:13:36 +0100, [EMAIL PROTECTED] wrote:
> 
> I asked a question and had a response and answer within the hour - I
> will try my lucj and ask another

Well, but never forget that you ask for other's time, so be sure to
have made your homework first and really cannot come up with an own
solution.

> In my table I have amongst other things two fields ProjectPrice and
> ProjectBalance and in this example they are currently
> 
> Projectprice = 100
> Projectbalance = 90
> 
> Now I only want my select statement to work if project balance it at
> least or greater than 90% of the Projectprice - Im sure this must be
> possible 
> 
> 
> sqlst = "select * FROM sfProducts WHERE the calculation"

Well, that is basic mathematics:

... WHERE Projectbalance >= 90/100 * Projectprice

Regards,

Benjamin.

-- 
[EMAIL PROTECTED]

-
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




BLOB and ADO

2002-08-18 Thread Bruno Batarelo

Greetings

There is a persistant problem while trying to insert a string from within VB
6.0 application to the LONGBLOB field. I use ADO and code for adding new
record is as followes:

TabelaTekst.AddNew
TabelaTekst!Polje = BinaryString
TabelaTekst.Update

and error is: "Multiple-step operation generated errors. Check each status
value."

I do not know what to do. I use MySQL 4.01 and MyODBC 3.51.03. It occures
only with this field data type. I would appreciate any help since I'm in big
trouble if I do not solve this. Thank You all.

Bruno



-
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




MySQL BLOB field - reliable or NOT?

2002-08-18 Thread Bruno Batarelo

I belive that I have a little bit bigger problem with MySQL, and for now, no
one told
me a solution. Problem is with BLOB fields. That type of field behaves OK if
I use INSERT INTO statement. But the problem is that it is impossible to use
INSERT INTO when I need to send a string full of binary characters I.E.
picture, EXE etc. The only solution is to open that kind of file, place it
in a variable, use ADO and with help of .AddNew mthod to write that variable
to the database. Result: Multiple-step operation generated errors - error.
Have You ever met this kind of problem. I have noticed that BLOB fields are
not so attractive to work with. Are they reliable enough for work because
whenever I try to work with this data type, I always have difficulties in
combination with ADO, and seemingly, ADO has not got problems in work. If
You can help me, I'd appreciate it.

Bruno


-
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: InnoDB on FreeBSD-Alpha problem

2002-08-18 Thread Yuri

heikki,
> > Anyone i running MySQL with InnoDB
> > on FreeBSD-Alpha?
> >
> > I get the mysqld compiling/running
> > ok. DB dump is restored ok locally.
> > Locally everything wirks. But it
> > crashes on the incoming network connection.
> >
> > unaligned access: va=0x11fff784 pc=.

I found the reason of this.
It's because in file sql/mysqld.cc the functions
fromhost(), hosts_access() and eval_client()
were used w/out arguments. Declaration of those
in tcpd.h is K&R style -- also w/out arguments.
But actual definitions in libwrap.so are with args.

Linux folks should look at this line
#if defined (__linux__)
which lets these functions be used w/out arguments.
Is this incorrect in Linux also?


Yuri.

-
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: Lost connections on Freebsd

2002-08-18 Thread Chris Knipe

Lo Michael,

I digged a bit more, and while running under debug mode, MySQL doesnt crash,
it does complain about a bad file descriptor on /etc/hosts.allow.

If this is the cause of the failure, there might be a possibly bug in the
code, because I really think it's arb that the entire MySQL needs to bail
because it can't open a file...  Here's the relavent messages from syslog,

Aug 18 16:03:29 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23:
can't get client address: Bad file descriptor
Aug 18 16:03:30 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23:
can't get client address: Bad file descriptor

When I run without debug, I think this is what *may* be causing the crash,
whilst when running under debug mode, MySQL obviously has some sort of
protection so that it sends out only a warning instead of crashing

> Chris> I've recompiled the master about three times now, and it still
crashed.
> Chris> Eventually, it came to such a extend that the moment I open port
3306 MySQL
> Chris> would crash.  I can just use telnet  3306, or open a netcat on
port
> Chris> 3306, and MySQL would die.
>
> Can you try to configure MYSQL with CFLAGS=-g and run the server under
> gdb.
>
> If we could get a full back trace where it fails, it could help us
> find out what's wrong.

I tried.  Now, when I recompiled it again without debug support, it doesn't
crash for some reason.  At least not for now  The below log is issued to
syslog at every connection however.
  Aug 18 17:03:53 netsonic mysqld[47947]: warning: can't get client address:
Bad file descriptor

I'll keep my eyes on it like a hawk.  First crash I get, it's back to gdb we
go... It looks to me as if it may be tcpwrappers that's busted however...
:-(

> Chris> So far, the only way I found to keep the FreeBSD Port up, was to
recompile
> Chris> it with debug support.  I so far have 90 minutes uptime on the
Master with
> Chris> debug support compiled in, but it's needless to say not really the
desired
> Chris> result.
>
> How did you configure MySQL in this case ?

Altered the Makefile in the ports, compiled / installed, and did a cvsup to
sync the ports again... MySQL compiles per default with CFLAGS=-g from the
ports, I just need had to recompile it again now, so that I could remove the
debug support and let MySQL actually crash again :P

--
me



-
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: Lost connections on Freebsd

2002-08-18 Thread Gelu Gogancea

Hi,

- Original Message -
From: "Chris Knipe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Victoria Reznichenko"
<[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 6:08 PM
Subject: Re: Lost connections on Freebsd


> Lo Michael,
>
> I digged a bit more, and while running under debug mode, MySQL doesnt
crash,
> it does complain about a bad file descriptor on /etc/hosts.allow.
>
> If this is the cause of the failure, there might be a possibly bug in the
> code, because I really think it's arb that the entire MySQL needs to bail
> because it can't open a file...

...or you have too many open files in the system.You reach the max. number
of files which can be opened by the OS.Try to increase file-max from
/proc/sys/fs.

Regards,

Gelu

>
> Aug 18 16:03:29 netsonic mysqld[15158]: warning: /etc/hosts.allow, line
23:
> can't get client address: Bad file descriptor
> Aug 18 16:03:30 netsonic mysqld[15158]: warning: /etc/hosts.allow, line
23:
> can't get client address: Bad file descriptor
>
> When I run without debug, I think this is what *may* be causing the crash,
> whilst when running under debug mode, MySQL obviously has some sort of
> protection so that it sends out only a warning instead of crashing
>
> > Chris> I've recompiled the master about three times now, and it still
> crashed.
> > Chris> Eventually, it came to such a extend that the moment I open port
> 3306 MySQL
> > Chris> would crash.  I can just use telnet  3306, or open a netcat
on
> port
> > Chris> 3306, and MySQL would die.
> >
> > Can you try to configure MYSQL with CFLAGS=-g and run the server under
> > gdb.
> >
> > If we could get a full back trace where it fails, it could help us
> > find out what's wrong.
>
> I tried.  Now, when I recompiled it again without debug support, it
doesn't
> crash for some reason.  At least not for now  The below log is issued
to
> syslog at every connection however.
>   Aug 18 17:03:53 netsonic mysqld[47947]: warning: can't get client
address:
> Bad file descriptor
>
> I'll keep my eyes on it like a hawk.  First crash I get, it's back to gdb
we
> go... It looks to me as if it may be tcpwrappers that's busted however...
> :-(
>
> > Chris> So far, the only way I found to keep the FreeBSD Port up, was to
> recompile
> > Chris> it with debug support.  I so far have 90 minutes uptime on the
> Master with
> > Chris> debug support compiled in, but it's needless to say not really
the
> desired
> > Chris> result.
> >
> > How did you configure MySQL in this case ?
>
> Altered the Makefile in the ports, compiled / installed, and did a cvsup
to
> sync the ports again... MySQL compiles per default with CFLAGS=-g from the
> ports, I just need had to recompile it again now, so that I could remove
the
> debug support and let MySQL actually crash again :P
>
> --
> me
>
>
>
> -
> 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
>
>


-
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




LOAD DATA, \N, and auto_increment

2002-08-18 Thread Andrew Rucker Jones

To Whom it May Concern,
I sincerely doubt it's relevant, but i'm running MySQL 3.23.52 on Linux 
2.4.18 (RedHat build 5). Client and server are on the same machine and 
communicate via a Unix domain socket.
Perhaps it is a conscious decision, but it would seem an odd one: When 
using LOAD DATA [LOCAL] INFILE, if the table has a column that is BIGINT 
UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N for 
that column, a warning is generated for every line inserted. Replacing 
\N with numbers in the infile gets rid of all warnings on import. Seems 
to be a matter of adding one little check to Field_longlong::store() in 
field.cc, but i could be wrong. I strongly suspect that it is 
independant of integer size (e.g TINYINT, INT, BIGINT probably all 
behave the same way).
Please send all replies to my personal address as well, as i am not 
subscribed to the list.

-&

-- 
GPG key / Schlüssel -- http://simultan.dyndns.org/~arjones/gpgkey.txt
Encrypt everything. / Alles verschlüsseln.


-
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: Lost connections on Freebsd

2002-08-18 Thread Chris Knipe


> ...or you have too many open files in the system.You reach the max. number
> of files which can be opened by the OS.Try to increase file-max from
> /proc/sys/fs.
>

Highly doubtful.  It's a brand new server installation, exactly the same as
all my others, and it's not doing half as much as the others are

The box runs mysql, apache, and exim...  With less than 50 processes running
at any given time...

It's FreeBSD as well btw, /proc/fs/ doesn't exist :P

-SNIP-
DESCRIPTION
 The fstat utility identifies open files.  A file is considered open by
a
 process if it was explicitly opened, is the working directory, root
 directory, active executable text, or kernel trace file for that
process.
 If no options are specified, fstat reports on all open files in the
sys-
 tem.
-SNIP-

749 open files reported... Far less than the maximum.

--
me




-
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




mysql just hangs!

2002-08-18 Thread spiros

 
I was testing an apparent performance issue while I got a strange perl
 message , claiming it (with perl/DBI)

DBD driver has not implemented the AutoCommit attribute at perlscript.pl line 
1064,  line 12911.
Issuing rollback() for database handle being DESTROY'd without explicit 
disconnect(),  line 12911

this was strange, since I tested it on a test program and AutoCommit worked 
fine.

Anyway, the code died, I did some changes and it worked ok, until  it hit the 
same message. The problem now is that (I rebooted the server) I can do
/usr/bin/mysqld_safe fine, but when I do
mysql -u user -ppasswd database

it just hangs there(and this is also the case when I try to connect  via DBI)
I am using 4.0.1 with InnoDB. Could it be that I ran out of table space?
/var/lib/mysql/linux.err complains that:

/usr/sbin/mysqld: ready for connections
InnoDB: Warning: operating system error number 4 in a file operation.
InnoDB: Cannot continue operation.

Number of processes running now: 0
020818 21:56:29  mysqld restarted
InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 43 1452255266
InnoDB: Doing recovery: scanned up to log sequence number 43 1452320768
InnoDB: Doing recovery: scanned up to log sequence number 43 1452386304
.


 What should I do now?

Here is /etc/my.cnf

# Example mysql config file for very large systems.
#
# This is for large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/mf.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# One can in this file use all long options that the program supports.
# If you want to know which options a program support, run the program
# with --help option.

# The following options will be passed to all MySQL clients
[client]
#password= your_password
port= 3306
socket= /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 3306
socket= /var/lib/mysql/mysql.sock
skip-locking
set-variable= key_buffer_size=500M
set-variable= key_buffer=100M
set-variable= max_allowed_packet=1M
set-variable= table_cache=512
set-variable= max_connections=10
set-variable= tmp_table_size=400M
set-variable= sort_buffer=2M
set-variable= record_buffer=2M
set-variable= thread_cache=8
set-variable= thread_concurrency=4# Try number of CPU's*2
#set-variable= myisam_sort_buffer_size=64M
set-variable= myisam_sort_buffer_size=4M
innodb_data_home_dir=
#and then use absolute file paths
#innodb_data_file_path=ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:2000M;ibdata5:2000M;ibdata6:2000M;ibdata7:2000M;ibdata8:2000M
innodb_data_file_path=/var/lib/mysql/ibdata1:2000M;/var/lib/mysql/ibdata2:2000M;/var/lib/mysql/ibdata3:2000M;/var/lib/mysql/ibdata4:2000M;/var/lib/mysql/ibdata5:2000M;/var/lib/mysql/ibdata6:2000M;/var/lib/mysql/ibdata7:2000M;/var/lib/mysql/ibdata8:2000M;/usr/ibdata/ibdata9:2000M;/usr/ibdata/ibdata10:2000M;/usr/ibdata/ibdata11:2000M;/usr/ibdata/ibdata12:2000M;/ibdata/ibdata13:2000M;/ibdata/ibdata14:2000M;/ibdata/ibdata15:2000M;/var/lib/mysql/ibdata16:2000M;/var/lib/mysql/ibdata17:2000M;/var/lib/mysql/ibdata18:2000M;/var/lib/mysql/ibdata19:2000M;/var/lib/mysql/ibdata20:2000M;/var/lib/mysql/ibdata21:2000M
#;/usr/ibdata/ibdata9:2000M;/usr/ibdata/ibdata10:2000M
## Comment next line if you do not need recovery(the hostname-bin.xxx files)
#log-bin
##
server-id= 1
#set-variable= open-files-limit=8192  #ulimit is 1024,hard 8192
set-variable = innodb_buffer_pool_size=1100M
# so that innodb_buffer_pool 
size+key_buffer+max_connections*(sort_buffer+record_buffer+2M)=1100+100+10*(2+2+2)=1260<2000M=RAM
set-variable = innodb_additional_mem_pool_size=700M
set-variable = innodb_log_file_size=1000M
set-variable = innodb_log_buffer_size=20M
# helps for large transactions
# Uncomment the following if you are using BDB tables
#set-variable= bdb_cache_size=384M
#set-variable= bdb_max_lock=10

# Point the following paths to different dedicated disks
#tmpdir= /tmp/
#log-update = /path-to-dedicated-directory/hostname

[mysqldump]
quick
set-variable= max_allowed_packet=256M

[mysql]
no-auto-rehash
#safe-updates# Remove the comment character if you are not familiar with 
SQL

[isamchk]
set-variable= key_buffer=256M
set-variable= sort_buffer=256M
set-variable= read_buffer=2M
set-variable= write_buffer=2M

[myisamchk]
#set-variable= key_buffer=256M
#set-variable= sort_buffer=256M
#set-variable= read_buffer=2M
#set-variable= write_buffer=2M
set-variable= key_buffer=25M
set-variable= sort_buffer=25M
set-variable= read_buffer=2M
set-variable= write_buffer=2M

[mysqlhotcopy]
interactive-

Re: mysql just hangs!

2002-08-18 Thread Heikki Tuuri

spiros,

you have configured too much memory to buffers in my.cnf. In Linux you
should keep the memory allocation significantly below 2 GB.

Error 4 means an interrupted system call. I am not sure what that would
mean.

Please upgrade to 4.0.2 which has better error messages, and reduce memory
allocation in my.cnf.

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB

- Original Message -
From: "spiros" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Sunday, August 18, 2002 8:31 PM
Subject: mysql just hangs!


>
> I was testing an apparent performance issue while I got a strange perl
>  message , claiming it (with perl/DBI)
>
> DBD driver has not implemented the AutoCommit attribute at perlscript.pl
line
> 1064,  line 12911.
> Issuing rollback() for database handle being DESTROY'd without explicit
> disconnect(),  line 12911
>
> this was strange, since I tested it on a test program and AutoCommit
worked
> fine.
>
> Anyway, the code died, I did some changes and it worked ok, until  it hit
the
> same message. The problem now is that (I rebooted the server) I can do
> /usr/bin/mysqld_safe fine, but when I do
> mysql -u user -ppasswd database
>
> it just hangs there(and this is also the case when I try to connect  via
DBI)
> I am using 4.0.1 with InnoDB. Could it be that I ran out of table space?
> /var/lib/mysql/linux.err complains that:
>
> /usr/sbin/mysqld: ready for connections
> InnoDB: Warning: operating system error number 4 in a file operation.
> InnoDB: Cannot continue operation.
>
> Number of processes running now: 0
> 020818 21:56:29  mysqld restarted
> InnoDB: Database was not shut down normally.
> InnoDB: Starting recovery from log files...
> InnoDB: Starting log scan based on checkpoint at
> InnoDB: log sequence number 43 1452255266
> InnoDB: Doing recovery: scanned up to log sequence number 43 1452320768
> InnoDB: Doing recovery: scanned up to log sequence number 43 1452386304
> .
>
>
>  What should I do now?
>
> Here is /etc/my.cnf
>
> # Example mysql config file for very large systems.
> #
> # This is for large system with memory of 1G-2G where the system runs
mainly
> # MySQL.
> #
> # You can copy this file to
> # /etc/mf.cnf to set global options,
> # mysql-data-dir/my.cnf to set server-specific options (in this
> # installation this directory is /var/lib/mysql) or
> # ~/.my.cnf to set user-specific options.
> #
> # One can in this file use all long options that the program supports.
> # If you want to know which options a program support, run the program
> # with --help option.
>
> # The following options will be passed to all MySQL clients
> [client]
> #password= your_password
> port= 3306
> socket= /var/lib/mysql/mysql.sock
>
> # Here follows entries for some specific programs
>
> # The MySQL server
> [mysqld]
> port= 3306
> socket= /var/lib/mysql/mysql.sock
> skip-locking
> set-variable= key_buffer_size=500M
> set-variable= key_buffer=100M
> set-variable= max_allowed_packet=1M
> set-variable= table_cache=512
> set-variable= max_connections=10
> set-variable= tmp_table_size=400M
> set-variable= sort_buffer=2M
> set-variable= record_buffer=2M
> set-variable= thread_cache=8
> set-variable= thread_concurrency=4# Try number of CPU's*2
> #set-variable= myisam_sort_buffer_size=64M
> set-variable= myisam_sort_buffer_size=4M
> innodb_data_home_dir=
> #and then use absolute file paths
>
#innodb_data_file_path=ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:200
0M;ibdata5:2000M;ibdata6:2000M;ibdata7:2000M;ibdata8:2000M
>
innodb_data_file_path=/var/lib/mysql/ibdata1:2000M;/var/lib/mysql/ibdata2:20
00M;/var/lib/mysql/ibdata3:2000M;/var/lib/mysql/ibdata4:2000M;/var/lib/mysql
/ibdata5:2000M;/var/lib/mysql/ibdata6:2000M;/var/lib/mysql/ibdata7:2000M;/va
r/lib/mysql/ibdata8:2000M;/usr/ibdata/ibdata9:2000M;/usr/ibdata/ibdata10:200
0M;/usr/ibdata/ibdata11:2000M;/usr/ibdata/ibdata12:2000M;/ibdata/ibdata13:20
00M;/ibdata/ibdata14:2000M;/ibdata/ibdata15:2000M;/var/lib/mysql/ibdata16:20
00M;/var/lib/mysql/ibdata17:2000M;/var/lib/mysql/ibdata18:2000M;/var/lib/mys
ql/ibdata19:2000M;/var/lib/mysql/ibdata20:2000M;/var/lib/mysql/ibdata21:2000
M
> #;/usr/ibdata/ibdata9:2000M;/usr/ibdata/ibdata10:2000M
> ## Comment next line if you do not need recovery(the hostname-bin.xxx
files)
> #log-bin
> ##
> server-id= 1
> #set-variable= open-files-limit=8192  #ulimit is 1024,hard 8192
> set-variable = innodb_buffer_pool_size=1100M
> # so that innodb_buffer_pool
>
size+key_buffer+max_connections*(sort_buffer+record_buffer+2M)=1100+100+10*(
2+2+2)=1260<2000M=RAM
> set-variable = innodb_additional_mem_pool_size=700M
> set-variable = innodb_log_file_size=1000M
> set-variable = innodb_log_buffer_size=20M
> # helps for large transactions
> # Uncomment the following if you are using B

Re: Lost connections on Freebsd

2002-08-18 Thread Gelu Gogancea

For sure "Bad file descriptor" error occur because your kernel it's not
able to create handler for the new open file(don't forget...socket it's also
a file ) which must be open.

_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: "Chris Knipe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 8:14 PM
Subject: Re: Lost connections on Freebsd


>
> > ...or you have too many open files in the system.You reach the max.
number
> > of files which can be opened by the OS.Try to increase file-max from
> > /proc/sys/fs.
> >
>
> Highly doubtful.  It's a brand new server installation, exactly the same
as
> all my others, and it's not doing half as much as the others are
>
> The box runs mysql, apache, and exim...  With less than 50 processes
running
> at any given time...
>
> It's FreeBSD as well btw, /proc/fs/ doesn't exist :P
>
> -SNIP-
> DESCRIPTION
>  The fstat utility identifies open files.  A file is considered open
by
> a
>  process if it was explicitly opened, is the working directory, root
>  directory, active executable text, or kernel trace file for that
> process.
>  If no options are specified, fstat reports on all open files in the
> sys-
>  tem.
> -SNIP-
>
> 749 open files reported... Far less than the maximum.
>
> --
> me
>
>
>
>
> -
> 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
>
>


-
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: Lost connections on Freebsd

2002-08-18 Thread Chris Knipe

Fair enough,

But then why is MySQL the *only* thing I am having problems with?  MySQL's
not the only application running on the box, it's not the only application
opening / closing tcp sockets, its not the only thing opening / closing file
sockets

*shrugs*... Maybe I should just rm -rf / and reinstall.

- Original Message -
From: "Gelu Gogancea" <[EMAIL PROTECTED]>
To: "Chris Knipe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 8:01 PM
Subject: Re: Lost connections on Freebsd


> For sure "Bad file descriptor" error occur because your kernel it's not
> able to create handler for the new open file(don't forget...socket it's
also
> a file ) which must be open.
>
> _
> G.NET SOFTWARE COMPANY
>
> Permanent e-mail address : [EMAIL PROTECTED]
>   [EMAIL PROTECTED]
> - Original Message -
> From: "Chris Knipe" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, August 18, 2002 8:14 PM
> Subject: Re: Lost connections on Freebsd
>
>
> >
> > > ...or you have too many open files in the system.You reach the max.
> number
> > > of files which can be opened by the OS.Try to increase file-max from
> > > /proc/sys/fs.
> > >
> >
> > Highly doubtful.  It's a brand new server installation, exactly the same
> as
> > all my others, and it's not doing half as much as the others are
> >
> > The box runs mysql, apache, and exim...  With less than 50 processes
> running
> > at any given time...
> >
> > It's FreeBSD as well btw, /proc/fs/ doesn't exist :P
> >
> > -SNIP-
> > DESCRIPTION
> >  The fstat utility identifies open files.  A file is considered open
> by
> > a
> >  process if it was explicitly opened, is the working directory, root
> >  directory, active executable text, or kernel trace file for that
> > process.
> >  If no options are specified, fstat reports on all open files in the
> > sys-
> >  tem.
> > -SNIP-
> >
> > 749 open files reported... Far less than the maximum.
> >
> > --
> > me
> >
> >
> >
> >
> > -
> > 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
> >
> >
>
>


-
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: Lost connections on Freebsd

2002-08-18 Thread Gelu Gogancea

My dear friend,
If you put the problem in this way .maybe it's a good ideea to go to the
church and make some rosary for solving your problem.

Bye

- Original Message -
From: "Chris Knipe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 9:06 PM
Subject: Re: Lost connections on Freebsd


> Fair enough,
>
> But then why is MySQL the *only* thing I am having problems with?  MySQL's
> not the only application running on the box, it's not the only application
> opening / closing tcp sockets, its not the only thing opening / closing
file
> sockets
>
> *shrugs*... Maybe I should just rm -rf / and reinstall.
>
> - Original Message -
> From: "Gelu Gogancea" <[EMAIL PROTECTED]>
> To: "Chris Knipe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, August 18, 2002 8:01 PM
> Subject: Re: Lost connections on Freebsd
>
>
> > For sure "Bad file descriptor" error occur because your kernel it's not
> > able to create handler for the new open file(don't forget...socket it's
> also
> > a file ) which must be open.
> >
> > _
> > G.NET SOFTWARE COMPANY
> >
> > Permanent e-mail address : [EMAIL PROTECTED]
> >   [EMAIL PROTECTED]
> > - Original Message -
> > From: "Chris Knipe" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, August 18, 2002 8:14 PM
> > Subject: Re: Lost connections on Freebsd
> >
> >
> > >
> > > > ...or you have too many open files in the system.You reach the max.
> > number
> > > > of files which can be opened by the OS.Try to increase file-max from
> > > > /proc/sys/fs.
> > > >
> > >
> > > Highly doubtful.  It's a brand new server installation, exactly the
same
> > as
> > > all my others, and it's not doing half as much as the others are
> > >
> > > The box runs mysql, apache, and exim...  With less than 50 processes
> > running
> > > at any given time...
> > >
> > > It's FreeBSD as well btw, /proc/fs/ doesn't exist :P
> > >
> > > -SNIP-
> > > DESCRIPTION
> > >  The fstat utility identifies open files.  A file is considered
open
> > by
> > > a
> > >  process if it was explicitly opened, is the working directory,
root
> > >  directory, active executable text, or kernel trace file for that
> > > process.
> > >  If no options are specified, fstat reports on all open files in
the
> > > sys-
> > >  tem.
> > > -SNIP-
> > >
> > > 749 open files reported... Far less than the maximum.
> > >
> > > --
> > > me
> > >
> > >
> > >
> > >
> > > -
> > > 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
> > >
> > >
> >
> >
>
>
> -
> 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
>
>


-
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




myisamchk and large files?

2002-08-18 Thread David Miller

Hello all;

Is myisamchk known to have problems in tables with lots of rows?

I've a table with a simple, single, 32 bit integer as a key.  I have about
200 million rows in it.  I can run myisamchk -o -e names three times in a
row and receive this message each time:
Duplicate key  1 for record at 6816077328 against new record at 1491264864
Duplicate key  1 for record at 6816090172 against new record at 1491264864
Duplicate key  1 for record at 6816090224 against new record at 1491264864
Duplicate key  1 for record at 6816090276 against new record at 1491264864
Duplicate key  1 for record at 6816090328 against new record at 1491264864
Duplicate key  1 for record at 6816090380 against new record at 1491264864
Duplicate key  1 for record at 6816090432 against new record at 1491264864
Duplicate key  1 for record at 6816090484 against new record at 1491264864
Duplicate key  1 for record at 6816090536 against new record at 1491264864
Duplicate key  1 for record at 6816090588 against new record at 1491264864
Duplicate key  1 for record at 6816090640 against new record at 1491264864
Duplicate key  1 for record at 7004869336 against new record at 1491265060
myisamchk: warning: 21187 records have been removed
cinnamon:ip#


Thinking there must be some subtle corruption that even the extended check
couldn't find I wrote a program to dump the values of the table into a
flat file, deleted the table, recreated the table, then used "load data
infile /usr/tmp/names.data into table names" to reload it.  It reloaded
without apparent error.

Wanting to check the myisamchk utility, I then shut mysql down and re-ran
myisamchk -o -e names and got the same error message:

Duplicate key  1 for record at 6830620264 against new record at 1493850944
Duplicate key  1 for record at 6830620316 against new record at 1493850944
Duplicate key  1 for record at 6830620368 against new record at 1493850944
Duplicate key  1 for record at 6830620420 against new record at 1493850944
Duplicate key  1 for record at 6830620472 against new record at 1493850944
Duplicate key  1 for record at 7019553820 against new record at 1493850712
Data records: 201562542
myisamchk: warning: 21181 records have been removed
cinnamon:ip# 

Is this normal behavior?  It sure doesn't seem right to me.

Thanks,

--- David


-
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: SIGPROF problem in FreeBSD 4.6 (solved)

2002-08-18 Thread mysql

On Sat, 17 Aug 2002, Jeremy Zawodny wrote:

> On Fri, Aug 09, 2002 at 04:20:42PM -0400, David Miller wrote:
> > On Sun, 4 Aug 2002, Jeremy Zawodny wrote:
> > 
> > Hi Jeremy;
> > 
> > I didn't think my server would be doing any name resolution, particularly
> > while replace()ing millions of rows in a table.  That said,
> > --skip-name-resolve *seems* to have helped.  It's definately still
> > failing, and the ktrace is the same, so it's not two problems:
> 
> [snip]
> 
> > Pointers welcome.  Would alternate thread libraries be helpful?
> 
> Maybe.  I've had mostly good luck so far using LinuxThreads.  There are
> a few odd things, but it's better than FreeBSD's native threads.
[sql, query, text for the anti-spam filter]

A followup

After quite a lot of time investigating all sorts of things, the SIGPROF
problem seems to randomly occur with high values of HZ in the kernel
config file.  At first I thought it was hardware related, but when I
checked one system where things ran fine against the one where it didn't,
this was the difference.

So, the SIGPROF problem is solved.  I seem to have another problem with
myisamchk, but that's under a different subject.

--- David



-
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: Displaying the real thread PIDs.

2002-08-18 Thread Dan Nelson

In the last episode (Aug 18), Reid Sutherland said:
> Hi everyone, 
> 
> 'processlist' displays the current list of mysql threads as seen by
> mysql.  I'm looking for that same list but in real thread PID form. 
> Right now I need to be able to tell which thread is which at a system
> level.  Then I'm able to send a SIGKILL to some problem threads.

You cannot send signals to individual threads.  Signals are delivered
to the process as a whole rather than to a thread.  The only way to
kill a thread is from within the application itself.  Mysql provides
the "kill " command for this.

-- 
Dan Nelson
[EMAIL PROTECTED]

-
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: Lost connections on Freebsd

2002-08-18 Thread Iikka Meriläinen

Hello,

Some basic points about these problems:
1) have you another application/mysqld listening on the same tcp port?
2) have you tried different versions (switching between 3.23 and 4.x
series, for example)
3) try compiling from the source with a bit different configuration
parameters
4) do your connections drop if you're connecting from the localhost? How
about from other hosts? How about connecting with other clients?

Just don't give up. I've never seen a MySQL-related problem that nobody
has been able to solve. I don't believe this isn't about anything big. And
probably there are lots of more people active on this list next week,
somebody of them might be able to solve your problem. :-)

Regards,
Iikka

**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**

On Sun, 18 Aug 2002, Gelu Gogancea wrote:

> My dear friend,
> If you put the problem in this way .maybe it's a good ideea to go to the
> church and make some rosary for solving your problem.
>
> Bye
>
> - Original Message -
> From: "Chris Knipe" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, August 18, 2002 9:06 PM
> Subject: Re: Lost connections on Freebsd
>
>
> > Fair enough,
> >
> > But then why is MySQL the *only* thing I am having problems with?  MySQL's
> > not the only application running on the box, it's not the only application
> > opening / closing tcp sockets, its not the only thing opening / closing
> file
> > sockets
> >
> > *shrugs*... Maybe I should just rm -rf / and reinstall.
> >
> > - Original Message -
> > From: "Gelu Gogancea" <[EMAIL PROTECTED]>
> > To: "Chris Knipe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Sunday, August 18, 2002 8:01 PM
> > Subject: Re: Lost connections on Freebsd
> >
> >
> > > For sure "Bad file descriptor" error occur because your kernel it's not
> > > able to create handler for the new open file(don't forget...socket it's
> > also
> > > a file ) which must be open.
> > >
> > > _
> > > G.NET SOFTWARE COMPANY
> > >
> > > Permanent e-mail address : [EMAIL PROTECTED]
> > >   [EMAIL PROTECTED]
> > > - Original Message -
> > > From: "Chris Knipe" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Sunday, August 18, 2002 8:14 PM
> > > Subject: Re: Lost connections on Freebsd
> > >
> > >
> > > >
> > > > > ...or you have too many open files in the system.You reach the max.
> > > number
> > > > > of files which can be opened by the OS.Try to increase file-max from
> > > > > /proc/sys/fs.
> > > > >
> > > >
> > > > Highly doubtful.  It's a brand new server installation, exactly the
> same
> > > as
> > > > all my others, and it's not doing half as much as the others are
> > > >
> > > > The box runs mysql, apache, and exim...  With less than 50 processes
> > > running
> > > > at any given time...
> > > >
> > > > It's FreeBSD as well btw, /proc/fs/ doesn't exist :P
> > > >
> > > > -SNIP-
> > > > DESCRIPTION
> > > >  The fstat utility identifies open files.  A file is considered
> open
> > > by
> > > > a
> > > >  process if it was explicitly opened, is the working directory,
> root
> > > >  directory, active executable text, or kernel trace file for that
> > > > process.
> > > >  If no options are specified, fstat reports on all open files in
> the
> > > > sys-
> > > >  tem.
> > > > -SNIP-
> > > >
> > > > 749 open files reported... Far less than the maximum.
> > > >
> > > > --
> > > > me
> > > >
> > > >
> > > >
> > > >
> > > > -
> > > > 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
> > > >
> > > >
> > >
> > >
> >
> >
> > -
> > 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
> >
> >
>
>
> -
> 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: Words in fulltext search

2002-08-18 Thread Sergei Golubchik

Hi!

On Aug 17, Grzegorz wrote:
> Hi.
> 
> I'd like to know is it safe to tune mysql-4.0.2/myisam/ft_parser.c
> 
> #define true_word_char(X)   (isalnum(X) || (X)=='_')
> 
> to
> 
> #define true_word_char(X) (isgraph(X) && (X)!='@')

Not really. The parser won't recognize boolean search operators then.
So, it's better to exclude them from true_word_char().

> Or is anywhere better place to redefine chars which are "accepted" by fulltext 
>search ?

Unfortunately, not yet.

Regards,
Sergei

-- 
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   <___/

-
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: MySQL BLOB field - reliable or NOT?

2002-08-18 Thread Benjamin Pflugmann

Hello.

On Sun 2002-08-18 at 17:03:03 +0200, [EMAIL PROTECTED] wrote:
> I belive that I have a little bit bigger problem with MySQL, and for now, no
> one told
> me a solution. Problem is with BLOB fields. That type of field behaves OK if
> I use INSERT INTO statement. But the problem is that it is impossible to use
> INSERT INTO when I need to send a string full of binary characters I.E.
> picture, EXE etc. The only solution is to open that kind of file, place it
> in a variable, use ADO and with help of .AddNew mthod to write that variable
> to the database. Result: Multiple-step operation generated errors - error.
> Have You ever met this kind of problem. I have noticed that BLOB fields are
> not so attractive to work with. Are they reliable enough for work because
> whenever I try to work with this data type, I always have difficulties in
> combination with ADO, and seemingly, ADO has not got problems in work. If
> You can help me, I'd appreciate it.

>From MySQL's point of view, BLOBs are as reliable as any other field
type. Have you made sure that you escape special characters correctly
(but whatever means is typical in your programming language, for the C
API, it's mysql_read_escape_string())? If so, it is far more probable
that the reliably issues are not with MySQL but with some component in
between.

But as I said, make sure your that you escape everything correctly,
first.

Regards,

Benjamin.


-- 
[EMAIL PROTECTED]

-
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




Inserting long text gives Error 139

2002-08-18 Thread Craig Cummings

Hi there,

I've encountered a problem trying to insert large strings into a MySQL
database.   I'm running mysql  Ver 11.15 Distrib 3.23.39, for dec-osf4.0f
The details follow.

Round 1:

When I tried to insert very long text strings into a LONGTEXT column of a
MyISAM table I was getting errors that killed the connection.  I attempted
to increase the max_allowed_packet variable to 200MB but mysqladmin tells
me that max_allowed_packet = 67107840.

Round 2:

I tried again to load the sequences but then failed with a ~34MB string.
I then learned that this variable is capped at 16MB in version 3.23.

Round 3:

Unable to get around this without upgrading to MySQL 4.0, I tried to
insert the sequence by breaking it into smaller (1MB) substrings then
concatenating them in the database like so:

UPDATE table
SET string = CONCAT(string, next_substring)
WHERE ID = id;

I thought this might work because the packet size of the SQL statement is
only about 1MB.  However, this failed too with Error code 139, right after
the insert that would have made the concatenated sequence > 16 MB.

Does this mean that the size of existing string in the database is
included in the calculation of the packet size?  Or is there some other
parameter (limiting row size, for example) that is being violated?

Thank you for your help.

Regards,

Craig Cummings, Ph.D.

Relman Laboratory
Stanford University School of Medicine
Department of Microbiology and Immunology

e-mail: [EMAIL PROTECTED]
phone:  650-498-5998
fax:650-852-3291


-
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: LOAD DATA, \N, and auto_increment

2002-08-18 Thread Benjamin Pflugmann

Hello.

On Sun 2002-08-18 at 18:53:46 +0200, [EMAIL PROTECTED] wrote:
> To Whom it May Concern,
>   I sincerely doubt it's relevant, but i'm running MySQL 3.23.52 on 
>   Linux 2.4.18 (RedHat build 5). Client and server are on the same machine 
> and communicate via a Unix domain socket.
>   Perhaps it is a conscious decision, but it would seem an odd one: 
>   When using LOAD DATA [LOCAL] INFILE, if the table has a column that is 
> BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N 
  

\N means NULL with LOAD DATA. So you try to insert NULL values into a
NOT NULL column. I find warnings about this quite reasonable.

Regards,

Benjamin.


> for that column, a warning is generated for every line inserted. Replacing 
> \N with numbers in the infile gets rid of all warnings on import. Seems 
> to be a matter of adding one little check to Field_longlong::store() in 
> field.cc, but i could be wrong. I strongly suspect that it is 
> independant of integer size (e.g TINYINT, INT, BIGINT probably all 
> behave the same way).
>   Please send all replies to my personal address as well, as i am not 
> subscribed to the list.

-- 
[EMAIL PROTECTED]

-
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: LOAD DATA, \N, and auto_increment

2002-08-18 Thread Paul DuBois

>Hello.
>
>On Sun 2002-08-18 at 18:53:46 +0200, [EMAIL PROTECTED] wrote:
>>  To Whom it May Concern,
>>  I sincerely doubt it's relevant, but i'm running MySQL 3.23.52 on
>>  Linux 2.4.18 (RedHat build 5). Client and server are on the 
>>same machine
>>  and communicate via a Unix domain socket.
>>  Perhaps it is a conscious decision, but it would seem an odd one:
>>  When using LOAD DATA [LOCAL] INFILE, if the table has a column that is
>>  BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N
>   
>
>\N means NULL with LOAD DATA. So you try to insert NULL values into a
>NOT NULL column. I find warnings about this quite reasonable.

I do too, but on the other hand, multi-row INSERT also reports info
including warnings and errors, and inserting NULL into an auto-increment
column isn't counted as a warning (I just tried it).  I guess that might
be considered inconsistent...

>
>Regards,
>
>   Benjamin.
>
>
>>  for that column, a warning is generated for every line inserted. Replacing
>>  \N with numbers in the infile gets rid of all warnings on import. Seems
>>  to be a matter of adding one little check to Field_longlong::store() in
>>  field.cc, but i could be wrong. I strongly suspect that it is
>>  independant of integer size (e.g TINYINT, INT, BIGINT probably all
>>  behave the same way).
>>  Please send all replies to my personal address as well, as i am not
>>  subscribed to the list.
>
>--
>[EMAIL PROTECTED]


-
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: LOAD DATA, \N, and auto_increment

2002-08-18 Thread Benjamin Pflugmann

Hi.

On Sun 2002-08-18 at 21:58:04 +0200, [EMAIL PROTECTED] wrote:
> Hello.
> 
> On Sun 2002-08-18 at 18:53:46 +0200, [EMAIL PROTECTED] wrote:
> > To Whom it May Concern,
> > I sincerely doubt it's relevant, but i'm running MySQL 3.23.52 on 
> > Linux 2.4.18 (RedHat build 5). Client and server are on the same machine 
> > and communicate via a Unix domain socket.
> > Perhaps it is a conscious decision, but it would seem an odd one: 
> > When using LOAD DATA [LOCAL] INFILE, if the table has a column that is 
> > BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N 
>   
> 
> \N means NULL with LOAD DATA. So you try to insert NULL values into a
> NOT NULL column. I find warnings about this quite reasonable.

Argh! Ignore that. I overlooked the AUTO_INCREMENT portion.

Considering this, I think you have a point.

> > for that column, a warning is generated for every line inserted. Replacing 
> > \N with numbers in the infile gets rid of all warnings on import. Seems 
> > to be a matter of adding one little check to Field_longlong::store() in 
> > field.cc, but i could be wrong. I strongly suspect that it is 
> > independant of integer size (e.g TINYINT, INT, BIGINT probably all 
> > behave the same way).
> > Please send all replies to my personal address as well, as i am not 
> > subscribed to the list.

I just tested this with 3.23.49 and can reprocude this for BIGINT, INT
and TINYINT (did not test others). Interestingly, the values are
correctly inserted (i.e. incremented).

CC'ed to bugs list, because I can reproduce it.

How-to-repeat:

shell> cat >/tmp/in < chmod a+r /tmp/in

mysql> CREATE TABLE ntest2 ( a INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY );
mysql> LOAD DATA INFILE '/tmp/in' INTO TABLE ntest2;
Query OK, 6 rows affected (0.00 sec)
Records: 6  Deleted: 0  Skipped: 0  Warnings: 3
mysql> SELECT * FROM ntest2;
++
| a  |
++
|  1 |
|  2 |
|  3 |
|  4 |
| 10 |
| 11 |
++
6 rows in set (0.00 sec)

As said above, the shown output differs from the expected in the
"Warnings: 3" message. There should be 0 warnings.

Regards,

Benjamin.

-- 
[EMAIL PROTECTED]

-
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




High volume HEAP table

2002-08-18 Thread Rick Robinson

Hi all,
I'm testing using a HEAP table to maintain transient state in a high
volume TP environment.  So far, it looks promising, and I want to ask
anyone about similar experiences and solicit some input.

Some background:
* I have one table; the row length is ~200 bytes and the table will
typically never have more than 10,000 rows (more like 7,000 on average).
* The table is accessed via one of two keys.  I have an index on each.
The EXPLAIN output indicates these are used.
* The ratio of access is ~ 7 selects : 1 insert : 1 delete : 1 update.
All selects are singleton row selects (using limit 1 even though it may
be redundant) or select count().
* The rate of access is ~15,000 - 20,000 / second across ~80 processes.
* The Mysql machine is not memory constrained.
* The Mysql instance will be on a separate physical machine from the app
machines performing the processing (4 app machines) - they all need to
share this data.

Questions:
* Is this feasible?  Has anyone done something like this?
* What specific items should I tune for the Mysql instance that supports
this?
* In initial testing, I see the row selects that return all the data
taking 3-5 ms where the count selects often take < 1 ms.  Is this about
what to expect?  Is the delay in the row select due to data size?
* Are there any gotchas I should be aware of?  I already understand the
transient nature of HEAP tables, so anything beyond that.

Thanks for your help.  Your feedback may help me justify this approach.

Regards,
Rick


 



-
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




Return results in groups - CNET style

2002-08-18 Thread olinux

I would like to allow articles to be searched and
returned in grouped categories - similar to cnet.com

See example here:
http://cnet.search.com/search?timeout=3&q=mysql

Grouping is not a problem - but it becomes a problem
when there are thousands of results and I only want to
display the first few from each category - similar to
the way cnet does.

Table structure (simplified) I am working with is 

id | category | date | title | article

Thanks much,
olinux


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

-
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: BLOB and ADO

2002-08-18 Thread Mike Hillyer

Well, first of all this belongs in the myODBC thread as the implementation
of BLOB fields in mySQL is excellent in my opinion. But to answer your
question, you cannot simply put a binary file into a variant type (or any
other type) variable and have it get updated. You need to use the ADO stream
object. I do not pretend to know what it is doing behind the scenes, but it
works quite well in my VB6 front end. The article explaining how the stream
object works can be found here:
http://support.microsoft.com/default.aspx?scid=kb;[LN];Q258038. One caveat,
the default install of mysql allows for files no larger than 1MB, this can
be fixed by adjusting the max_allowed_packet variable in my.cnf to a higher
number. I use 16M, which is the limit of the mySQL 3.X branch, the 4.x
series is limited only by server memory, but if your server is accessed
across a WAN, a 16M limit may be a good idea. I found it was for my
application.

Good Luck,
Mike Hillyer


-Original Message-
From: Bruno Batarelo [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 18, 2002 8:05 AM
To: [EMAIL PROTECTED]
Subject: BLOB and ADO


Greetings

There is a persistant problem while trying to insert a string from within VB
6.0 application to the LONGBLOB field. I use ADO and code for adding new
record is as followes:

TabelaTekst.AddNew
TabelaTekst!Polje = BinaryString
TabelaTekst.Update

and error is: "Multiple-step operation generated errors. Check each status
value."

I do not know what to do. I use MySQL 4.01 and MyODBC 3.51.03. It occures
only with this field data type. I would appreciate any help since I'm in big
trouble if I do not solve this. Thank You all.

Bruno



-
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



-
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




Another one on lost connections( using web interface)

2002-08-18 Thread Defryn, Guy


I also have a problem with lost connections.
I have small mysql database (version 3.23.49 on FreeBSD 4.5)

I have created a website interface to enter and retrieve data.
I used ASP to do this. Sometimes when I go to the website
I get the error "can't connect or lost connection to server."

The mysql install has been done with default settings and
There are never more than 2 people using the database at the same time.

I also created a PHP interface to the database and I received the same error.

The error does not occur all the time and when it occurs it goes away by refreshing 
the web browser.

I never have any problems when working on the mysql server from the command line.

Any ideas?


-
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: Another one on lost connections( using web interface)

2002-08-18 Thread Chris Knipe

PHP's more than likely just loosing persistent connections to the DB.

It's a coding thing I think... You need to call mysql_connect() on every
page where you need to use the database, even if you use mysql_pconnect().

If there's a mysql specific error, I think MySQL would most definitely write
something to the error log...

Tweaking your my.cnf and php.ini may also help you cause here...

--
me


- Original Message -
From: "Defryn, Guy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 11:25 PM
Subject: Another one on lost connections( using web interface)


>
> I also have a problem with lost connections.
> I have small mysql database (version 3.23.49 on FreeBSD 4.5)
>
> I have created a website interface to enter and retrieve data.
> I used ASP to do this. Sometimes when I go to the website
> I get the error "can't connect or lost connection to server."
>
> The mysql install has been done with default settings and
> There are never more than 2 people using the database at the same time.
>
> I also created a PHP interface to the database and I received the same
error.
>
> The error does not occur all the time and when it occurs it goes away by
refreshing the web browser.
>
> I never have any problems when working on the mysql server from the
command line.
>
> Any ideas?
>
>
> -
> 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
>
>


-
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: Lost connections on Freebsd

2002-08-18 Thread Chris Knipe

Seems to be getting more critical now as well.

Aug 19 01:54:27 netsonic mysqld[48323]: warning: can't get client address:
Bad file descriptor
Aug 19 01:54:59 netsonic last message repeated 13 times
Aug 19 01:54:59 netsonic last message repeated 2 times

>From what I can see, it's spitting out the errors now on every single query.
Running under gdb also doesn't return anything (or I'm debugging it
wrong?)

MySQL's error log is empty - nothing logged

--
me



- Original Message -
From: "Chris Knipe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Victoria Reznichenko"
<[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 5:08 PM
Subject: Re: Lost connections on Freebsd


> Lo Michael,
>
> I digged a bit more, and while running under debug mode, MySQL doesnt
crash,
> it does complain about a bad file descriptor on /etc/hosts.allow.
>
> If this is the cause of the failure, there might be a possibly bug in the
> code, because I really think it's arb that the entire MySQL needs to bail
> because it can't open a file...  Here's the relavent messages from syslog,
>
> Aug 18 16:03:29 netsonic mysqld[15158]: warning: /etc/hosts.allow, line
23:
> can't get client address: Bad file descriptor
> Aug 18 16:03:30 netsonic mysqld[15158]: warning: /etc/hosts.allow, line
23:
> can't get client address: Bad file descriptor
>
> When I run without debug, I think this is what *may* be causing the crash,
> whilst when running under debug mode, MySQL obviously has some sort of
> protection so that it sends out only a warning instead of crashing
>
> > Chris> I've recompiled the master about three times now, and it still
> crashed.
> > Chris> Eventually, it came to such a extend that the moment I open port
> 3306 MySQL
> > Chris> would crash.  I can just use telnet  3306, or open a netcat
on
> port
> > Chris> 3306, and MySQL would die.
> >
> > Can you try to configure MYSQL with CFLAGS=-g and run the server under
> > gdb.
> >
> > If we could get a full back trace where it fails, it could help us
> > find out what's wrong.
>
> I tried.  Now, when I recompiled it again without debug support, it
doesn't
> crash for some reason.  At least not for now  The below log is issued
to
> syslog at every connection however.
>   Aug 18 17:03:53 netsonic mysqld[47947]: warning: can't get client
address:
> Bad file descriptor
>
> I'll keep my eyes on it like a hawk.  First crash I get, it's back to gdb
we
> go... It looks to me as if it may be tcpwrappers that's busted however...
> :-(
>
> > Chris> So far, the only way I found to keep the FreeBSD Port up, was to
> recompile
> > Chris> it with debug support.  I so far have 90 minutes uptime on the
> Master with
> > Chris> debug support compiled in, but it's needless to say not really
the
> desired
> > Chris> result.
> >
> > How did you configure MySQL in this case ?
>
> Altered the Makefile in the ports, compiled / installed, and did a cvsup
to
> sync the ports again... MySQL compiles per default with CFLAGS=-g from the
> ports, I just need had to recompile it again now, so that I could remove
the
> debug support and let MySQL actually crash again :P
>
> --
> me
>
>
>
> -
> 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
>
>


-
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




Multi Table Types

2002-08-18 Thread Randy Johnson

I have the latest stable mysql installed with innodb support.. is it
possible to have all myisam tables  but one that i need to have innodb table
type for row level locking and transactions


Randy



-
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: MySQL BLOB field - reliable or NOT?

2002-08-18 Thread Paul DuBois

At 17:03 +0200 8/18/02, Bruno Batarelo wrote:
>I belive that I have a little bit bigger problem with MySQL, and for now, no
>one told
>me a solution. Problem is with BLOB fields. That type of field behaves OK if
>I use INSERT INTO statement. But the problem is that it is impossible to use
>INSERT INTO when I need to send a string full of binary characters I.E.
>picture, EXE etc. The only solution is to open that kind of file, place it
>in a variable, use ADO and with help of .AddNew mthod to write that variable
>to the database. Result: Multiple-step operation generated errors - error.
>Have You ever met this kind of problem. I have noticed that BLOB fields are
>not so attractive to work with. Are they reliable enough for work because
>whenever I try to work with this data type, I always have difficulties in
>combination with ADO, and seemingly, ADO has not got problems in work. If
>You can help me, I'd appreciate it.

You'll get the same kind of problem trying to put that kind of information
into *any* string column.  The problem isn't MySQL.  You're not constructing
the statement properly.  Any MySQL API should have some kind of method for
escaping data values like you're working with so that you can insert them
into the query string.  For DBI, you use quote() or placeholders.  For
PHP, you use addslashes().  For JDBC or Python DB-API, you use placeholders.
Etc.

>
>Bruno


-
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: Multi Table Types

2002-08-18 Thread Paul DuBois

At 23:43 -0400 8/18/02, Randy Johnson wrote:
>I have the latest stable mysql installed with innodb support.. is it
>possible to have all myisam tables  but one that i need to have innodb table
>type for row level locking and transactions

Yes.

-
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: slow query in MySQL 4

2002-08-18 Thread Tac

 30.328 1 select count(*) as C from articles_category c inner join
db_news.articles a using (article_id) inner join media m using (media_id)
where 1

Query Explanation
table  type  possible_keys  key  key_len  ref  rows  Extra
c  index  PRIMARY  PRIMARY  841551  Using index
a  eq_ref  PRIMARY,media_id  PRIMARY  4  db_news.c.article_id  1
m  eq_ref  PRIMARY  PRIMARY  4  db_news.a.media_id  1  Using index

Here are the tables.  I think the problem present with just 2 tables as
well, just a simple inner join on two tables with a primary key and an
indexed foreign key.  This seems like a pretty basic query, but I must be
doing something wrong because 30 seconds to do a count can't be right.

Thx,

Tac

---

#
# Table structure for table `articles_category`
#

CREATE TABLE articles_category (
  article_id int(11) NOT NULL default '0',
  category_id int(11) NOT NULL default '0',
  PRIMARY KEY  (article_id,category_id),
  KEY category_id (category_id)
) TYPE=MyISAM PACK_KEYS=1;


#
# Table structure for table `articles`
#

CREATE TABLE articles (
  article_id int(11) NOT NULL auto_increment,
  : (other stuff)
  site_id int(11) NOT NULL default '0',
  PRIMARY KEY  (article_id),
  KEY edition (edition_id),
  KEY source_date (source_date),
  KEY site_id (site_id),
  KEY media_id (media_id),
  FULLTEXT KEY headline (headline,subhead)
) TYPE=MyISAM PACK_KEYS=1;

#
# Table structure for table `media`
#

CREATE TABLE media (
  media_id int(11) NOT NULL auto_increment,
  : (other stuff)
  PRIMARY KEY  (media_id)
) TYPE=MyISAM PACK_KEYS=1;

- Original Message -
From: "Egor Egorov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 17, 2002 11:13 AM
Subject: Re: slow query in MySQL 4


> Tac,
> Saturday, August 17, 2002, 12:57:24 AM, you wrote:
>
> T> A simple query in MySQL 4 that gets a count from 3 inner joined tables:
>
> T>  select count(*) as C from quotes q inner join articles a using
(article_id)
> T> inner join media m using (media_id)
>
> T> article_id and media_id are int(11), and are the primary keys for their
> T> respective tables.  When used as foreign keys, they are also int(11),
and
> T> are indexed.  It's taking about 10 seconds to return the count, ~3000,
from
> T> tables that aren't all that big (quotes: 3000, articles: 100,000;
media:
> T> 1500).
>
> T> I plan to use the new MySQL 4 row count feature soon, but the code I'm
> T> working on needs to work on both MySQL 3 and 4 for now.
>
> T> I believe that the query works significantly faster on MySQL 3.
>
> T> Any ideas?
>
> Could you show the output of EXPLAIN SELECT?
>
>
>
>


-
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




where clause structures

2002-08-18 Thread Terence

try this:

selectwhere WHATEVER LIKE 'whatever%'

notice the '%' at the end not the beginning...hope this is what you
wanted...

lekker dag verder boet.

- Original Message -
From: "Chris Knipe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 5:54 AM
Subject: Re: where clause structures


EEK

Tables structures :P

mysql> describe CompanyDetails;
+---+---+--+-+-+
+
| Field | Type  | Null | Key | Default |
Extra  |
+---+---+--+-+-+
+
| CompanyID | tinyint(4) unsigned   |  | PRI | NULL|
auto_increment |
| CompanyActive | enum('1','0') |  | MUL | 0   |
|
| CompanySuspended  | enum('0','1','2','3','4','5') |  | MUL | 0   |
|


mysql> describe CompanyDNSZones;
+--+
---+--+-+-++
| Field| Type
| Null | Key | Default | Extra  |
+--+
---+--+-+-++
| ZoneID   | int(11)
|  | PRI | NULL| auto_increment |
| CompanyID| smallint(6)
|  | MUL | 0   ||
| ZoneName | varchar(250)
|  | UNI | ||
| ZoneServices |
set('HasMail','HasMailingList','HasBackupMail','IsMegaDNS','IsSecondary') |
| MUL | ||




- Original Message -
From: "Chris Knipe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 17, 2002 11:44 PM
Subject: where clause structures


> Lo everyone,
>
> I seem to be having a problem with the structuring of my query - more
> specifically, with the WHERE clause...
>
> mysql> SELECT ZoneName
> ->   FROM CompanyDNSZones
> ->   LEFT JOIN CompanyDetails ON
> CompanyDetails.CompanyID=CompanyDNSZones.CompanyID
> ->   WHERE CompanyDetails.CompanySuspended='0' AND
> -> CompanyDNSZones.ZoneName='megalan.co.za' AND
> -> CompanyDNSZones.ZoneServices LIKE '%HasMail%' OR
> -> CompanyDNSZones.ZoneServices LIKE '%HasMailingList%';
> +-+
> | ZoneName|
> +-+
> | megalan.co.za   |
> | lists.megalan.co.za |
> +-+
> 2 rows in set (0.01 sec)
>
> How do I get it to only return the item specified in the WHERE clause?
>
> I explictly tell MySQL in my where clause to only return results where
> CompanyDNSZones.ZoneName='megalan.co.za', so where does it fall out
> returning lists.megalan.co.za as well?
>
> --
> me
>
> PS: Just for interest takes, can LEFT / RIGHT / a combination of LEFT &
> RIGHT joins be used to cross-reference three or more tables, or is it
> limited to 2 tables only?
>
>
>
>
> -
> 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
>
>


-
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


-
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




Commit and rollback problem

2002-08-18 Thread forum mail

Hi List!

Hope you can help me with my problem...
I am trying to incorporate commit and rollback in my sql 
statements... I have tried it in my web application which runs 
on weblogic and it work fine. However, when I migrated my web 
app to Tomcat, it failed to rollback when it encountered an 
error.  Ive been using the same mysql driver for both.
Is there a special configuration I need that is dependent on 
the server Im running? Other sql statements without the commit 
and rollback functionality.. works perfectly fine in TOmcat. 

I wonder what's wrong.  I dunno where to address the problem... 
its it a mysql problem or server config.

Thanks in advance.

 




Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

-
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