Re: very large key_buffer on amd64?

2005-09-20 Thread Christopher A. Kantarjiev



It appears that mysqld won't start if the setting for key_buffer
is more than 2GB.



Maybe you've also hit the quirks of memory management and malloc, just as
we've posted a while ago in http://lists.mysql.com/mysql/186930 ?



It seems to have been a simple issue of not unlimiting the datasize. We're up to 
using 8GB (which seems to be NetBSD's limit) now.


It sure would be nice if MySQL would use mmap to read/write the index!

Thanks,
chris


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



SQL to use left join and find missing values

2005-09-20 Thread RAPPAZ Francois
Hi all
with Mysql 3.23 I would like to find missing values in the following situation:

1) table boxes: describes kind of boxes differing by how many items I can put 
in.

Primary key is BoxID

boxID +  Places
A +   1
B +   3
C +   5

2) table car describes how I can put some boxes on a car for a journey

Primary Key is composed of TravelID, BoxNo 
BoxNo is auto_increment, and start at 1 for each new travel

TravelID + BoxID + BoxNo
   1 +   A   +  1
   1 +   A   +  2
   1 +   B   +  3
   2   +   A   +  1
   2 +   B   +  2
   2 +   C   +  3


3) table load describes how items can be placed in the boxes once a car has 
been monted with boxes

Primary Key is composed of TravelID, BoxNo, PlaceNo
PlaceNo is auto_increment, and start at 1 for each new Box beeing load (it's 
just here to make a primary key)

TravelID + BoxNo + PlaceNo + ItemName
1+   1   +   1 +   itemName1
2+   2   +   1 +   itemName2
2+   2   +   2 +   itemName3


I want to make a query to get how much free places there is for a given travel 
(ie how much places have been prepared in table car that are not occupied in 
table load)

I would like to get this kind of query working

select sum(PlaceNo)
from boxes
inner join car using (boxID)
inner join load using (TravelID)
left outer join load on car.BoxNo=load.BoxNo
Where load.TravelID=1 AND load.BoxNo is null

but this query does not work because I have a duplicate table name (load). 
Left join would be possible if BoxNo was unique for the whole table load, but 
is there a way to use left join here ?

This query works when there is one record in load for a given travel

select sum(PlaceNo)
from boxes
inner join car using (boxID)
where car.TravelID=1 AND car.BoxNo not in (select BoxNo 
from load 
where load.TravelID=1)

but when the subquery return null, the main query return null to when it should 
return the total of free places...
How could I correct this ?

Thanks in advance

François

François Rappaz

Centre de documentation de la Faculté des Sciences 
Université de Fribourg
DokPe - Dokumentationszentrum der Naturwissenschaftlichen Fakultät Universität 
Freiburg 
Pérolles CH-1700 Fribourg Switzerland
http://www.unifr.ch/dokpe/
Tel.: 41 (0)26 300 92 60 
Fax.: 41 (0)26 300 97 30

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Error in Update Command Text - What am I missing

2005-09-20 Thread Blue Wave Software
I'm getting an error from the following SQL Syntax. Can anyone guide me on
what I am missing. It's probably obvious but I can't see it I have even
resorted to rereading the section on the update command.

The CustID Field is the unique Identifier and primary key of the table. The
Updated field is a time stamp field.

I've even removed the UPDATED='2005-09-18 10:30:56' with no success. 

 

 

Sql Syntax:

UPDATE Clients_Master SET Label='', Title='Mrs', FName='Jane', MName='',
SName='Doe', Building='', Unit='', STNumber='', STName='', STType='',
STSuburb='', STState='', STPostcode='', Postal1='', Postal2='', Postal3='',
PSuburb='', PState='', PPostalcode='', PBarcode='', HPhone='', MPhone='',
HEmail='', MF='', Maiden='', ClientNo='999', Pcontact='',
UPDATED='2005-09-20 04:46:37') WHERE CustID='MNO1234567890' AND
UPDATED='2005-09-18 10:30:56'

 

 

Error Message:

You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near ') WHERE
CustID='MNO1234567890' AND UPDATED='2005-09-18 10:30:56'' at line 1

 

Tec Info:

Server - MySQL 4.1.11-nt-max via TCP/IP

Client - MySQL Client Version 5.0.4

 

 

 

Regards,

  Justin Elward

 

Blue Wave Software Pty Limited

[EMAIL PROTECTED]

 

Ph. +61 2 4320 6090

Fx. +61 2 4320 6092

 


---

DISCLAIMER: 

This message is proprietary to Blue Wave Software Pty Limited (BWS) and is
intended solely for the use of the individual or individuals to whom it is
addressed. It may contain privileged or confidential information and should
not be circulated with out informing BWS prior or used for any purpose other
than for what it is intended. If you have received this message in error,
please notify the originator immediately. If you are not the intended
recipient, you are notified that you are strictly prohibited from using,
copying, altering, or disclosing the contents of this message. BWS accepts
no responsibility (except where required under Australian law) for loss or
damage arising from the use or misuse of the information transmitted by this
email including damage from virus.


---

 



Re: Error in Update Command Text - What am I missing

2005-09-20 Thread Arno Coetzee

Blue Wave Software wrote:


I'm getting an error from the following SQL Syntax. Can anyone guide me on
what I am missing. It's probably obvious but I can't see it I have even
resorted to rereading the section on the update command.

The CustID Field is the unique Identifier and primary key of the table. The
Updated field is a time stamp field.

I've even removed the UPDATED='2005-09-18 10:30:56' with no success. 






Sql Syntax:

UPDATE Clients_Master SET Label='', Title='Mrs', FName='Jane', MName='',
SName='Doe', Building='', Unit='', STNumber='', STName='', STType='',
STSuburb='', STState='', STPostcode='', Postal1='', Postal2='', Postal3='',
PSuburb='', PState='', PPostalcode='', PBarcode='', HPhone='', MPhone='',
HEmail='', MF='', Maiden='', ClientNo='999', Pcontact='',
UPDATED='2005-09-20 04:46:37') WHERE CustID='MNO1234567890' AND
UPDATED='2005-09-18 10:30:56'





Error Message:

You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near ') WHERE
CustID='MNO1234567890' AND UPDATED='2005-09-18 10:30:56'' at line 1



Tec Info:

Server - MySQL 4.1.11-nt-max via TCP/IP

Client - MySQL Client Version 5.0.4







Regards,

 Justin Elward



Blue Wave Software Pty Limited

[EMAIL PROTECTED]



Ph. +61 2 4320 6090

Fx. +61 2 4320 6092




---

DISCLAIMER: 


This message is proprietary to Blue Wave Software Pty Limited (BWS) and is
intended solely for the use of the individual or individuals to whom it is
addressed. It may contain privileged or confidential information and should
not be circulated with out informing BWS prior or used for any purpose other
than for what it is intended. If you have received this message in error,
please notify the originator immediately. If you are not the intended
recipient, you are notified that you are strictly prohibited from using,
copying, altering, or disclosing the contents of this message. BWS accepts
no responsibility (except where required under Australian law) for loss or
damage arising from the use or misuse of the information transmitted by this
email including damage from virus.


---




 



UPDATE Clients_Master SET Label='', Title='Mrs', FName='Jane', MName='',
SName='Doe', Building='', Unit='', STNumber='', STName='', STType='',
STSuburb='', STState='', STPostcode='', Postal1='', Postal2='', Postal3='',
PSuburb='', PState='', PPostalcode='', PBarcode='', HPhone='', MPhone='',
HEmail='', MF='', Maiden='', ClientNo='999', Pcontact='',
UPDATED='2005-09-20 04:46:37' 
WHERE CustID='MNO1234567890' AND UPDATED='2005-09-18 10:30:56'



try this

exclude the closing bracket before the where clause.

--
Arno Coetzee
Developer
Flash Media Group
Office : 2712 342 7595
Mobile : 2782 693 6180


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql_free_result() 2 different connections

2005-09-20 Thread Pooly
hi,


 I have 2 different result sets, since are two different connections to the
 server, simultaneous but independent (two handles, two connections, two
 different queries)
 
 Today was probing one of my programs with just one single connection and
 mysql_free_result() still crashes even with just one set of results, no
 matter how I use it, it always crashes :-(
 

what is the code you're using ?

-- 
Pooly
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



clean uninstall mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz

2005-09-20 Thread Joeffrey Betita
hi
how can i clean uninstall mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz i
would like to install mysql-4.1.14.tar.gz i tried make clean, make distclean
etc. only error encountered. thank you very much.


rgds,
Joeffrey
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.3/106 - Release Date: 9/19/2005


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Failure to install on Solaris.

2005-09-20 Thread Hugh Sasse


On solaris 9 Sparc I built originally by modifying
mysql-4.1.14/BUILD/compile-solaris-sparc thusly

neelix hgs 81 % display_diffs.rb .
--- ./compile-solaris-sparc.orig2005-08-17 18:06:41.0 +0100
+++ ./compile-solaris-sparc 2005-09-06 18:36:25.386697000 +0100
@@ -11,6 +11,6 @@
 (cd gemini  aclocal  autoheader  aclocal  automake  autoconf)
  fi

-CFLAGS=-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts 
-Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused  -O3 -fno-omit-frame-pointer 
-mcpu=v8 -Wa,-xarch=v8plusa CXX=gcc CXXFLAGS=-Wimplicit -Wreturn-type -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings 
-Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti  -O3 -fno-omit-frame-pointer -mcpu=v8 
-Wa,-xarch=v8plusa -g ./configure --prefix=/usr/local/mysql --enable-assembler 
--with-extra-charsets=complex --enable-thread-safe-client
+CFLAGS=-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts 
-Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused  -O3 -fno-omit-frame-pointer 
-mcpu=v8 -Wa,-xarch=v8plusa CXX=gcc CXXFLAGS=-Wimplicit -Wreturn-type -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings 
-Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti  -O3 -fno-omit-frame-pointer -mcpu=v8 
-Wa,-xarch=v8plusa -g ./configure --prefix=/usr/local/mysql --enable-assembler 
--with-extra-charsets=complex --enable-thread-safe-client --with-tcp-port=3308 
--with-unix-socket-path=/tmp/mysql4.sock --prefix=/usr/local/mysql-4.1.14

  gmake -j 4
neelix hgs 82 %
and I invoked the script directly, and also tried with bash.
I have:

GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.9

gcc (GCC) 3.4.3


This got as far as the test phase, and tested successfully.  I did
it this way because of the solaris settings being collected
together.  However, when I installed, parts of the installation
overwrote /usr/local/mysql despite my --prefix.  I already have a
mysql setup there that I didn't want disturbed.

So I started again and built using this script:
#!/bin/bash
CFLAGS=-O3 -L$LD_LIBRARY_PATH CXX=gcc MAKE=gmake \
 CXXFLAGS=-O3 -L$LD_LIBRARY_PATH -felide-constructors -fno-exceptions 
-fno-rtti ./configure \
 --prefix=/usr/local/mysql --enable-assembler \
 --enable-thread-safe-client \
 --with-mysqld-ldflags=-all-static --with-tcp-port=3308 \
 --with-unix-socket-path=/tmp/mysql4.sock \
 --with-pthread --with-gnu-ld  \
 gmake  \
 cd mysql-test  ./mysql-test-run --force
 exit

My LD_LIBRARY_PATH is

/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib

This blows up with:

gmake[4]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql/share'
gmake[4]: Entering directory `/scratch/hgs/mysql-4.1.13/sql'
/bin/bash ../libtool --preserve-dup-deps --mode=link gcc  -O3 -DDBUG_OFF -O3 
-L/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib
 -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates 
-fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL 
-D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T   -o mysql_tzinfo_to_sql  
mysql_tzinfo_to_sql.o -all-static ../myisam/libmyisam.a 
../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a 
../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a 
../strings/libmystrings.a -lz   -lpthread -lposix4 -lcrypt -lgen -lsocket -lnsl 
-lm  -lpthread
gcc -O3 -DDBUG_OFF -O3 -felide-constructors -fno-exceptions -fno-rtti 
-fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW 
-DDEFINE_CXA_PURE_VIRTUAL -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -o 
mysql_tzinfo_to_sql mysql_tzinfo_to_sql.o -static  
-L/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib
 ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a 
../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a 
../strings/libmystrings.a -lz -lpthread -lposix4 -lcrypt -lgen -lsocket -lnsl 
-lm -lpthread
/usr/local/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status
gmake[4]: *** [mysql_tzinfo_to_sql] Error 1
gmake[4]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/scratch/hgs/mysql-4.1.13'
gmake: *** [all] Error 2
neelix hgs 57 % ls /usr/lib/*pthread*

Re: Failure to install on Solaris.

2005-09-20 Thread David Logan

Hugh Sasse wrote:



On solaris 9 Sparc I built originally by modifying
mysql-4.1.14/BUILD/compile-solaris-sparc thusly

neelix hgs 81 % display_diffs.rb .
--- ./compile-solaris-sparc.orig 2005-08-17 18:06:41.0 +0100
+++ ./compile-solaris-sparc 2005-09-06 18:36:25.386697000 +0100
@@ -11,6 +11,6 @@
(cd gemini  aclocal  autoheader  aclocal  automake  autoconf)
fi

-CFLAGS=-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W 
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare 
-Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 
-Wa,-xarch=v8plusa CXX=gcc CXXFLAGS=-Wimplicit -Wreturn-type 
-Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat 
-Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual 
-Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti -O3 
-fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g ./configure 
--prefix=/usr/local/mysql --enable-assembler 
--with-extra-charsets=complex --enable-thread-safe-client
+CFLAGS=-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W 
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare 
-Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 
-Wa,-xarch=v8plusa CXX=gcc CXXFLAGS=-Wimplicit -Wreturn-type 
-Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat 
-Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual 
-Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti -O3 
-fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g ./configure 
--prefix=/usr/local/mysql --enable-assembler 
--with-extra-charsets=complex --enable-thread-safe-client 
--with-tcp-port=3308 --with-unix-socket-path=/tmp/mysql4.sock 
--prefix=/usr/local/mysql-4.1.14


gmake -j 4
neelix hgs 82 %
and I invoked the script directly, and also tried with bash.
I have:

GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.9

gcc (GCC) 3.4.3


This got as far as the test phase, and tested successfully. I did
it this way because of the solaris settings being collected
together. However, when I installed, parts of the installation
overwrote /usr/local/mysql despite my --prefix. I already have a
mysql setup there that I didn't want disturbed.

So I started again and built using this script:
#!/bin/bash
CFLAGS=-O3 -L$LD_LIBRARY_PATH CXX=gcc MAKE=gmake \
CXXFLAGS=-O3 -L$LD_LIBRARY_PATH -felide-constructors -fno-exceptions 
-fno-rtti ./configure \

--prefix=/usr/local/mysql --enable-assembler \
--enable-thread-safe-client \
--with-mysqld-ldflags=-all-static --with-tcp-port=3308 \
--with-unix-socket-path=/tmp/mysql4.sock \
--with-pthread --with-gnu-ld  \
gmake  \
cd mysql-test  ./mysql-test-run --force
exit

My LD_LIBRARY_PATH is

/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib 



This blows up with:

gmake[4]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql/share'
gmake[4]: Entering directory `/scratch/hgs/mysql-4.1.13/sql'
/bin/bash ../libtool --preserve-dup-deps --mode=link gcc -O3 
-DDBUG_OFF -O3 
-L/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib 
-felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates 
-fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL 
-D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -o mysql_tzinfo_to_sql 
mysql_tzinfo_to_sql.o -all-static ../myisam/libmyisam.a 
../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a 
../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a 
../strings/libmystrings.a -lz -lpthread -lposix4 -lcrypt -lgen 
-lsocket -lnsl -lm -lpthread
gcc -O3 -DDBUG_OFF -O3 -felide-constructors -fno-exceptions -fno-rtti 
-fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW 
-DDEFINE_CXA_PURE_VIRTUAL -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -o 
mysql_tzinfo_to_sql mysql_tzinfo_to_sql.o -static 
-L/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib 
../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a 
../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a 
../regex/libregex.a ../strings/libmystrings.a -lz -lpthread -lposix4 
-lcrypt -lgen -lsocket -lnsl -lm -lpthread

/usr/local/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status
gmake[4]: *** [mysql_tzinfo_to_sql] Error 1
gmake[4]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/scratch/hgs/mysql-4.1.13'
gmake: *** [all] Error 2
neelix hgs 57 % ls /usr/lib/*pthread*

Re: Failure to install on Solaris.

2005-09-20 Thread Pooly
Hi,


 /usr/local/bin/ld: cannot find -lpthread
 collect2: ld returned 1 exit status
 gmake[4]: *** [mysql_tzinfo_to_sql] Error 1
 gmake[4]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
 gmake[3]: *** [all-recursive] Error 1
 gmake[3]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
 gmake[2]: *** [all] Error 2
 gmake[2]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory `/scratch/hgs/mysql-4.1.13'
 gmake: *** [all] Error 2
 neelix hgs 57 % ls /usr/lib/*pthread*
 /usr/lib/libpthread.so /usr/lib/llib-lpthread
 /usr/lib/libpthread.so.1   /usr/lib/llib-lpthread.ln
 neelix hgs 58 %
 
 
 Any suggestions as to how I get around this and get the whole thing
 installed in /usr/local/mysql-4.1.13 ?

Have you installed the development package for the pthread library ?
I guess you're missing libpthread.a which is needed even for a dynamic
linking, the linker can't do it's job here.

-- 
Pooly
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Failure to install on Solaris.

2005-09-20 Thread Hugh Sasse

On Tue, 20 Sep 2005, David Logan wrote:


Hugh Sasse wrote:



On solaris 9 Sparc I built originally by modifying
mysql-4.1.14/BUILD/compile-solaris-sparc thusly
[...] 

gmake -j 4
neelix hgs 82 %
and I invoked the script directly, and also tried with bash.
I have:

GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.9

gcc (GCC) 3.4.3


[...]

So I started again and built using this script:
#!/bin/bash
CFLAGS=-O3 -L$LD_LIBRARY_PATH CXX=gcc MAKE=gmake \
CXXFLAGS=-O3 -L$LD_LIBRARY_PATH -felide-constructors -fno-exceptions 
--with-pthread --with-gnu-ld  \

[...]


My LD_LIBRARY_PATH is

/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib

 


This blows up with:


[...]
gcc -O3 -DDBUG_OFF -O3 -felide-constructors -fno-exceptions -fno-rtti 
-fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW 
-DDEFINE_CXA_PURE_VIRTUAL -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -o 
mysql_tzinfo_to_sql mysql_tzinfo_to_sql.o -static 
-L/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib 
../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a 
../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a 
../strings/libmystrings.a -lz -lpthread -lposix4 -lcrypt -lgen -lsocket 
-lnsl -lm -lpthread

/usr/local/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status
gmake[4]: *** [mysql_tzinfo_to_sql] Error 1
gmake[4]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/scratch/hgs/mysql-4.1.13/sql'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/scratch/hgs/mysql-4.1.13'
gmake: *** [all] Error 2




neelix hgs 57 % ls /usr/lib/*pthread*
/usr/lib/libpthread.so /usr/lib/llib-lpthread
/usr/lib/libpthread.so.1 /usr/lib/llib-lpthread.ln
neelix hgs 58 %


Any suggestions as to how I get around this and get the whole thing
installed in /usr/local/mysql-4.1.13 ?

Thank you,
Hugh


Hi Hugh,

Do you have the pthread library path in the -L path somewhere? It doesn't


Yes, it is in $LD_LIBARY_PATH above.


seem to be able to find it.


Well, it does for some of the work, but not at the stage it fails.

You might like to use crle to put the paths in in 
a more permanent fashion


Possibly, but that only works for sun's ld, and GNU ld is being
found by configure.  AFAICS GNU ld doesn't make use of
$LD_LIBARY_PATH, hence the -L.


Regards
David


Thank you,
Hugh

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Failure to install on Solaris.

2005-09-20 Thread Hugh Sasse

On Tue, 20 Sep 2005, Pooly wrote:


Hi,



gmake: *** [all] Error 2
neelix hgs 57 % ls /usr/lib/*pthread*
/usr/lib/libpthread.so /usr/lib/llib-lpthread
/usr/lib/libpthread.so.1   /usr/lib/llib-lpthread.ln
neelix hgs 58 %


Any suggestions as to how I get around this and get the whole thing
installed in /usr/local/mysql-4.1.13 ?


Have you installed the development package for the pthread library ?


Not explicitly.  I have not explicitly installed pthread either.
These in /usr/lib must be supplied by Sun, I think.

Where do I get it (What's the package called, do I need a certain
version to go with 4.1.13, etc)?


I guess you're missing libpthread.a which is needed even for a dynamic


I don't know enough about pthread to know why I should need a .a
when I have a .so : they are both libraries

Why did it build the first time around, then?


linking, the linker can't do it's job here.

--
Pooly


Thank you,
Hugh

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Innodb dealing with blobs in 4.1: Error 139 from storage engine

2005-09-20 Thread Nico Sabbi

Hi,
with mysql 4.1[234], importing a dump of Innodb tables containing at 
least a blob field

I invariably get_

ERROR 1030 (HY000) at line 21027: Got error 139 from storage engine

I read in the bugzilla that this problem is due to low memory 
conditions, but
surely it's not my case: the server has 2 GB ram, and it doesn't have 
anything else

running than mysql.

I also tried to raise

set-variable = innodb_buffer_pool_size=120M
set-variable = innodb_additional_mem_pool_size=120M

but with no improvent.

The content of the err file is:

050920 11:46:31  mysqld started
050920 11:46:31  InnoDB: Started; log sequence number 0 18025704
/usr/sbin/mysqld-max: ready for connections.
Version: '4.1.14-Max'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  
MySQL Community Edition - Max (GPL)


Is there a way to fix this behaviour or should I revert to 4.0?

Thanks,

--
Nico Sabbi - Officine Digitali - Bologna
Tel. 051 - 4187565



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



user can post item while others cannot?

2005-09-20 Thread Joeffrey Betita
hello
  i installed mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz, i followed
the instruction on the INSTALL-BINARY file. after that i installed
httpd-2.0.54.tar.gz followed the instruction on the INSTALL file. also
installed php-5.0.4.tar.gz
followed the install intruction in the INSTALL file. CentOS release 4.0
(Final) is the linux distribution. some user when trying to post an item
cannot post an item. they are being redirected to the welcome page. once
they click the post item button. while other user can post an item
succesfully. i been looking at the apache access and error logs and
/var/log/messages no luck. what log files should i be looking for. did i
miss anything while installing on the ./configure [options] mysql, apache,
php etc. on our old server the version of apache-2.0.47, mysql-4.0.15a-log,
php-4.3.3 the OS is RH9 before our only problem is too many connections
error when they browse our website. is this a apache, MySQL, PHP etc.
problem. i just would like to know. any help would be appreciated. thank you
very much.


rgds,
Joeffrey
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.3/106 - Release Date: 9/19/2005


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Startup Error

2005-09-20 Thread Andy Eastham
Richard,

 

In my instructions, the chowns are as follows:

shell chown -R root  /usr/local/mysql/.

  shell chown -R mysql /usr/local/mysql/data

  shell chgrp -R mysql /usr/local/mysql/.

 

Note no slash after data. However, you have world read and write on the data
folder anyway

 

The mysql folder is a link into /root/mysql-max-4.1.14-pc-linux-gnu-i686

 

My guess is that the tomcat user can't create a file in /root/
mysql-max-4.1.14-pc-linux-gnu-i686/data

 

What do you get if you do:

ls -l /root/mysql-max-4.1.14-pc-linux-gnu-i686

 

Can tomcat write into this?

 

Andy

 

  _  

From: Johnson, Richard (NY Int) [mailto:[EMAIL PROTECTED] 
Sent: 20 September 2005 12:00
To: 'Andy Eastham'
Subject: RE: Startup Error

 

[EMAIL PROTECTED] mysql]# ls -l /usr/local/mysql 
lrwxrwxrwx1 root root   40 Sep 19 
09:00 /usr/local/mysql - 
/root/mysql-max-4.1.14-pc-linux-gnu-i686 

Richard Johnson 
212-589-6503 
[EMAIL PROTECTED] 

-Original Message- 
From: Andy Eastham [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 20, 2005 4:58 AM 
To: Johnson, Richard (NY Int) 
Subject: RE: Startup Error 

Richard, 

What output do you get from: 
ls -l /usr/local/mysql 

Andy 

 -Original Message- 
 From: Johnson, Richard (NY Int) [mailto:[EMAIL PROTECTED] 
 Sent: 19 September 2005 19:57 
 To: 'mysql@lists.mysql.com' 
 Subject: RE: Startup Error 
 
 Still getting the following errors after running the chown's below... 
 
 Here is what the ls -l result window shows... 
 
 mysql]# ls -l /usr/local/mysql/data 
 total 20536 
 -rw-rw1 mysqlmysql10485760 Sep 19 
 10:05 ibdata1 
 -rw-rw1 mysqlmysql 5242880 Sep 19 
 10:05 ib_logfile0 
 -rw-rw1 mysqlmysql 5242880 Sep 19 
 09:33 ib_logfile1 
 drwxr-x---2 mysqlmysql4096 Sep 19 
 09:30 mysql 
 
 The error log shows.. 
 
 050919 14:44:36  mysqld started 
 050919 14:44:36 [ERROR] bdb:  /usr/local/mysql/data: 
 Permission denied 
 050919 14:44:36 [ERROR] bdb: 
 /usr/local/mysql/data/log.01: Permission denied 
 050919 14:44:36 [ERROR] bdb:  PANIC: Permission denied 
 050919 14:44:36 [ERROR] bdb:  PANIC: DB_RUNRECOVERY: 
 Fatal error, run database recovery 
 050919 14:44:36 [ERROR] bdb:  fatal region error detected; run recovery 
 050919 14:44:36 [ERROR] bdb:  /usr/local/mysql/data: 
 Permission denied 
 050919 14:44:36  InnoDB: Started; log sequence number 0 43634 
 050919 14:44:36 [ERROR] Can't init databases 
 050919 14:44:36 [ERROR] Aborting 
 
 050919 14:44:36  InnoDB: Starting shutdown... 
 050919 14:44:38  InnoDB: Shutdown completed; log sequence number 0 43634 
 050919 14:44:38 [Note] /usr/local/mysql/bin/mysqld: 
 Shutdown complete 
 
 050919 14:44:38  mysqld ended 
 
 Richard Johnson 
 212-589-6503 
 [EMAIL PROTECTED] 
 
 -Original Message- 
 From: J.R. Bullington [mailto:[EMAIL PROTECTED] 
 Sent: Monday, September 19, 2005 11:49 AM 
 To: mysql@lists.mysql.com 
 Subject: RE: Startup Error 
 
 Well, as you can see in the first few lines, you have a Permission Denied 
 problem. 
 
 This means that your /data/ folder doesn't have the write permissions to 
 it 
 via the mysql user. 
 
 Try running the permission scripts again, but this time use the full shell

 names. 
 
 shell chown -R root /usr/local/mysql/. 
 shell chown -R mysql /usr/local/mysql/data/. 
 shell chgrp -R mysql /usr/local/mysql/. 
 
 Then check to make sure that user has write permission to the folders: 
 
 shell ls -l /usr/local/mysql/data 
 
 It should say something similar to: 
 
 shell ls -l /usr/local/mysql/data 
 total 63868 
 drwx--2mysqlmysqlsizedatedirname 
 -rw-rw1mysqlmysqlsizedatefilename- 
 bin.000 
 . 
 . 
 -rw-rw1mysqlmysqlsizedatehostname.err 
 
 
 
 J.R. 
 
 
   _ 
 
 From: Johnson, Richard (NY Int) [mailto:[EMAIL PROTECTED] 
 Sent: Monday, September 19, 2005 11:35 AM 
 To: 'J.R. Bullington' 
 Subject: RE: Startup Error 
 
 
 
 Here are the contents of the file 
 
 050919 09:33:52  mysqld started 
 050919  9:33:52 [ERROR] bdb:  /usr/local/mysql/data: Permission denied 
 050919  9:33:52 [ERROR] bdb:  /usr/local/mysql/data/log.01: 
 Permission denied 
 050919  9:33:52 [ERROR] bdb:  PANIC: Permission denied 
 050919  9:33:52 [ERROR] bdb:  PANIC: DB_RUNRECOVERY: Fatal error, run 
 database recovery 
 050919  9:33:52 [ERROR] bdb:  fatal region error detected; run recovery 
 050919  9:33:52 [ERROR] bdb:  /usr/local/mysql/data: Permission denied 
 InnoDB: The first specified data file ./ibdata1 did not exist: 
 InnoDB: a new database to be created! 
 050919  9:33:52  InnoDB: Setting file ./ibdata1 size to 10 MB 
 InnoDB: Database physically writes the file full: wait... 
 050919  9:33:53  InnoDB: Log file ./ib_logfile0 did not exist: new to be 
 created 
 InnoDB: Setting log file ./ib_logfile0 size to 5 MB 
 InnoDB: Database physically writes the file full: 

Re: Innodb dealing with blobs in 4.1: Error 139 from storage engine

2005-09-20 Thread Nico Sabbi

Nico Sabbi wrote:


Hi,
with mysql 4.1[234], importing a dump of Innodb tables containing at 
least a blob field

I invariably get_

ERROR 1030 (HY000) at line 21027: Got error 139 from storage engine

I read in the bugzilla that this problem is due to low memory 
conditions, but
surely it's not my case: the server has 2 GB ram, and it doesn't have 
anything else

running than mysql.

I also tried to raise

set-variable = innodb_buffer_pool_size=120M
set-variable = innodb_additional_mem_pool_size=120M

but with no improvent.

The content of the err file is:

050920 11:46:31  mysqld started
050920 11:46:31  InnoDB: Started; log sequence number 0 18025704
/usr/sbin/mysqld-max: ready for connections.
Version: '4.1.14-Max'  socket: '/var/lib/mysql/mysql.sock'  port: 
3306  MySQL Community Edition - Max (GPL)


Is there a way to fix this behaviour or should I revert to 4.0?

Thanks,



If it can help,  seems that the largest value I can store in a blob field
without triggering that error is 192 characters long.

--
Nico Sabbi - Officine Digitali - Bologna
Tel. 051 - 4187565



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



looking for direction on how to debug this message

2005-09-20 Thread Randy Paries
Hello, 
My log file is getting filled with these. How do i start debugging this? 
Thanks 
Randy 
//-snip-// 
050122 20:28:00 Aborted connection 53561 to db: 'unitnet' user: 'paries'
host: `local.flanders' (Got an error reading communication packets) 
050122 20:28:49 Aborted connection 53612 to db: 'unitnet' user: 'paries'
host: `local.krusty' (Got an error reading communication packets) 
050122 20:29:20 Aborted connection 53671 to db: 'unitnet' user: 'paries'
host: `local.flanders' (Got an error reading communication packets) 
050122 20:32:14 Aborted connection 53910 to db: 'unitnet' user: 'paries'
host: `local.flanders' (Got an error reading communication packets) 
050122 20:34:47 Aborted connection 54111 to db: 'unitnet' user: 'paries'
host: `local.flanders' (Got an error reading communication packets) 
050122 20:34:48 Aborted connection 54116 to db: 'unitnet' user: 'paries'
host: `local.flanders' (Got an error reading communication packets) 
050122 20:35:11 Aborted connection 54142 to db: 'unitnet' user: 'paries'
host: `local.krusty' (Got an error reading communication packets) 
050122 20:38:45 Aborted connection 54468 to db: 'unitnet' user: 'paries'
host: `local.flanders' (Got an error reading communication packets) 
050122 20:39:46 Aborted connection 54572 to db: 'unitnet' user: 'paries'
host: `local.krusty' (Got an error reading communication packets) 
050122 20:40:54 Aborted connection 54584 to db: 'unitnet' user: 'paries'
host: `local.flanders' (Got an error reading communication packets) 
050122 20:42:09 Aborted connection 54794 to db: 'unitnet' user: 'paries'
host: `local.krusty' (Got an error reading communication packets) 
050122 20:43:33 Aborted connection 54936 to db: 'unitnet' user: 'paries'
host: `local.krusty' (Got an error reading communication packets) 
050122 20:44:40 Aborted connection 55004 to db: 'unitnet' user: 'paries'
host: `local.krusty' (Got an error reading communication packets)


Re: Yet another null question

2005-09-20 Thread Joerg Bruehe

Hi!


Just some explicit addition:

[EMAIL PROTECTED] wrote:

[[...]]

So in the following query:

 select * from new_payments where closed1;

it is desired that null=1. DeMorgan's law takes a vacation here.


You use two-valued logic here, where statements are either true or 
false. (DeMorgan's law applies to two-valued logic only.)


When NULL values are not excluded, SQL uses a three-valued logic, where 
a stament may also be unknown. Comparing NULL to any value (including 
a comparison of NULL and NULL) always results in unknown.


This also the reason that the SQL syntax does not allow
   ... WHERE value = NULL
but requires that you write
   ... WHERE value IS NULL
It has also been said that NULL is no value but a state - maybe that 
helps in understanding.



HTH,
Jörg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



questiions for data type and limits of MySQL

2005-09-20 Thread xiaobo
Hi, all

I have 2 questions:

1) Is there any limit on the number of tables I can create in MySQL and
how large I can hold in a database?

2) Does MYSQL support to save binary data file in the table. I can't just
save paths to the files. They files reside in another machine.

Thanks for reply.

X.Chen


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



The best way to configure innodb tablespace

2005-09-20 Thread Yariv Graf

Hi
I'm running MySQL 4.0.25 on a Linux machine dual xeon 3.0GB Ghz(32 bit) 
with 6 GB RAM

the data is connected to a SAN storage
I wander what is the best tablespace configuration (except RAW) of 
configuraing?

my configuration is as follows:
innodb_data_file_path=ibdata1:10G;ibdata2:10G;ibdata3:10G;ibdata4:10G;ibdata5:10G;ibdata6:10G
innodb_buffer_pool_size=2G
innodb_log_file_size=500M (*3 files)
innodb_log_buffer_size=8M

the data within the tablespaces is approx. 42GB so far
this server is quite load ..
my question is : is it better to create 1 chunck of 60GB or is there 
better configuration of tablespaces?


Thanks in advance

Yariv

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: user can post item while others cannot?

2005-09-20 Thread Edwin Cruz
If some users can add data, then I think that is problem that the clients,
you should check headers response in your php.ini, the flag charset-type
should have a value that your clients support. I've had that king of
problems, when I use header() function in php.

:: ISC Edwin Cruz Garcia ::
IT Factory Systems - Systems Department
Texas Instruments Mexico
52+(449) 9105194 Direct Line

-Original Message-
From: Joeffrey Betita [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 20, 2005 5:57 AM
To: mysql@lists.mysql.com
Subject: user can post item while others cannot?

hello
  i installed mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz, i followed
the instruction on the INSTALL-BINARY file. after that i installed
httpd-2.0.54.tar.gz followed the instruction on the INSTALL file. also
installed php-5.0.4.tar.gz
followed the install intruction in the INSTALL file. CentOS release 4.0
(Final) is the linux distribution. some user when trying to post an item
cannot post an item. they are being redirected to the welcome page. once
they click the post item button. while other user can post an item
succesfully. i been looking at the apache access and error logs and
/var/log/messages no luck. what log files should i be looking for. did i
miss anything while installing on the ./configure [options] mysql, apache,
php etc. on our old server the version of apache-2.0.47, mysql-4.0.15a-log,
php-4.3.3 the OS is RH9 before our only problem is too many connections
error when they browse our website. is this a apache, MySQL, PHP etc.
problem. i just would like to know. any help would be appreciated. thank you
very much.


rgds,
Joeffrey
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.3/106 - Release Date: 9/19/2005


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Failure to install on Solaris.

2005-09-20 Thread Hugh Sasse

On Tue, 20 Sep 2005, Hugh Sasse wrote:


On Tue, 20 Sep 2005, Pooly wrote:


Hi,



gmake: *** [all] Error 2
neelix hgs 57 % ls /usr/lib/*pthread*
/usr/lib/libpthread.so /usr/lib/llib-lpthread
/usr/lib/libpthread.so.1   /usr/lib/llib-lpthread.ln
neelix hgs 58 %


[...]

I guess you're missing libpthread.a which is needed even for a dynamic


I don't know enough about pthread to know why I should need a .a
when I have a .so : they are both libraries

Why did it build the first time around, then?


And I get, adding -t to LDFLAGS,

configure:25912: checking named thread libs:
configure:25919: result: -lpthread
configure:26155: checking for strtok_r in -lpthread
configure:26185: gcc -o conftest -O3 
-L/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib
 -t   -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T  
-L/progs/SUNWspro/lib:/usr/local/lib:/usr/local/lib/sparcv9:/usr/lib:/usr/share/lib:/usr/dt/lib:/usr/openwin/lib:/opt/panorama/lib:/opt/sfw/lib
  conftest.c -lpthread  -lpthread -lposix4 -lcrypt -lgen -lsocket -lnsl -lm  -lpthread 
5
/usr/local/bin/ld: mode elf32_sparc
/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.3/crt1.o
/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.3/crti.o
/usr/ccs/lib/values-Xa.o
/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.3/crtbegin.o
/var/tmp//ccGJWR1E.o
-lpthread (/usr/lib/libpthread.so)
-lpthread (/usr/lib/libpthread.so)
-lposix4 (/usr/lib/libposix4.so)
-lcrypt (/usr/lib/libcrypt.so)
-lgen (/usr/ccs/lib/libgen.so)
-lsocket (/usr/lib/libsocket.so)
-lnsl (/usr/lib/libnsl.so)
-lm (/usr/lib/libm.so)
-lpthread (/usr/lib/libpthread.so)
-lc (/usr/lib/libc.so)
-lc (/usr/lib/libc.so)
/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.3/crtend.o
/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.3/crtn.o
configure:26191: $? = 0
configure:26195: test -z
 || test ! -s conftest.err
configure:26198: $? = 0
configure:26201: test -s conftest
configure:26204: $? = 0
configure:26217: result: yes

in configure.log.



linking, the linker can't do it's job here.

--
Pooly


Hugh





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: questiions for data type and limits of MySQL

2005-09-20 Thread Brent Baisley
MySQL is generally limited by the OS you are running it on. If you  
start having thousands of table, the OS is probably going to get  
bogged down in trying to keep track of all the file handles needed  
for all those tables and indexes. The practical limit to the number  
of tables is far lower than the theoretical maximum. So I wouldn't  
design your database with unlimited tables in mind.
A database can hold multiple terabytes of data, but again you would  
run into limits of the OS, like maximum file size. Using InnoDB you  
would be able to split the tables into multiple files to work around  
OS limits on the maximum file size. But again, there are only so many  
files an OS can keep open and manage before you run into performance  
problems. Keep in mind that you don't have to keep everything on one  
machine.


Yes, you can store binary data in MySQL.

On Sep 20, 2005, at 9:23 AM, [EMAIL PROTECTED] wrote:


Hi, all

I have 2 questions:

1) Is there any limit on the number of tables I can create in MySQL  
and

how large I can hold in a database?

2) Does MYSQL support to save binary data file in the table. I  
can't just

save paths to the files. They files reside in another machine.

Thanks for reply.

X.Chen



--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Innodb dealing with blobs in 4.1: Error 139 from storage engine

2005-09-20 Thread Nico Sabbi

sorry for this monologue-thread, but...

Nico Sabbi wrote:

[snip]


If it can help,  seems that the largest value I can store in a blob field
without triggering that error is 192 characters long.



I just read the restrictions on Innodb tables, and I'm not convinced
that what is going on is expected.
Quoting from here http://dev.mysql.com/doc/mysql/en/innodb-restrictions.html

#

The maximum row length, except for |VARCHAR|, |BLOB| and |TEXT| columns, 
is slightly less than half of a database page. That is, the maximum row 
length is about 8000 bytes. |LONGBLOB| and |LONGTEXT| columns must be 
less than 4GB, and the total row length, including also |BLOB| and 
|TEXT| columns, must be less than 4GB. |InnoDB| stores the first 768 
bytes of a |VARCHAR|, |BLOB|, or |TEXT| column in the row, and the rest 
into separate pages.


#


that clearly states that varchar(255) fields should be excluded from the 
restrictions, shouldn't they?
Yet, my tables is made of 104 varchar(255) fields (I know it's bad, but 
unfortunately
it's a structure I can't change), a dozen blobs and 8 other fields (date 
and int),

so it seems that Innodb _is_ including varchar() fields in the restriction.

If needed I can provide the whole table structure.


BTW, why introducing a restriction that wasn't present in 4.0 ?

Thanks,
  
   Nico




--
Nico Sabbi - Officine Digitali - Bologna
Tel. 051 - 4187565



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



extract string in longblob column

2005-09-20 Thread liofr

Hi
how can i retrieve string value contains in a longblob column ?
i test CAST and CONVERT mysql function but don't work.
Doesn't seem hard but don't see howto do that
select  * FROM table

Thank's for any help



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: database link

2005-09-20 Thread Ananda Kumar
Hi Mark,
First set up an ODBC data source for your MySQL database, using MyODBC.
 How do i do this.
 regards
anandkl
 On 9/19/05, Ananda Kumar [EMAIL PROTECTED] wrote: 
 
 Hi Mark,
 Thanks for the email. Yes i also read about this.
 But the problem with this approach is since our oracle db is a production 
 database which runs 24*78 and during night time it runs lot of other jobs i 
 cannot make the reporting job run from this oracle database. 
  regards
 anandkl
 
  On 9/16/05, Mark Leith [EMAIL PROTECTED] wrote:  
  
  You may want to think about doing this the opposite way around also, and
  look at pushing the data from Oracle in to MySQL. Oracle has something 
  called heterogeneous services, which allows you to define ODBC 
  datasources
  as valid entries in the tnsnames.ora file. Then you could simply create 
  a
  job in Oracle that executes a procedure to do the entire process 
  (truncate / 
  load), no external scripting necessary..
  
  Here's a quick example of what to do:
  
  First set up an ODBC data source for your MySQL database, using MyODBC.
  
  Create a file in ORACLE_HOME/hs/admin called initMySQL.ora. In this file 
  put
  the following options:
  
  HS_FDS_CONNECT_INFO = MySQL5 #ODBC DSN /* Replace MySQL5 with your DSN 
  */
  HS_FDS_TRACE_LEVEL = OFF
  
  Alter your listener.ora file (ORACLE_HOME/network/admin) to add the 
  following:
  
  (SID_DESC =
  (PROGRAM = hsodbc)
  (ORACLE_HOME = oracle/product/92) /* Your ORACLE_HOME */
  (SID_NAME = MySQL5) /* Your DSN */
  )
  
  Add the following to your tnsnames.ora file:
  
  MYSQL5 =
  (DESCRIPTION=
  (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
  (CONNECT_DATA=(SID=MYSQL5))
  (HS=OK)
  )
  
  Reload your Oracle listener (lsnrctl reload), and then connect to the 
  Oracle 
  database. To set the database link up:
  
  CREATE DATABASE LINK mysql5 CONNECT TO user identified by password 
  using
  'mysql5';
  
  User and password should be a valid user within MySQL, that can connect 
  from 
  the Oracle host. You should be set to go from there. Here's a quick 
  example
  of this working, to a MySQL 5 database using the new sakila sample
  database that Mike Hillyer recently released
  ( http://www.openwin.org/mike/download/sakila.zip):
  
  SQL select count(*) from [EMAIL PROTECTED];
  
  COUNT(*)
  --
  1000
  
  SQL desc [EMAIL PROTECTED];
  Name Null? Type 
  - 
  
  film_id NUMBER(10)
  category_id NOT NULL NUMBER(10)
  title NOT NULL VARCHAR2(27) 
  description LONG
  rental_duration NOT NULL NUMBER(3)
  length NUMBER(10)
  rating CHAR(5) 
  
  SQL insert into [EMAIL PROTECTED] values 
  (100,1,'test','test',1,1,'PG');
  
  1 row created.
  
  ---change prompts---
  
  mysql use sakila
  Database changed
  mysql select max(film_id) from film; 
  +--+
  | max(film_id) |
  +--+
  | 100 |
  +--+
  1 row in set (0.01 sec)
  
  HTH
  
  Mark Leith
  
  --
  No virus found in this outgoing message.
  Checked by AVG Anti-Virus. 
  Version: 7.0.344 / Virus Database: 267.11.0/103 - Release Date: 
  15/09/2005
  
  
  
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
  
  



Re: Failure to install on Solaris.

2005-09-20 Thread Dan Nelson
In the last episode (Sep 20), Hugh Sasse said:
 This got as far as the test phase, and tested successfully.  I did it
 this way because of the solaris settings being collected together. 
 However, when I installed, parts of the installation overwrote
 /usr/local/mysql despite my --prefix.  I already have a mysql setup
 there that I didn't want disturbed.
 
 So I started again and built using this script:
 #!/bin/bash
 CFLAGS=-O3 -L$LD_LIBRARY_PATH CXX=gcc MAKE=gmake \
  CXXFLAGS=-O3 -L$LD_LIBRARY_PATH -felide-constructors -fno-exceptions 
  -fno-rtti ./configure \
  --prefix=/usr/local/mysql --enable-assembler \
  --enable-thread-safe-client \
  --with-mysqld-ldflags=-all-static --with-tcp-port=3308 \
  --with-unix-socket-path=/tmp/mysql4.sock \
  --with-pthread --with-gnu-ld  \
  gmake  \
  cd mysql-test  ./mysql-test-run --force
  exit

Get rid of the --with-mysqld-ldflags=-all-static flag; Solaris 9
doesn't provide a static pthread, and in Solaris 10, you can't build
static binaries at all:

http://partneradvantage.sun.com/protected/solaris10/adoptionkit/tech/proc.html
http://blogs.sun.com/roller/page/rie/?anchor=static_linking_where_did_it

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql_free_result() 2 different connections

2005-09-20 Thread Miguel Cardenas
  I have 2 different result sets, since are two different connections to
  the server, simultaneous but independent (two handles, two connections,
  two different queries)

 what is the code you're using ?

in a very small representation the program is this

*** dbmail and dbmail2 open 2 different connections, one accesses 
DBM_ADDRESSES table and the other accesses DBM_NAMES table. The first one 
retrieves addresses from the table DBM_ADDRESSES, the second one a relationed 
names to the addresses from DBM_NAMES. Not all addresses have name set, so 
for questions of space I separated into tables, just 10% of addresses have a 
name and it would be waste of space having that column in the same table 
(90%+ of over 50,000 rows), so I created a new table for the names and linked 
them to a corresponding address via an 'id'

DBM_ADDRESSES
id, address, ...

DBM_NAMES
id,name

1. connect dbmail and dbmail2 to server
2. dbmail.query:   SELECT id,address from DBM_ADDRESSES WHERE ...
sp_id = atoll(record[0]); // stores the id in 'sp_id'
3. while ( dbmail retrieves rows from query at step 2 ) {
   dbmail2.query:
   3.1 SELECT name FROM DBM_NAMES WHERE id=sp_id(from step 2)
   3.2 if ( name exists for id=sp_id )
   do something with DBM_ADDRESSES.address,DBM_NAMES.name
else
   do something with DBM_ADDRESSES.address
   3.3 free results from dbmail2.query (inside while)
   }
4. free results from dbmail.query (1st query before while) ***CRASH***
5. disconnect dbmail and dbmail2 connections

The crash is in step #4 after  all data is retrieved successfully, but why? 
every loop in the while is performed a query/free without problems, but the 
most external unique query does not accept mysql_free_result(), even when 
they are two different connections to the server.

I've just tested with a single query program (one connection with one query) 
and it crashed too when I mysql_free_result() ***called only once*** after 
retrieving all rows:

1. query: SELECT ...
2. while ( fetch rows ) { use the results }
3. mysql_free_result()

it crashes too, this model is very (really very simple) and does not leave 
space for errors in code and still fails on the free function...

I've asked on a linux list and somebody told me just to avoid using 
mysql_free_result() if the program works that way ('cos the results maybe are 
being already free by the library), but I don't think it is a solution, I 
want to know what happens, if really the set is free automatically by the C 
API functions after reading it or not, and if so, why the documentation tells 
that it is a *must* call the free function after the whole set of rows is 
retrieved...

Thanks for your comments


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



connect from oracle to MYSQL.

2005-09-20 Thread Ananda Kumar
Hi All,
Can you please help me in connecting from oracle database to mysql database.
I am trying to setup the hetrogenious service provided by oracle, but i am 
not able to complete all the steps. 
 I am failing at this step
 *cp MyODBC-3.51.06-sun-solaris2.8-sparc/libmyodbc3* lib*
# *mv etc/odbc.ini etc/odbc.ini.backup*
# *cp MyODBC-3.51.06-sun-solaris2.8-sparc/odbc.ini etc*
# *cd lib*
# *rm libmyodbc3.so libmyodbc3_r.so*
# *ln -s libmyodbc3-3.51.06.so http://libmyodbc3-3.51.06.so libmyodbc3.so*
# *ln -s libmyodbc3_r-3.51.06.so http://3.51.06.so libmyodbc3_r.so*
** 
*I am not seeing libmyodbc files in
MyODBC-3.51.06-sun-solaris2.8-sparcdirectory. I am seeing only this
files
*
MyODBC-3.51.10-sun-solaris2.8-sparc.pkg
README.
 I am using solaris2.8 for oracle database and mysql 4.1 on linux fedaro.
 regards
anandkl


Can't connect to mysql server from another windows box

2005-09-20 Thread Gerald Williams
MySQL 5.0.12, P2P Microsoft network

I cannot get the manual's instructions (24.1.9.6) to work for connecting from a 
mysql client on a windows machine to a mysql server running on another windows 
machine (xp and w2kpro repsectively)

The client machine can ping the server machine by name or IP address.
One each machine, a local client successfully connects to the local mysql 
server as localhost.
In mysql server on the w2k box, a client row in mysql.user has been created 
with:
   user=the exact value used in the ODBC Admin dialog
   password=the exact value used in the ODBC Admin dialog
   Host=name of the machine being used as a client 
'skip-networking' is not set on either machine.

But when ODBCAdmin (3.51) is used to create a DSN on the winxp machine for 
connecting to the mysql server on the w2k machine, clicking 'Test Data Source' 
yields this error:

   Host 'XPBOX' is not allowed to connect to this MySQL server'.

(Oddly, the mysql server capitalizes the name of the winxp box. Why does it do 
that?)

Issuing the command
   telnet w2kbox 3306
on the xpbox also produced this same error message.

This ought to be simple. What's the secret?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Yet another null question

2005-09-20 Thread doug
First - thank you. I want to again thank this list, which in general is the most
tolerant to people new to database use and theory in general, and me in
particular. I mostly got your point from an earlier answer. Hopeful your example
quashes my ignorance, relative to NULL at least.

I think I understand the manual examples with the help of the answers I got. I
was not getting it on my own.

On Tue, 20 Sep 2005, Joerg Bruehe wrote:

 Hi!


 Just some explicit addition:

 [EMAIL PROTECTED] wrote:
  [[...]]
 
  So in the following query:
 
   select * from new_payments where closed1;
 
  it is desired that null=1. DeMorgan's law takes a vacation here.

 You use two-valued logic here, where statements are either true or
 false. (DeMorgan's law applies to two-valued logic only.)

 When NULL values are not excluded, SQL uses a three-valued logic, where
 a stament may also be unknown. Comparing NULL to any value (including
 a comparison of NULL and NULL) always results in unknown.

 This also the reason that the SQL syntax does not allow
 ... WHERE value = NULL
 but requires that you write
 ... WHERE value IS NULL
 It has also been said that NULL is no value but a state - maybe that
 helps in understanding.


 HTH,
 Jörg

 --
 Joerg Bruehe, Senior Production Engineer
 MySQL AB, www.mysql.com


_
Douglas Denault
http://www.safeport.com
[EMAIL PROTECTED]
Voice: 301-469-8766
  Fax: 301-469-0601

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to mysql server from another windows box

2005-09-20 Thread SGreen
Gerald Williams [EMAIL PROTECTED] wrote on 09/20/2005 10:49:22 AM:

 MySQL 5.0.12, P2P Microsoft network
 
 I cannot get the manual's instructions (24.1.9.6) to work for 
 connecting from a mysql client on a windows machine to a mysql 
 server running on another windows machine (xp and w2kpro repsectively)
 
 The client machine can ping the server machine by name or IP address.
 One each machine, a local client successfully connects to the local 
 mysql server as localhost.
 In mysql server on the w2k box, a client row in mysql.user has been 
 created with:
user=the exact value used in the ODBC Admin dialog
password=the exact value used in the ODBC Admin dialog
Host=name of the machine being used as a client 
 'skip-networking' is not set on either machine.
 
 But when ODBCAdmin (3.51) is used to create a DSN on the winxp 
 machine for connecting to the mysql server on the w2k machine, 
 clicking 'Test Data Source' yields this error:
 
Host 'XPBOX' is not allowed to connect to this MySQL server'.
 
 (Oddly, the mysql server capitalizes the name of the winxp box. Why 
 does it do that?)
 
 Issuing the command
telnet w2kbox 3306
 on the xpbox also produced this same error message.
 
 This ought to be simple. What's the secret?
 

From your description, the mostly likely problem is that the password 
field of the user table is NOT a hashed password value. The authentication 
attempt would fail because the database is trying to compare a hashed 
password (coming from your ODBC driver) to a non-hashed value.  Use the 
PASSWORD() function to hash a plain-text password for the user so that it 
will match the authentication attempt from the driver

update mysql.user set password = PASSWORD(`password`) WHERE user = 
'odbclogin';

http://dev.mysql.com/doc/mysql/en/encryption-functions.html

A second reason could be because the MySQL ODBC driver is acting as a 
PRE-4.1 client (it is using the shorter password hashes that existed 
before v4.1). 

update mysql.user set password = OLD_PASSWORD('plaintext_of_password') 
WHERE user = 'odbclogin';

http://dev.mysql.com/doc/mysql/en/old-client.html


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine






MySQL equivilent to Oracle Names Server?

2005-09-20 Thread Sid Lane
all,

does anyone know of any GPL'd equivilent to an Oracle Name Server 
(essentially DNS for SQL*Net)?

I am considering writing such a thing but wanted to see if someone had 
already invented this particular wheel.

essentially I envision a server (probably redundant pair) to which 
application servers (tomcat, apache, PERL scripts, etc.) would make requests 
that looked something like:

[tomcat1, fcgi2, etc.] needs a [production, development, QC, etc.] 
connection to a(n) [MySQL, Oracle, DB/2] [ERP, CRM, inventory, etc.] 
database

to which the server would respond (probably in XML):

connect to port [3306, 1521, etc.] on [mydb00, ordb01, etc.] as [username] 
identified by [password] (or other non-user/pw authentication info)

the server would determine which of N nodes in a given state/rdbms/service 
pool based on health, load on each node, response, etc. (basically same as 
you'd do w/HTTP VIPs).

I envision a small PERL client that would be a function call that connects 
to the server which would return the required authentication information.

one of the main goals would be for it to be cross-rdbms and 
cross-application.

does anyone know if such an animal currently exists somewhere?

thanks!


Re: Can't connect to mysql server from another windows box

2005-09-20 Thread Michael Stassen

[EMAIL PROTECTED] wrote:

Gerald Williams [EMAIL PROTECTED] wrote on 09/20/2005 10:49:22 AM:



MySQL 5.0.12, P2P Microsoft network

I cannot get the manual's instructions (24.1.9.6) to work for 
connecting from a mysql client on a windows machine to a mysql 
server running on another windows machine (xp and w2kpro repsectively)


The client machine can ping the server machine by name or IP address.
One each machine, a local client successfully connects to the local 
mysql server as localhost.
In mysql server on the w2k box, a client row in mysql.user has been 
created with:

  user=the exact value used in the ODBC Admin dialog
  password=the exact value used in the ODBC Admin dialog
  Host=name of the machine being used as a client 
'skip-networking' is not set on either machine.


But when ODBCAdmin (3.51) is used to create a DSN on the winxp 
machine for connecting to the mysql server on the w2k machine, 
clicking 'Test Data Source' yields this error:


  Host 'XPBOX' is not allowed to connect to this MySQL server'.

(Oddly, the mysql server capitalizes the name of the winxp box. Why 
does it do that?)


Issuing the command
  telnet w2kbox 3306
on the xpbox also produced this same error message.

This ought to be simple. What's the secret?


From your description, the mostly likely problem is that the password 
field of the user table is NOT a hashed password value. The authentication 
attempt would fail because the database is trying to compare a hashed 
password (coming from your ODBC driver) to a non-hashed value.  Use the 
PASSWORD() function to hash a plain-text password for the user so that it 
will match the authentication attempt from the driver


update mysql.user set password = PASSWORD(`password`) WHERE user = 
'odbclogin';


http://dev.mysql.com/doc/mysql/en/encryption-functions.html

A second reason could be because the MySQL ODBC driver is acting as a 
PRE-4.1 client (it is using the shorter password hashes that existed 
before v4.1). 

update mysql.user set password = OLD_PASSWORD('plaintext_of_password') 
WHERE user = 'odbclogin';


http://dev.mysql.com/doc/mysql/en/old-client.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Note that if you set the password by directly editing (UPDATE) the 
mysql.user table like this, you will have to run


  FLUSH PRIVILEGES;

afterward to make the change take effect.

Alternatively, you can set the password with

  SET PASSWORD FOR 'odbclogin'@'xpbox' = PASSWORD('odbc_pass');

or

  SET PASSWORD FOR 'odbclogin'@'xpbox' = OLD_PASSWORD('odbc_pass');

or even

  GRANT USAGE ON *.* TO 'odbclogin'xpbox'%' IDENTIFIED BY 'odbc_pass';

FLUSH PRIVILEGES is not necessary sfter any of these.  See the manual for 
the details http://dev.mysql.com/doc/mysql/en/passwords.html.


Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to mysql server from another windows box

2005-09-20 Thread Gerald Williams
Note that if you set the password by directly editing (UPDATE) the 
mysql.user table like this, you will have to run

   FLUSH PRIVILEGES;

Thank you. That solved the problem connecting from the mysql client.

It changed the problem connecting via the 'Test' button from the ODBC 
Administrator, to an 'authentication protocol' message. Apparently 
Connector/ODBC 3.51 uses the old protocol.

Gerald Williams 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql_free_result() 2 different connections

2005-09-20 Thread Pooly
Hallo,

 
 in a very small representation the program is this
 
 *** dbmail and dbmail2 open 2 different connections, one accesses
 DBM_ADDRESSES table and the other accesses DBM_NAMES table. The first one
 retrieves addresses from the table DBM_ADDRESSES, the second one a relationed
 names to the addresses from DBM_NAMES. Not all addresses have name set, so
 for questions of space I separated into tables, just 10% of addresses have a
 name and it would be waste of space having that column in the same table
 (90%+ of over 50,000 rows), so I created a new table for the names and linked
 them to a corresponding address via an 'id'

Are your two tables in the same database ?
If yes only one connection if enough, and you could use a join query
to do it, thus having a speed improvement of several magnitudes.

 
 1. connect dbmail and dbmail2 to server
 2. dbmail.query:   SELECT id,address from DBM_ADDRESSES WHERE ...
 sp_id = atoll(record[0]); // stores the id in 'sp_id'
 3. while ( dbmail retrieves rows from query at step 2 ) {
dbmail2.query:
3.1 SELECT name FROM DBM_NAMES WHERE id=sp_id(from step 2)
3.2 if ( name exists for id=sp_id )
do something with DBM_ADDRESSES.address,DBM_NAMES.name
 else
do something with DBM_ADDRESSES.address
3.3 free results from dbmail2.query (inside while)
}
 4. free results from dbmail.query (1st query before while) ***CRASH***
 5. disconnect dbmail and dbmail2 connections
 
 The crash is in step #4 after  all data is retrieved successfully, but why?

Have you checked that you free the correct result ? set it to NULL
after used, and add a test for nullity, it may help.
What version of the API are you using ? which OS ?
Have you check bugs.mysql.com ?

 1. query: SELECT ...
 2. while ( fetch rows ) { use the results }
 3. mysql_free_result()
 
 it crashes too, this model is very (really very simple) and does not leave
 space for errors in code and still fails on the free function...
 

pseudo-code won't crash as far as I can tell :-)

 I've asked on a linux list and somebody told me just to avoid using
 mysql_free_result() if the program works that way ('cos the results maybe are
 being already free by the library), but I don't think it is a solution, I
 want to know what happens, if really the set is free automatically by the C
 API functions after reading it or not, and if so, why the documentation tells
 that it is a *must* call the free function after the whole set of rows is
 retrieved...
 

That would leave a nice memory leak indeed...
eventually, recompile and set a break-point before calling mysql_free,
and look at all variables.

-- 
Pooly
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to mysql server from another windows box

2005-09-20 Thread Gerald Williams
it sounds like you need to look at, and potentially cleanup (or make
your mysql access entries match) what's in the inverse-map record for
the IPnumbers of your machines.

when you connect mysql takes the IPnumber on the inbound connection,
looks it up in DNS and then checks the result against the access
table(s). so, if you've put xpbox.domain.xxx in the access table but
the lookup on the inbound IPnumber only returns xpbox (which is
technically an invalid entry anyway) things will fail.

so, do lookups on the IPnumbers of the client machines and see what's
returned. that's what you want in the mysql access tables.

Flushing privileges permitted a connection from the mysql client. To get the 
ODBC
Admin 'Test Data Source' button to work, I had to create a user table entry 
with a
password hashed by Old_Password(). 

Is ipconfig /all what you mean by lookup on the IPnumbers? That gives the name 
of the client box without domain.xxx. In any event, the 'technically incorrect' 
name
did work, and adding the domain.xxx part of the name to the user record did not 
work.

Gerald Williams

Host=name of the machine being used as a client 
 'skip-networking' is not set on either machine.
 
 But when ODBCAdmin (3.51) is used to create a DSN on the winxp machine
 for connecting to the mysql server on the w2k machine, clicking 'Test
 Data Source' yields this error:
 
Host 'XPBOX' is not allowed to connect to this MySQL server'.
 
 (Oddly, the mysql server capitalizes the name of the winxp box. Why
 does it do that?)
 
 Issuing the command
telnet w2kbox 3306
 on the xpbox also produced this same error message.
 
 This ought to be simple. What's the secret?
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]

-- End Original Message --



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: uninstall mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz

2005-09-20 Thread Kishore Jalleda
Download mysql-4.1.4.tar.gz
extract the contents into /usr/local/mysql-4.1.14
now delete the data dir 
stop the mysql server running (4.1.13) 
copy the whole data dir from the old version 4.1.13 ( use cp -pR to preserve 
perms) to the new one 
create a symbolic link like ln -s /usr/local/mysql-4.1.14. mysql 
start mysqld /usr/local/mysql/bin/mysqld_safe  
thats it you have version 4.1.14 running you can keep the old directory or 
delete it 
 Kishore Jalleda 
  

 On 9/18/05, Joeffrey Betita [EMAIL PROTECTED] wrote: 
 
 hi
 how can i uninstall mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz i would
 like to install mysql-4.1.14.tar.gz
 thank you very much.
 
 
 rgds,
 Joeffrey
 
 --
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.344 / Virus Database: 267.11.1/104 - Release Date: 9/16/2005
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
 



Re: SQL to use left join and find missing values

2005-09-20 Thread Brent Baisley
If you want to join a table more than once, you need to refer to it  
AS something else.


select sum(PlaceNo)
from boxes
inner join car using (boxID)
inner join load using (TravelID)
left outer join load AS Load2 on car.BoxNo=Load2.BoxNo
Where load.TravelID=1 AND Load2.BoxNo is null


On Sep 20, 2005, at 2:40 AM, RAPPAZ Francois wrote:


Hi all
with Mysql 3.23 I would like to find missing values in the  
following situation:


1) table boxes: describes kind of boxes differing by how many items  
I can put in.


Primary key is BoxID

boxID +  Places
A +   1
B +   3
C +   5

2) table car describes how I can put some boxes on a car for a journey

Primary Key is composed of TravelID, BoxNo
BoxNo is auto_increment, and start at 1 for each new travel

TravelID + BoxID + BoxNo
   1 +   A   +  1
   1 +   A   +  2
   1 +   B   +  3
   2   +   A   +  1
   2 +   B   +  2
   2 +   C   +  3


3) table load describes how items can be placed in the boxes once a  
car has been monted with boxes


Primary Key is composed of TravelID, BoxNo, PlaceNo
PlaceNo is auto_increment, and start at 1 for each new Box beeing  
load (it's just here to make a primary key)


TravelID + BoxNo + PlaceNo + ItemName
1+   1   +   1 +   itemName1
2+   2   +   1 +   itemName2
2+   2   +   2 +   itemName3


I want to make a query to get how much free places there is for a  
given travel (ie how much places have been prepared in table car  
that are not occupied in table load)


I would like to get this kind of query working

select sum(PlaceNo)
from boxes
inner join car using (boxID)
inner join load using (TravelID)
left outer join load on car.BoxNo=load.BoxNo
Where load.TravelID=1 AND load.BoxNo is null

but this query does not work because I have a duplicate table name  
(load).
Left join would be possible if BoxNo was unique for the whole table  
load, but is there a way to use left join here ?


This query works when there is one record in load for a given travel

select sum(PlaceNo)
from boxes
inner join car using (boxID)
where car.TravelID=1 AND car.BoxNo not in (select BoxNo
from load
where load.TravelID=1)

but when the subquery return null, the main query return null to  
when it should return the total of free places...

How could I correct this ?

Thanks in advance

François

François Rappaz

Centre de documentation de la Faculté des Sciences
Université de Fribourg
DokPe - Dokumentationszentrum der Naturwissenschaftlichen Fakultät  
Universität

Freiburg
Pérolles CH-1700 Fribourg Switzerland
http://www.unifr.ch/dokpe/
Tel.: 41 (0)26 300 92 60
Fax.: 41 (0)26 300 97 30

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql? 
[EMAIL PROTECTED]






--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



UUID storage (again)

2005-09-20 Thread sean c peters
The other day i asked about the proper column to store UUID's in. After 
thinking about it some more, i still think that a BINARY(16) is a better way 
to store a UUID. I'd need to strip the dashes from the formatting, but the 
storage would only be half as much (slightly less actually) as the suggested 
VARCHAR(36). The index lookups seem like they'd be faster too.

Am i offbase?

Also, in talking to a friend that uses that other database from redmond, i 
discovered that they have build in GUID (same as UUID from what i can 
discern) columns that are optimized for that kind of data. As it seems that 
UUID's are becoming the preferred internal ids, are there any plans for UUID 
column optimizations in MySQL?

-- 
Sean Peters
Senior Programmer, WIREData Inc.
[EMAIL PROTECTED]

The software required Windows 2000 or better, so i Downloaded Linux


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Circular Replication

2005-09-20 Thread Jeff
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Monday, September 19, 2005 10:10
 To: [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Subject: Re: Circular Replication
 
 
 Sid Lane [EMAIL PROTECTED] wrote on 19/09/2005 15:02:58:
 
  stupid ?:
  
  what keeps them from getting caught in a write loop? turning off
  log_slave_updates?
  
  I had never thought of this but is has intriging possibilities...
 
 Each update is marked with the unique server id of the server which 
 originated it. When the update returns to its originating 
 server, it is 
 dropped instead of being executed. That is why every server 
 must have a 
 unique id.
 
 Alec
 

Actually, isn't it required that you start each server with
--log_slave_updates?

Or is that only necessary in a replication situation like this with more
than 2 servers?

A - B - C - A

If it's just:

A - B - A 

Is it necessary to start the servers with --log_slave_updates?

Thanks,

Jeff



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Circular Replication

2005-09-20 Thread Devananda

Jeff wrote:

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 19, 2005 10:10

To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: Circular Replication


Sid Lane [EMAIL PROTECTED] wrote on 19/09/2005 15:02:58:



stupid ?:

what keeps them from getting caught in a write loop? turning off
log_slave_updates?

I had never thought of this but is has intriging possibilities...


Each update is marked with the unique server id of the server which 
originated it. When the update returns to its originating 
server, it is 
dropped instead of being executed. That is why every server 
must have a 
unique id.


   Alec




Actually, isn't it required that you start each server with
--log_slave_updates?

Or is that only necessary in a replication situation like this with more
than 2 servers?

A - B - C - A

If it's just:

A - B - A 


Is it necessary to start the servers with --log_slave_updates?

Thanks,

Jeff





log-slave-updates causes the server to write to it's own binlog any 
statements it read from it's master's binlog. This is necessary in 
chains of servers (ie, A-B-C-A); in such chains, it is necessary that 
all servers have BOTH log-bin and log-slave-updates.


With just 2 servers (A-B-A), you need log-bin, but do not need 
log-slave-updates.


Regards,
Devananda vdv

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Circular Replication

2005-09-20 Thread Jeff
 -Original Message-
 From: Devananda [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 20, 2005 17:13
 To: Jeff
 Cc: mysql@lists.mysql.com
 Subject: Re: Circular Replication
 
 
 Jeff wrote:
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 19, 2005 10:10
 To: [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Subject: Re: Circular Replication
 
 
 Sid Lane [EMAIL PROTECTED] wrote on 19/09/2005 15:02:58:
 
 
 stupid ?:
 
 what keeps them from getting caught in a write loop? turning off 
 log_slave_updates?
 
 I had never thought of this but is has intriging possibilities...
 
 Each update is marked with the unique server id of the server which
 originated it. When the update returns to its originating 
 server, it is 
 dropped instead of being executed. That is why every server 
 must have a 
 unique id.
 
 Alec
 
  
  
  Actually, isn't it required that you start each server with 
  --log_slave_updates?
  
  Or is that only necessary in a replication situation like this with 
  more than 2 servers?
  
  A - B - C - A
  
  If it's just:
  
  A - B - A
  
  Is it necessary to start the servers with --log_slave_updates?
  
  Thanks,
  
  Jeff
  
  
  
 
 log-slave-updates causes the server to write to it's own binlog any 
 statements it read from it's master's binlog. This is necessary in 
 chains of servers (ie, A-B-C-A); in such chains, it is 
 necessary that 
 all servers have BOTH log-bin and log-slave-updates.
 
 With just 2 servers (A-B-A), you need log-bin, but do not need 
 log-slave-updates.
 
 Regards,
 Devananda vdv
 

Muchos Gracias!



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Inserting information into multiple tables and problems

2005-09-20 Thread Todd Hewett
Howdy Folks  I hope this is not too much information.

 

I have 

 

mysql  Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

 

I have multiple tables.

All are  innoD Tables.

All AI on a Primary key integer

All Columns are varchar 255 that are not keys.

 

Table VCS_PO_NUMBER 

Has a one to many relationship with.

Table BOARD_SERIAL_NUMBER 

Has a one to many relationship with the following tables:

INSERT INTO BOARD_TYPE 

INSERT INTO RECIEPT_INSPECTION 

INSERT INTO PCB_MANUFACTURER 

 

I originally was taking form data and using many cold fusion use CFINSERT
to write the information into the tables.

 

And received this error:

 



Error Executing Database Query. 

 


General error: Cannot add a child row: a foreign key constraint fails 


 

 


The error occurred in
/home/httpd/vhosts/vistasystemsproductions.net/httpdocs/recieve_boards_actio
n.cfm: line 10


8 : cfinsert datasource=productiontrack
9 :tablename=BOARD_SERIAL_NUMBER
10 :   formfields=BOARD_SERIAL_NUMBER
11 :   
12 : 

  _  




SQL

  insert into BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER) values ( (param 1) )

 

 

 

So now I thought I would wirite the insert statements in SQL instead of CF.

 

I currently am failing with the following:

 

mysql INSERT INTO VCS_PO_NUMBER (VCS_PO_NUMBER) VALUES(899234),

- INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER) VALUES(36534),

- INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES(INPUT MODULE N12310),

- INSERT INTO RECIEPT_INSPECTION (RECIEPT_INSPECTION_NAME)
VALUES(BILlTHOMAS),

- INSERT INTO PCB_MANUFACTURER (PCB_MANUFACTURER_COMPANY_NAME)
VALUES(A);

ERROR 1064: You have an error in your SQL syntax near 'INSERT INTO
BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER) VALUES(36534),

INSERT INTO' at line 2

 

Any help ideas recommendations are appreciated.

 

Thanks,

 

Todd



Re: Inserting information into multiple tables and problems

2005-09-20 Thread Jasper Bryant-Greene

Todd Hewett wrote:

I currently am failing with the following:

mysql INSERT INTO VCS_PO_NUMBER (VCS_PO_NUMBER) VALUES(899234),
- INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER) VALUES(36534),
- INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES(INPUT MODULE N12310),
- INSERT INTO RECIEPT_INSPECTION (RECIEPT_INSPECTION_NAME)
VALUES(BILlTHOMAS),
- INSERT INTO PCB_MANUFACTURER (PCB_MANUFACTURER_COMPANY_NAME)
VALUES(A);

ERROR 1064: You have an error in your SQL syntax near 'INSERT INTO
BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER) VALUES(36534),
INSERT INTO' at line 2


You need to end each INSERT INTO statement with a semicolon (;), not a 
comma (,). Also pressing enter after each one will allow you to easier 
diagnose any problems that might come up.


--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL-4.1.14 Compile Fails HP-UX 11i GCC-4.0.1

2005-09-20 Thread Briggs, Patrick
I'm unable to use the MySQL official HP-UX binaries, because they don't
contain shared libraries in their DEPOT distribution that I need for things
like PHP and DBD driver for PERL.  I also have problems because the MySQL
binaries are compiled using HP's own C++ compiler, which causes all kinds of
problems when other stuff is compiled using GCC, and you want them to work
together.  I'm attempting to compile it myself from the sources.  I've
generally always had good luck compiling from source with GCC, except with
this recent version.
 
This is what I'm using for options in ./configure
 
./configure --prefix=/opt/mysql --enable-thread-safe-client
--enable-local-infile 
 
Compiling MySQL-4.1.14 on HP-UX using GCC-4.0.1 fails with the linker error:
 
/usr/ccs/bin/ld: Unsatisfied symbols:
   Rotate_log_event::is_valid() (first referenced in slave.o) (data)
collect2: ld returned 1 exit status
 
The compile step fails in the directory mysql-4.1.14/sql
 
g++ -O3 -DDBUG_OFF -O3 -march=2.0 -fno-implicit-templates -fno-exceptions
-fno-rtti -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD
-DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK
-DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -o
mysqld sql_lex.o sql_handler.o item.o item_sum.o item_buff.o item_func.o
item_cmpfunc.o item_strfunc.o item_timefunc.o thr_malloc.o item_create.o
item_subselect.o item_row.o item_geofunc.o field.o strfunc.o key.o
sql_class.o sql_list.o net_serv.o protocol.o sql_state.o lock.o my_lock.o
sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o
hostname.o set_var.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o
sql_insert.o sql_prepare.o sql_error.o sql_update.o sql_delete.o uniques.o
sql_do.o procedure.o item_uniq.o sql_test.o log.o log_event.o init.o
derror.o sql_acl.o unireg.o des_key_file.o discover.o time.o opt_range.o
opt_sum.o records.o filesort.o handler.o ha_heap.o ha_myisam.o
ha_myisammrg.o ha_berkeley.o ha_innodb.o ha_isam.o ha_isammrg.o
ha_ndbcluster.o sql_db.o sql_table.o sql_rename.o sql_crypt.o sql_load.o
mf_iocache.o field_conv.o sql_show.o sql_udf.o sql_analyse.o sql_cache.o
slave.o sql_repl.o sql_union.o sql_derived.o client.o sql_client.o
mini_client_errors.o pack.o stacktrace.o repl_failsafe.o gstream.o spatial.o
sql_help.o protocol_cursor.o tztime.o my_time.o ha_example.o ha_archive.o
ha_tina.o ha_blackhole.o  ../innobase/usr/libusr.a ../innobase/srv/libsrv.a
 ../innobase/dict/libdict.a ../innobase/que/libque.a
../innobase/srv/libsrv.a ../innobase/ibuf/libibuf.a ../innobase/row/librow.a

../innobase/pars/libpars.a ../innobase/btr/libbtr.a ../innobase/trx/libtrx.a
../innobase/read/libread.a ../innobase/usr/libusr.a
 ../innobase/buf/libbuf.a ../innobase/ibuf/libibuf.a
../innobase/eval/libeval.a ../innobase/log/liblog.a ../innobase/fsp/libfsp.a
 ../innobase/fut/libfut.a ../innobase/fil/libfil.a
../innobase/lock/liblock.a ../innobase/mtr/libmtr.a
../innobase/page/libpage.a 
../innobase/rem/librem.a ../innobase/thr/libthr.a ../innobase/sync/libsync.a
../innobase/data/libdata.a ../innobase/mach/libmach.a
 ../innobase/ha/libha.a ../innobase/dyn/libdyn.a ../innobase/mem/libmem.a
../innobase/sync/libsync.a ../innobase/ut/libut.a ../innobase/os/libos.a
 ../innobase/ut/libut.a ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a
../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a
 ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz
-lpthread -lcrypt -lnsl -lm -lpthread

/usr/ccs/bin/ld: Unsatisfied symbols:
   Rotate_log_event::is_valid() (first referenced in slave.o) (data)
collect2: ld returned 1 exit status
make[4]: *** [mysqld] Error 1
 
I'm using the GCC binary from the HP-UX Software Porting Archive site:
 
Output of GCC -v:
 
Using built-in specs.
Target: hppa2.0w-hp-hpux11.11
Configured with: ../gcc/configure 
Thread model: single
gcc version 4.0.1
 
- Patrick Briggs
 


Re: Inserting information into multiple tables and problems

2005-09-20 Thread Todd Hewett
SNIP---

You need to end each INSERT INTO statement with a semicolon (;), not a 

comma (,). Also pressing enter after each one will allow you to easier 

diagnose any problems that might come up.

-

 

 

I have run the commands as single insert statements with the results below.

 

The one with the child process error I do not know how to resolve.

 

That is why I was trying to write one insert statement with a semicolon at
the end.

 

Two of the inserts seem to fail because MySQL sees my VALUES as unknown
columns.

 

Any other ideas out there?

 

Thanks Todd

 

mysql INSERT INTO VCS_PO_NUMBER (VCS_PO_NUMBER) VALUES(899234);

Query OK, 1 row affected (0.00 sec)

 

mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)

mysql VALUES(36534);

ERROR 1216: Cannot add a child row: a foreign key constraint fails

 

mysql INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES(INPUT MODULE N12310);

ERROR 1064: You have an error in your SQL syntax near 'MODULE N12310)' at
line 1

 

mysql INSERT INTO RECIEPT_INSPECTION (RECIEPT_INSPECTOR_NAME)
VALUES(BILlTHOMAS); 

ERROR 1054: Unknown column 'BILlTHOMAS' in 'field list'

 

mysql INSERT INTO PCB_MANUFACTURER (PCB_MANUFACTURER_COMPANY_NAME) 

mysql VALUES(A);

ERROR 1054: Unknown column 'A' in 'field list'

 

 

 



Re: Inserting information into multiple tables and problems

2005-09-20 Thread Jasper Bryant-Greene

Todd Hewett wrote:

mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)
mysql VALUES(36534);

ERROR 1216: Cannot add a child row: a foreign key constraint fails


Can you please post the output of:

SHOW CREATE TABLE BOARD_SERIAL_NUMBER;


mysql INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES(INPUT MODULE N12310);

ERROR 1064: You have an error in your SQL syntax near 'MODULE N12310)' at
line 1


Did you mean:

INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES('INPUT MODULE N12310');

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql_free_result() 2 different connections

2005-09-20 Thread Miguel Cardenas
 Are your two tables in the same database ?
 If yes only one connection if enough, and you could use a join query
 to do it, thus having a speed improvement of several magnitudes.

I've just downloaded another 2 mysql manuals and have been sit on my chair all 
day reading them, but still do not reach the join usage, I hope tomorrow...

 Have you checked that you free the correct result ? set it to NULL
 after used, and add a test for nullity, it may help.
 What version of the API are you using ? which OS ?
 Have you check bugs.mysql.com ?

It is Linux Slackware 10.1 with MySQL 4.1.4 installed from source... I have 
tested it too (same program and same version of MySQL) with FreeBSD and the 
result is almost the same, the difference is that Linux craches with glib 
message and in FreeBSD just sends a warning that the results have been 
already free...

I suspect that the current version of MySQL frees the resources automatically, 
in FreeBSD the warning was more explicit, it said something like trying to 
free again a result chunk... this one performed a single query and a single 
result_free() so there was no place for a mistake...

 That would leave a nice memory leak indeed...
 eventually, recompile and set a break-point before calling mysql_free,
 and look at all variables.

MySQL internal variables? to see the status before? that's a good idea, I will 
do it, thanks for your comments and will post it as soon as I get results :-)

Regards

P.S.
I already posted it to bugs.mysql.com but still do not get response

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Circular Replication

2005-09-20 Thread Bruce Dembecki

On Sep 16, 2005, at 11:07 AM, Jeff wrote:


There shouldn't be a problem if:

server A is ver 4.0.x
server B is ver 4.1.x

should there?



There will totally by a problem here... The 4.1 server will take the  
4.0 feed without issue. The 4.1 server however puts all sorts of  
information into the binary log which isn't in the original query,  
like what sort of collation to use, and which character set it uses  
and so on... 4.0 doesn't understand such commands and lots of things  
break in this situation.


As a side note we deploy servers in pairs, with circular replication.  
We did three and four server circles, but it gets messy if  
replication stops somewhere, the data becomes unpredictably  
inconsistent (assuming all the servers in the circle are getting  
production updates). Now we do simple two way replication between a  
pair, and we hang a third server off the pair somewhere just  
reading... the third server we use for backups, data dumps, reports  
and other non production issues. Essentially it is something like A- 
B-C, where A and B have two way replication and C is used for  
backups/reports etc... anything that changes the data happens on A or B.


We do some other black magic to manage the replication on C so it's  
perpetually behind the master servers by between 15 minutes and 2  
hours... that way if we have a stupid operator error or some other  
data corrupting event we can stop replication on the backup server  
before it executes and start from there rather than having to go back  
to yesterdays backup or something.


Best Regards, Bruce

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Inserting information into multiple tables and problems

2005-09-20 Thread todd hewett
 mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)
 mysql VALUES(36534);

 ERROR 1216: Cannot add a child row: a foreign key constraint fails

Can you please post the output of:

SHOW CREATE TABLE BOARD_SERIAL_NUMBER;

 mysql INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES(INPUT MODULE N12310);
 
 ERROR 1064: You have an error in your SQL syntax near 'MODULE N12310)' at
 line 1

Did you mean:

INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES('INPUT MODULE N12310')

###

It does appear that I did meanthat.

The Structure I should be using should be:
INSERT INTO TABLE_NAME (COLUMN_NAME) VALUES('VALUE_TO_INSERT_INTO_COLLUMN');


mysql SHOW CREATE TABLE BOARD_SERIAL_NUMBER;
+-+-





+
| Table   | Create Table
|
+-+-





+
| BOARD_SERIAL_NUMBER | CREATE TABLE `BOARD_SERIAL_NUMBER` (
  `BOARD_SERIAL_NUMBER_PK` int(10) unsigned NOT NULL auto_increment,
  `VCS_PO_NUMBER_PK` int(10) unsigned NOT NULL default '0',
  `BOARD_SERIAL_NUMBER` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`BOARD_SERIAL_NUMBER_PK`,`VCS_PO_NUMBER_PK`),
  KEY `BOARD_SERIAL_NUMBER_FKIndex1` (`VCS_PO_NUMBER_PK`),
  FOREIGN KEY (`VCS_PO_NUMBER_PK`) REFERENCES
`productiontrack.VCS_PO_NUMBER` (`VCS_PO_NUMBER_PK`) ON DELETE CASCADE
) TYPE=InnoDB |
+-+-





+
1 row in set (0.02 sec)


Thanks again for your help in getting this right.

Todd




MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Inserting information into multiple tables and problems

2005-09-20 Thread Jasper Bryant-Greene

todd hewett wrote:

mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)
mysql VALUES(36534);

ERROR 1216: Cannot add a child row: a foreign key constraint fails




Can you please post the output of:




SHOW CREATE TABLE BOARD_SERIAL_NUMBER;



mysql SHOW CREATE TABLE BOARD_SERIAL_NUMBER;
+
| BOARD_SERIAL_NUMBER | CREATE TABLE `BOARD_SERIAL_NUMBER` (
  `BOARD_SERIAL_NUMBER_PK` int(10) unsigned NOT NULL auto_increment,
  `VCS_PO_NUMBER_PK` int(10) unsigned NOT NULL default '0',
  `BOARD_SERIAL_NUMBER` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`BOARD_SERIAL_NUMBER_PK`,`VCS_PO_NUMBER_PK`),
  KEY `BOARD_SERIAL_NUMBER_FKIndex1` (`VCS_PO_NUMBER_PK`),
  FOREIGN KEY (`VCS_PO_NUMBER_PK`) REFERENCES
`productiontrack.VCS_PO_NUMBER` (`VCS_PO_NUMBER_PK`) ON DELETE CASCADE
) TYPE=InnoDB |
+-+-


Because you're not specifying a value for VCS_PO_NUMBER_PK in that 
INSERT statement, it will default to 0. It is a foreign key referencing 
the 'productiontrack.VCS_PO_NUMBER' table, which I bet doesn't have a 
row with VCS_PO_NUMBER_PK equal to 0. Hence the foreign key constraint 
fails.


You need to either:
1/ Specify the relevant value for VCS_PO_NUMBER_PK in your insert 
statement, like
INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER, VCS_PO_NUMBER_PK) 
VALUES (36534, 12345);


2/ Remove the foreign key constraint

3/ Create a row in VS_PO_NUMBER where VCS_PO_NUMBER_PK is equal to 0

You should probably take option 1 if possible.

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



subquery hanging

2005-09-20 Thread Devon E Bowen
I'm not an SQL expert and have a subquery problem. I have a query that
consists of a query inside of a query inside of a query. The two inner
subqueries work fine together and give me a list of ids for matching
records. And they do it very quickly. If I then take their results and
feed them to the outer query by hand, it also works fine - very fast.
But if I combine them so that they are nested, the system just locks
up. This doesn't seem rational to me. Can someone give me a hint as to
what I might be doing wrong?

In the attached output, I first show the indexes for each of the tables
in question. Then I show the two inner queries and the list they return.
Then how it works if I merge the results by hand. Then the final command
that locks the system. Oh, and the MySQL server version is 4.1.11.

Any help would be greatly appreciated...

Devon

---

mysql show index from Stage_Entries;
+---++--+--+--+---+-+--++--++-+
| Table | Non_unique | Key_name | Seq_in_index | 
Column_name  | Collation | Cardinality | Sub_part | Packed | Null | 
Index_type | Comment |
+---++--+--+--+---+-+--++--++-+
| Stage_Entries |  0 | PRIMARY  |1 | ID 
  | A |  176092 | NULL | NULL   |  | BTREE  |   
  |
| Stage_Entries |  0 | Entries_SearchName_1 |1 | SearchName 
  | A |  176092 | NULL | NULL   | YES  | BTREE  |   
  |
| Stage_Entries |  0 | Entries_SearchName_1 |2 | ID 
  | A |  176092 | NULL | NULL   |  | BTREE  |   
  |
| Stage_Entries |  1 | EntryID  |1 | EntryID
  | A |  176092 | NULL | NULL   | YES  | BTREE  |   
  |
| Stage_Entries |  1 | ContinentID  |1 | 
ContinentID  | A |  17 | NULL | NULL   |  | BTREE   
   | |
| Stage_Entries |  1 | SubcontinentID   |1 | 
SubcontinentID   | A |   88046 | NULL | NULL   | YES  | BTREE   
   | |
| Stage_Entries |  1 | CountryID|1 | CountryID  
  | A |2229 | NULL | NULL   | YES  | BTREE  |   
  |
| Stage_Entries |  1 | RegionID |1 | RegionID   
  | A |   58697 | NULL | NULL   | YES  | BTREE  |   
  |
| Stage_Entries |  1 | LastModifiedBy   |1 | 
LastModifiedBy   | A |  10 | NULL | NULL   | YES  | BTREE   
   | |
| Stage_Entries |  1 | Status   |1 | Status 
  | A |   5 | NULL | NULL   | YES  | BTREE  |   
  |
| Stage_Entries |  1 | LastModifiedDate |1 | 
LastModifiedDate | A |   19565 | NULL | NULL   | YES  | BTREE   
   | |
| Stage_Entries |  1 | SearchName   |1 | SearchName 
  | NULL  |   88046 | NULL | NULL   | YES  | FULLTEXT   |   
  |
| Stage_Entries |  1 | EntryText|1 | EntryText  
  | NULL  |  176092 | NULL | NULL   | YES  | FULLTEXT   |   
  |
+---++--+--+--+---+-+--++--++-+
13 rows in set (0.00 sec)

mysql show index from Stage_EntryIsTypeOfPlace;
+--++-+--+-+---+-+--++--++-+
| Table| Non_unique | Key_name| Seq_in_index | 
Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | 
Comment |
+--++-+--+-+---+-+--++--++-+
| Stage_EntryIsTypeOfPlace |  0 | PRIMARY |1 | ID   
   | A |  182769 | NULL | NULL   |  | BTREE  | |
| Stage_EntryIsTypeOfPlace |  1 | PlaceTypeID |1 | 
PlaceTypeID | A | 180 | NULL | NULL   | YES  | BTREE  | 
|
+--++-+--+-+---+-+--++--++-+
2 rows in set (0.00 sec)

mysql show index from Stage_EntryHasPopulation;

Fwd: connect from oracle to MYSQL.

2005-09-20 Thread Ananda Kumar
Hi Friends,
Can you please help me on this.
 regards
anandkl

-- Forwarded message --
From: Ananda Kumar [EMAIL PROTECTED]
Date: Sep 20, 2005 9:46 PM
Subject: connect from oracle to MYSQL.
To: mysql@lists.mysql.com

 Hi All,
Can you please help me in connecting from oracle database to mysql database.
I am trying to setup the hetrogenious service provided by oracle, but i am 
not able to complete all the steps. 
 I am failing at this step
 *cp MyODBC-3.51.06-sun-solaris2.8-sparc/libmyodbc3* lib*
# *mv etc/odbc.ini etc/odbc.ini.backup*
# *cp MyODBC-3.51.06-sun-solaris2.8-sparc/odbc.ini etc*
# *cd lib*
# *rm libmyodbc3.so libmyodbc3_r.so*
# *ln -s libmyodbc3-3.51.06.so http://libmyodbc3-3.51.06.so/ libmyodbc3.so
*
# *ln -s libmyodbc3_r-3.51.06.so http://3.51.06.so/ libmyodbc3_r.so*
** 
*I am not seeing libmyodbc files in
MyODBC-3.51.06-sun-solaris2.8-sparcdirectory. I am seeing only this
files
*
MyODBC-3.51.10-sun-solaris2.8-sparc.pkg
README.
 I am using solaris2.8 for oracle database and mysql 4.1 on linux fedaro.
 regards
anandkl


Problem related to Installation of MYSQL 4.0.2

2005-09-20 Thread Lms.Bmc Bmc
hi,
  i am Installing My Sql -Standard-4.0.26-pc-linux-gnu-i686 Of Linux Machine 
But Facing some Problem 
 i am Getting thius Error  ERROR 2002: Can't connect to local MySQL server 
through socket '/var/lib/mysql/mysql.sock' (2)
 while i start MYSQl 
 Plzz Reply me Giving t he Solution For it