Re: access primitives in php

2003-03-19 Thread Joel Rees
 We need to set up some primitives in php for mysql, then repeat for
 postgresql, so that we bury most of the differences in the primitives.

Sorry about the noise. Joe Conway on the postgresql list pointed me
towards the database abstraction layers in pear, and I see lots of good
stuff there.

-- 
Joel Rees [EMAIL PROTECTED]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Mysql-max 4.0.12 missing GLIBC 2.2

2003-03-19 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 19 Mar 2003, Natalino Picone wrote:

 can anyone tell me why the mysql-max 4.0.12 is not statically linked
 against Glibc 2.2 ? (the standard one is ok)...

This is done intentionally, to enable the use of User Defined Functions
(UDFs) - you need a dynamically linked binary for this to work (it uses
the dlopen() system call).

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD4DBQE+eClGSVDhKrJykfIRAoAcAJY7mHU0cX2D7erCG6jzUfBmNWhTAJ9v8tfT
pR/MrSUGJkHvCIeTkkbRxw==
=SB8J
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Process Limit on Linux ?

2003-03-19 Thread Joseph Bueno
Hi,

Since shm (shared memory) in Unix/Linux is only used to share memory
between independent processes and mysql server is a single process
(multi-threaded), I am convinced that shmmax value has no consequence
on mysql. (OTOH Oracle has a multiprocess architecture and uses
shared memory).
Hope this helps,
Joseph Bueno
Philipp wrote:
Dear Walt, dear List,

thank you for your reply. Finally a suggestions at all.
I checked both
/proc/sys/kernel/threads-max
/proc/sys/kernel/shmmax
I dont think threads-max will be a problem, because the value is 14336,
and i dont think my system will ever have to handle this number of threads.
But researching shmmax at google i got several hits. Most are dealing with
postgres but perhaps its the same with mysql.
shmmax ist 32 MB. on one page the author suggest to raise this value to 128
MB.
What are your suggestions for the values:

shmall  shmmax  shmmni ?

Thank you very much,
Yours Philipp
- Original Message -
From: walt [EMAIL PROTECTED]
To: Philipp [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 6:48 PM
Subject: Re: Process Limit on Linux ?


Philipp wrote:

Hi there,

i wrote several times to the list asking for help with a problem
regarding process limits on linux, but never got an answer.
today i found this story:
http://www.mysql.com/press/user_stories/handy.de.html

here are the relevant sentences:

We had some process limit problems on our Linux Systems,
but thanks to your support we where able to patch the linux boxes
and move the limit to a size that meets our needs (we've got an average
of

about
1600 concurrent threads per server).
These people use 2.2 Kernels so i dont know if the mentioned kernel and
glibc
patching is also relevant for me, as i am using 2.4 kernels only.
Here is my problem in detail:

i am using mysql-3.23.55 binary packages on linux 2.4.20 and i raised
ulimit

values and configuration in my.conf to allow more then 1500 threads. but
when
there are around 750 threads a new client connecting is told something
like

that (dont have the errno at the moment, i think its 11):

cant create new thread, perhaps you are out of memory or there is a
os-depended bug.
The machine only runs apache and mysql and is a Xeon 2x2 2.4 Gz with 2
GB of

RAM.
cat /proc/meminfo sais that more then 1 Gig is used for caching, so
memory

should be no
problem .
Please, if you have any ideas, let me know. If it is a kernel issue,
tell me

to go to linux mailing lists
or if its some kind of secret issue only the support will be able to
answer let me know that.
Thanks in advance,
Philipp
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]

Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Philipp,
Did you check /proc/sys/kernel/threads-max? I know with oracle 8i, you
are supposed to increase  /proc/sys/kernel/shmmax as well as some other
values. You might check into that and see if changing those values will
help.
Does your syslog say anything when these problems occur?
walt

walt




-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


MySQL 4.1 for OS X compiling problems

2003-03-19 Thread Michael Edlund
I'm trying to compile MySQL 4.1 on Mac OS 10.2.4 (Darwin Kernel Version 
6.4) but run into some problems.
When following the general compilation guidelines...

cd mysql-4.0
bk -r get -Sq
aclocal; autoheader; autoconf; automake
(cd innobase ; aclocal; autoheader; autoconf; automake)
(cd bdb/dist ; sh s_all )
./configure
make
...the make process exits with these lines:

--- snip ---
ctype-utf8.c:2001: `my_wildcmp_mb' undeclared here (not in a function)
ctype-utf8.c:2001: initializer element is not constant
ctype-utf8.c:2001: (near initialization for `my_charset_utf8.wildcmp')
ctype-utf8.c:2006: `my_numchars_mb' undeclared here (not in a function)
ctype-utf8.c:2006: initializer element is not constant
ctype-utf8.c:2006: (near initialization for `my_charset_utf8.numchars')
ctype-utf8.c:2007: `my_charpos_mb' undeclared here (not in a function)
ctype-utf8.c:2007: initializer element is not constant
ctype-utf8.c:2007: (near initialization for `my_charset_utf8.charpos')
make[2]: *** [ctype-utf8.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
sh-2.05a$
--- snip ---
My environment is set-up like this:

GNU Make version 3.79
autoconf (GNU Autoconf) 2.52
automake (GNU automake) 1.6.1
libtool
GNU m4 1.4
GNU Bison version 1.28 (however I'm not trying to do any configuration)
I'd be very happy if someone had an idea about what might cause this.

Best regards,
Michael Edlund
Helloworld Media
Box 13085, 103 02 Stockholm, Sweden
Visitors:  Nytorgsgatan 15, Stockholm
Email: [EMAIL PROTECTED]
Web: http://helloworld.se
Mobile: +46-(0)70-370 19 99
Phone: +46-(0)8-644 10 23
Fax: +46-(0)8-643 96 76
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Process Limit on Linux ?

2003-03-19 Thread Philipp
Hi Joseph,

thank you for your answer. While i was reading
about clustering some weeks ago i read the openmosix
FAQ claiming that openmosix would not work with apache,
because apache was using shared memory to communicate
with its threads, and i always thought mysql is designed
the same way. Please someone correct me if i am wrong.

Regards,
Philipp


On Wed, 19 Mar 2003 10:41:21 +0100
Joseph Bueno [EMAIL PROTECTED] wrote:

 Hi,
 
 Since shm (shared memory) in Unix/Linux is only used to share memory
 between independent processes and mysql server is a single process
 (multi-threaded), I am convinced that shmmax value has no consequence
 on mysql. (OTOH Oracle has a multiprocess architecture and uses
 shared memory).
 
 Hope this helps,
 Joseph Bueno
 
 Philipp wrote:
  Dear Walt, dear List,
  
  
  thank you for your reply. Finally a suggestions at all.
  I checked both
  
  /proc/sys/kernel/threads-max
  /proc/sys/kernel/shmmax
  
  I dont think threads-max will be a problem, because the value is 14336,
  and i dont think my system will ever have to handle this number of threads.
  
  But researching shmmax at google i got several hits. Most are dealing with
  postgres but perhaps its the same with mysql.
  
  shmmax ist 32 MB. on one page the author suggest to raise this value to 128
  MB.
  
  What are your suggestions for the values:
  
  shmall  shmmax  shmmni ?
  
  
  Thank you very much,
  Yours Philipp
  
  - Original Message -
  From: walt [EMAIL PROTECTED]
  To: Philipp [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Monday, March 17, 2003 6:48 PM
  Subject: Re: Process Limit on Linux ?
  
  
  
 Philipp wrote:
 
 Hi there,
 
 i wrote several times to the list asking for help with a problem
 regarding process limits on linux, but never got an answer.
 today i found this story:
 
 http://www.mysql.com/press/user_stories/handy.de.html
 
 here are the relevant sentences:
 
 We had some process limit problems on our Linux Systems,
 but thanks to your support we where able to patch the linux boxes
 and move the limit to a size that meets our needs (we've got an average
  
  of
  
 about
 1600 concurrent threads per server).
 
 These people use 2.2 Kernels so i dont know if the mentioned kernel and
 glibc
 patching is also relevant for me, as i am using 2.4 kernels only.
 
 Here is my problem in detail:
 
 i am using mysql-3.23.55 binary packages on linux 2.4.20 and i raised
  
  ulimit
  
 values and configuration in my.conf to allow more then 1500 threads. but
 when
 there are around 750 threads a new client connecting is told something
  
  like
  
 that (dont have the errno at the moment, i think its 11):
 
 cant create new thread, perhaps you are out of memory or there is a
 os-depended bug.
 
 The machine only runs apache and mysql and is a Xeon 2x2 2.4 Gz with 2
  
  GB of
  
 RAM.
 cat /proc/meminfo sais that more then 1 Gig is used for caching, so
  
  memory
  
 should be no
 problem .
 
 Please, if you have any ideas, let me know. If it is a kernel issue,
  
  tell me
  
 to go to linux mailing lists
 or if its some kind of secret issue only the support will be able to
 answer let me know that.
 
 Thanks in advance,
 Philipp
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
  
  [EMAIL PROTECTED]
  
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 Philipp,
 Did you check /proc/sys/kernel/threads-max? I know with oracle 8i, you
 are supposed to increase  /proc/sys/kernel/shmmax as well as some other
 values. You might check into that and see if changing those values will
 help.
 Does your syslog say anything when these problems occur?
 
 walt
 
 walt
 
  
 
 


-- 


-
Philipp Steinkrueger
Oberberg Online Informationssysteme GmbH
Technik
http://www.oberberg.net

PGPkeyID: 690A9504
Key Fingerprint: 35CE 467E C813 06B0 B8E3  0275 2B1E E84A 690A 9504

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



defaults in MySQL

2003-03-19 Thread Jon Miller
Can someone tell me how do I find the default settings in MySQL.  Mainly
I'm interested in knowing where are the data files stored.  I'm building
a application server (RH7.3) and need to know which partition should be
sized to handle the database.
-- 
Jon Miller [EMAIL PROTECTED]
MMT Networks Pty Ltd



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Mysql and Backup

2003-03-19 Thread sunil sharma
Dear Friends

I am new in this list
I am using mysql on linux 

My problem is about the backup of mysql database

We are having 50 Databases and each database is of
minimum of 300 MB in size and maximum of 2 G.B size

I am planning to take incremental backup of the
database 
For that i am planning to use mysqldump,But i m bit
doughtful about the mysqldump because the size of the
database is very huge
I tried but it's taking a lot of time

So can anybody guide me regarding the mysql backup
policies?
or can anybody suggest me the url from where i can get
the information?

Thanx in advance

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: defaults in MySQL

2003-03-19 Thread Barry Marler
/etc/my.cnf: Global options
DATADIR/my.cnf: Server-specific options
defaults-extra-file: The file specified with --defaults-extra-file=#
~/.my.cnf: User-specific options
By default, data is in /var/lib/mysql.

Jon Miller wrote:
Can someone tell me how do I find the default settings in MySQL.  Mainly
I'm interested in knowing where are the data files stored.  I'm building
a application server (RH7.3) and need to know which partition should be
sized to handle the database.
--
Barry Marler
Plant Genome Mapping Laboratory
University of Georgia
Room 229, CAGT
111 Riverbend Road
Athens, GA 30602
706.583.0164
706.583.8120[fax]
http://www.plantgenome.uga.edu
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Mysql And Backup

2003-03-19 Thread sunil sharma
Dear Friends

I am new in this list
I am using mysql on linux 

My problem is about the backup of mysql database

We are having 50 Databases and each database is of
minimum of 300 MB in size and maximum of 2 G.B size

I am planning to take incremental backup of the
database 
For that i am planning to use mysqldump,But i m bit
doughtful about the mysqldump because the size of the
database is very huge
I tried but it's taking a lot of time

So can anybody guide me regarding the mysql backup
policies?
or can anybody suggest me the url from where i can get
the information?

Thanx in advance

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



back to GRANT and database wildcards

2003-03-19 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, all --

After experimenting with the input from Benjamin I can GRANT all I want,
but still only on a single database (though if I know the name I can do
so in advance of its creation).  This still seems a little troublesome.
I expect that it's in the use and implementation of mysql department
rather than actual mysql workings department, though.

I'd like for users, like my junk user, to have a kinda-root account
which can manage all of, but only, the junk_*.* databases, whether or not
they yet exist, and create other junk_subuser accounts for whatever
limited granting is necessary.

Am I living in a dream world?  If so, how do other service providers do
this?  I'm certain you don't give each customer a db root account :-) but
do your customers have to come to you for a new database or a new user?


TIA  HAND

mysql query,
:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+eE1xGb7uCXufRwARAlX4AKCqk9wodTx3+i1Dz06Mpgq0nooo3ACgrR9G
MT2Dp08aUeOrqR9pc1XSVF4=
=/3bf
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: This query shouldn't be wrong, but mysql says it is???

2003-03-19 Thread Lai Liu-yuan
I reread the mysql manual again, and found the little piece I've missed : version 4!! 
That's the problem.

Thanks for your reply.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



View all temporary tables in a database

2003-03-19 Thread Ahmed S K Anis
HI,
I create temporary tables using the query 
CREATE TEMPORARY TABLE ..

How do i list all the temporary tables in the database
SHOW TABLES STATUS  does  not show the temporary tables.

Thanks
Anis

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



îò Ýëåêñ îáîâëåííàÿ èíôîðìàöèÿ.

2003-03-19 Thread elex . izdvo
  Mysql

 (
)
 CD-ROM
  (   ).

   , 
   
   ( 115  ) CD-
ROM.   .  
 ,
 ,  
,,  ,
  , 

 .
   17
  (   ,  
 -, , , 
 , , , ,  , 
,,  -  
 - ).
.  
  ,  . .  
 RTF.
   ( 
   ) - 1620 . 
   . 
  (- 275 ).
   Internet  
(095) 268-09-65,  502-54-47.  
.  

 
   

 . 4 . 29 
 .
  . 
   , 
 . 
 E-mail  
 
   http://www.osios.org/

 









-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Test Please Ignore :)

2003-03-19 Thread Karthikeyan Balasubramanian
Test
-- 
  Karthikeyan Balasubramanian
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Access your email from home and the web

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



re: Can it be true?

2003-03-19 Thread Egor Egorov
On Tuesday 18 March 2003 22:34, Salada Duncan wrote:
 Is it possible?  Can it really be true?  I check the website daily and
 watch the lists eagerly.  As I looked at the website just now, I saw it...

 Database Server
 Production: 4.0.12

 Did I miss the announcement?

Yup ;)

http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:134985:200303:hnhjnljcfigdmnpjhaib

 Is the website jumping the gun?  Or am I the
 first to find out?
 ;-)




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



InnoDB Foreign Key

2003-03-19 Thread Thorsten Schmidt
Dear all,
how can I remove a foreign key in InnoDB?
 ALTER TABLE DROP (FOREIGN) KEY `key`
isn't working (and also not specified in documentation)... : (


Thanks and best regards

Thorsten

(For bypassing the Filter: Here is sql,query,queries,smallint)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Mysql, Need extra Cash? - Get Paid in 48hrs - Home Reps Needed .Com home representatives are required!

2003-03-19 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, all --

...and then Roger Davis said...
% 
% Maybe the [EMAIL PROTECTED] address should be changed to
% [EMAIL PROTECTED] so people can't pull the Username off the e-mail
% address and bypass the filter.

1) There were some changes to the filtering concept mentioned a while
ago.  Have they been implemented yet?

2) Why not just have all posts from non-subscribed users either moderated
or handshaken via tmda or the like?


HTH  HAND

mysql query,
:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+eHAPGb7uCXufRwARAg2AAKDRh4Soc3bMBiFLSCZxXzvc6Bw7zwCglL5n
MgOPnyJN51I1dDFHTxa8TLo=
=NA5s
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



how to display blob data back to text

2003-03-19 Thread Karthikeyan Balasubramanian
Hi,

  I m using the following query

SELECT id, 
   subject, 
   news, 
   date_format(date, '%m/%d/%Y %h:%i %p') AS date, 
   author, 
   link 
FROM news
ORDER BY id DESC LIMIT 5

heres my table structure

CREATE TABLE news (   
   id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,   
   subject varchar(50) NOT NULL,  
   news blob NOT NULL,
   date datetime DEFAULT '-00-00' NOT NULL,   
   author varchar(50) NOT NULL,   
   link varchar(150), 
   PRIMARY KEY (id)   
  );  

heres the output i get in my web page

3 Test2 [EMAIL PROTECTED] 03/19/2003 06:28 PM karthikeyan 
2 Test1 [EMAIL PROTECTED] 03/19/2003 06:28 PM karthikeyan 

Can i tweak the query so that i can display BLOB data properly.

Have a great day.

Karthikeyan.
-- 
  Karthikeyan Balasubramanian
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - IMAP accessible web-mail

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: InnoDB Foreign Key

2003-03-19 Thread Rafal Jank
 
  Dear all,
  how can I remove a foreign key in InnoDB?
   ALTER TABLE DROP (FOREIGN) KEY `key`
  isn't working (and also not specified in documentation)... : (
  
  
 It's not implemented yet. You can copy your data to another table without
 the foreign key constraint, drop original one and rename.
 


sql, query
-- 
_/_/  _/_/_/  - Rafa Jank [EMAIL PROTECTED] -
 _/  _/  _/  _/   _/ Wirtualna Polska SA   http://www.wp.pl 
  _/_/_/_/  _/_/_/ul. Traugutta 115c, 80-237 Gdansk, tel/fax. (58)5215625
   _/  _/  _/ ==*  http://szukaj.wp.pl *==--

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: mysqladmin processlist = weird in version 4.0.12

2003-03-19 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 18 Mar 2003, Andrew Braithwaite wrote:

 Anyone know why mysqladmin processlist is not showing the host that is
 connected, but instead is showing the following in v4.0.12:

 truncated excerpt
 +-+-+--+--+
 | Id  | User| Host | db   | Command
 +-+-+--+--+
 | 530 | fcgi| 146.101.143.72:48753 | multimap | Sleep
 | 536 | fcgi| 146.101.143.72:48139 | multimap | Sleep
 | 545 | fcgi| 146.101.143.72:45618 | multimap | Sleep
 | 556 | fcgi| 146.101.143.72:49311 | multimap | Sleep
 | 570 | fcgi| 146.101.143.72:40745 | multimap | Sleep


 It used to show:

 +-+-+---+--+
 | Id  | User| Host  | db   | Command
 +-+-+---+--+
 | 530 | fcgi| host1 | multimap | Sleep
 | 536 | fcgi| host2 | multimap | Sleep
 | 545 | fcgi| host3 | multimap | Sleep
 | 556 | fcgi| host2 | multimap | Sleep
 | 570 | fcgi| host3 | multimap | Sleep

 Any ideas anyone?

It seems to be a bug - I've now entered it into our bug database:

http://bugs.mysql.com/?id=164

Thanks for spotting this! It will be fixed for the next release.

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+eHtWSVDhKrJykfIRArHvAJ9WmjFwoNDOoLI6/Qi2CSOhUYniGgCfTzNI
C8D5o3fmmpnjMMR13SxZ4HU=
=gn2i
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Fw: problem about bulk insertion

2003-03-19 Thread gerald_clark
How do you know these possibly duplicate records are not already in the
table?
What is wrong with adding a unique index on (fld2,fld3) ?

Hu Qinan wrote:

Dear all, 

I intend to write a large volume of records to a table tbl. 

tbl:
fld1, int unsigned not null auto_increment primary key,
fld2, text
fld3, text

The combination of (fld2, fld3) should be be unique, so I need to check for 
duplicates every time when a record is added. 
--Question1: How to speed up insertions to this table in MySQL? 

To speed up the insertion, I try to write all records (with duplicates of fld_2 and 
fld_3) into a temporary table.
 CREATE TEMPORARY TABLE T (
ID INT UNSIGNED NOT NULL AUTO_INCREMENT, 
fld2 TEXT
fld3 TEXT);

Then I try to select distinct fld2 and fld3 from the temproary table. And then insert 
them into tbl.
INSERT INTO tbl SELECT DISTINCT fld1, fld2 FROM T;
But it does not work, since the column counts do not match.

I try to use 
INSERT INTO tbl SELECT DISTINCT * FROM T;
But since all IDs are distinct, all records in T will be inserted into tbl.
--Question2: How to insert records with distinct (fld2 and fld3) into tbl in MySQL?

Thanks a lot.

  




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: how to display blob data back to text

2003-03-19 Thread Paul DuBois
At 5:39 -0800 3/19/03, Karthikeyan Balasubramanian wrote:
Hi,

  I m using the following query

SELECT id,
   subject,
   news,
   date_format(date, '%m/%d/%Y %h:%i %p') AS date,
   author,
   link
FROM news
ORDER BY id DESC LIMIT 5
heres my table structure

CREATE TABLE news (  
   id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,  
   subject varchar(50) NOT NULL, 
   news blob NOT NULL,   
   date datetime DEFAULT '-00-00' NOT NULL,  
   author varchar(50) NOT NULL,  
   link varchar(150),
   PRIMARY KEY (id)  
  ); 
heres the output i get in my web page

3 Test2 [EMAIL PROTECTED] 03/19/2003 06:28 PM karthikeyan
2 Test1 [EMAIL PROTECTED] 03/19/2003 06:28 PM karthikeyan
Can i tweak the query so that i can display BLOB data properly.
Possibly, but you specify neither what's wrong the the values as shown
above, or how you want them to be displayed, so I see no way to answer
your question without additional information.


Have a great day.

Karthikeyan.
--
  Karthikeyan Balasubramanian
  [EMAIL PROTECTED]


--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


ʱÉн»ÓÑ

2003-03-19 Thread ÃÃÍø
a href=http://since.vip.sina.com/shoujijiaoyou.html;img 
src=http://since.vip.sina.com/pic2/yzjiaoyou.gif; width=730 height=59 border=0 
alt=/a


=

 http://www.chinamysql.com  

100M1010M20318/


 http://3long.sayba.com 
5881800

 http://shop.sayba.com 





http://www.lovexin.com;

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: MySQL 4.1 for OS X compiling problems

2003-03-19 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Wed, 19 Mar 2003, Michael Edlund wrote:

 I'm trying to compile MySQL 4.1 on Mac OS 10.2.4 (Darwin Kernel Version
 6.4) but run into some problems. When following the general compilation
 guidelines...

[...]

 ...the make process exits with these lines:

 --- snip ---
 ctype-utf8.c:2001: `my_wildcmp_mb' undeclared here (not in a function)
 ctype-utf8.c:2001: initializer element is not constant
 ctype-utf8.c:2001: (near initialization for `my_charset_utf8.wildcmp')
 ctype-utf8.c:2006: `my_numchars_mb' undeclared here (not in a function)
 ctype-utf8.c:2006: initializer element is not constant
 ctype-utf8.c:2006: (near initialization for `my_charset_utf8.numchars')
 ctype-utf8.c:2007: `my_charpos_mb' undeclared here (not in a function)
 ctype-utf8.c:2007: initializer element is not constant
 ctype-utf8.c:2007: (near initialization for `my_charset_utf8.charpos')
 make[2]: *** [ctype-utf8.lo] Error 1
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2
 sh-2.05a$
 --- snip ---

Thanks for reporting this - it should now be fixed.

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+eI/NSVDhKrJykfIRAihSAJ4tM/UeY7ldrygjHNb5QnDWMt0lpQCfd3iA
TtqcUZh4oLwI4MwXwoLqZO4=
=IQ9a
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: how to display blob data back to text

2003-03-19 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Paul DuBois wrote:
At 5:39 -0800 3/19/03, Karthikeyan Balasubramanian wrote:

Hi,

  I m using the following query

SELECT id,
   subject,
   news,
   date_format(date, '%m/%d/%Y %h:%i %p') AS date,
   author,
   link
FROM news
ORDER BY id DESC LIMIT 5
heres my table structure

CREATE TABLE news (  
   id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,  
   subject varchar(50) NOT NULL, 
   news blob NOT NULL,   
   date datetime DEFAULT '-00-00' NOT NULL,  
   author varchar(50) NOT NULL,  
   link varchar(150),
   PRIMARY KEY (id)  
  ); 

heres the output i get in my web page

3 Test2 [EMAIL PROTECTED] 03/19/2003 06:28 PM karthikeyan
2 Test1 [EMAIL PROTECTED] 03/19/2003 06:28 PM karthikeyan
Can i tweak the query so that i can display BLOB data properly.


Possibly, but you specify neither what's wrong the the values as shown
above, or how you want them to be displayed, so I see no way to answer
your question without additional information.


Ahh, it appears you're using JDBCIf you dig down way deep in the 
JDBC spec when it talks about data type mappings, you will see that BLOB 
SQL datatypes map to java byte[]s...So, if you do a getObject() on a 
column that is a BLOB, you won't get a String, you'll get a byte[]...If 
you try and use this byte[] as a String, java prints out the address of 
it, like  '[EMAIL PROTECTED]'.

You should be using getString() if what you really want is a String. 
Alternatively, use the TEXT types in MySQL, which have many of the same 
properties of a BLOB, but are treated as text, not binary data.

	-Mark

- -- 
MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+eJHttvXNTca6JD8RAhNfAJ9z03ijjCHNYsdpl90RXtTGVQz3kACgswOU
ysLhcd6XpWtCNb5h5H5TidE=
=qGYa
-END PGP SIGNATURE-
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


AW: EMS MySQL Manager for Linux 1.15 released!

2003-03-19 Thread Rusch (ext) Reiner
Hi,

ok, no doubt about that's related software would be nice to informed about
here.
But what I found amazing that there wasn't a discuss just a non-related hint
to get back in mind
But if I'm lonely with my opinion, there's no problem for me!

2EMS HiTech Team:
BTW, I'm not a member of Siemens and and wouldn't be a difference.

Regards,
Reiner

 -Ursprungliche Nachricht-
 Von: EMS HiTech Team [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 18. Marz 2003 16:31
 An: [EMAIL PROTECTED]
 Cc: Rusch (ext) Reiner
 Betreff: Re: EMS MySQL Manager for Linux 1.15 released!
 
 
 Hello All,
 
 We are not spammers at all. We just think that our 
 announcements may be
 interesting to the MySQL community as our products are 
 directly related to
 MySQL server. Thanks to everyone who understands that and 
 supported us in
 this discussion.
 
 2Reiner: BTW, one of the Siemens AG branches is an owner of 
 MySQL Manager
 site license. :-)
 
 Best Regards,
 EMS HiTech Team
 http://www.ems-hitech.com
 
 - Original Message -
 From: Rusch (ext) Reiner [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 17, 2003 9:27 PM
 Subject: AW: EMS MySQL Manager for Linux 1.15 released!
 
 
  Hi,
 
  is anyone interested in commercial use/spam of this list?
  If not, I would prefer to throw them out of the list.
 
  Regards,
  Reiner
 
   -Ursprungliche Nachricht-
   Von: EMS HiTech Team [mailto:[EMAIL PROTECTED]
   Gesendet: Montag, 17. Marz 2003 17:05
   An: [EMAIL PROTECTED]
   Betreff: EMS MySQL Manager for Linux 1.15 released!
  
  
   EMS HiTech company is very glad to announce MySQL Manager for
   Linux 1.15 --
   the next version of our powerful MySQL administration and
   development tool!
  
   You can download the latest version and user's guide from
   http://www.mysqlmanager.com/download.phtml
  
   What's new in version 1.15?
  
   1. Export Data Dialog: export to PDF added. Now you can
   export data to one
   of the most popular document formats as well as to the 
 other supported
   formats.
  
   2. Export Data Dialog - export to HTML: a possibility of 
 customizing
   navigation links for multi-file export and a possibility 
 to define a
   background picture for the result table added.
  
   3. Import Data Wizard: import modes are implemented - now you
   can define an
   action to be executed with the concurrent records in the
   source file and the
   target table. You can either update these records, delete
   them, insert only
   new records, and more. For these purpose you should define
   key columns as
   primary key.
  
   4. Import Data Wizard: added a possibility of defining a way
   to add data to
   the destination table - insert or append.
  
   5. Several small improvements and minor bugfixes.
  
   What is MySQL Manager?
  
   EMS MySQL Manager provides powerful tools for MySQL Server
   administration
   and object management. Its Graphical User Interface (GUI)
   allows you to
   create/edit all MySQL database objects in a simple and direct
   way, run SQL
   scripts, manage users and administer user privileges,
   extract, print, and
   search metadata, create database structure reports in HTML format,
   export/import data, and supplies many more services that will
   make your work
   with the MySQL server as easy as it can be...
  
   Don't forget to check out other our products:
  
   http://www.ems-hitech.com/sqlmanagers
   Powerful database administration tools for
   InterBase/FireBird, MySQL and
   PostgreSQL servers
  
   http://www.ems-hitech.com/sqlutils/
   Cross-platform data management utilities
  
   http://www.ems-hitech.com/components/
   Powerful components for Delphi/C++ Builder developers
  
   We hope you'll like our products.
   Thank you for your attention.
  
   Best Regards,
   EMS HiTech Team
   http://www.ems-hitech.com
  
  
  
   
 -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   To request this thread, e-mail 
 [EMAIL PROTECTED]
   To unsubscribe, e-mail
   [EMAIL PROTECTED]
   Trouble unsubscribing? Try: 
http://lists.mysql.com/php/unsubscribe.php
 

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: 

Re: Process Limit on Linux ?

2003-03-19 Thread Dan Nelson
In the last episode (Mar 19), Philipp said:
 thank you for your answer. While i was reading about clustering some
 weeks ago i read the openmosix FAQ claiming that openmosix would not
 work with apache, because apache was using shared memory to
 communicate with its threads, and i always thought mysql is designed
 the same way. Please someone correct me if i am wrong.

SYSV shared memory (shm*) is a block of memory that one process
creates, and depending on the access flags, multiple processes can
attach to and see each other's changes.

Threads use shared memory by definition, because a threaded application
is still one process.  No SYSV shm tricks are needed.

Openmosix won't be able to balance mysql threads, because even if it
were possible to synchronize shared memory between machines with Mosix,
synching thread mutexes would be horrendously slow.  Better to just get
a multi-CPU box.

-- 
Dan Nelson
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



another table to query!

2003-03-19 Thread Andrew
Hi All MySQL ers

I am now starting to confuse myself so everyone else should be just fine with
this query problem / clarification!

I have just discovered through luck that I need to have the same record in
(table items) accessable if it is listed as being in more than one city (table
city).  Obviously I don't want to create new records for the same item so it can
be displayed if it's in different cities.  Is the best way to do this to create
a new table and call it reference_city with items.ItemID and city.CityID as the
columns?

Basically the items are being called when an item is in a city and the same item
will more than likely be in more than one city.

Thanks
Andrew




**
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



FW: another table to query!

2003-03-19 Thread Andrew

Hi All MySQL ers

I am now starting to confuse myself so everyone else should be just 
fine with this query problem / clarification!

I have just discovered through luck that I need to have the same 
record in (table items) accessable if it is listed as being in more 
than one city (table city).  Obviously I don't want to create new 
records for the same item so it can be displayed if it's in different 
cities.  Is the best way to do this to create a new table and call it 
reference_city with items.ItemID and city.CityID as the columns?

Basically the items are being called when an item is in a city and the 
same item will more than likely be in more than one city.

Thanks
Andrew


 

**
Information in this email is confidential and may be privileged. 
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
** 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Process Limit on Linux ?

2003-03-19 Thread Philipp
Hi Dan,


i just talked about openmosix because i read about
shared memory segments. my only desire is to make mysql
able to spawn 1000-1500 connections and *not* to tell
my client cant create new thread, perhaps out of memory
while 1.5 GB of RAM is only used for caching. Is that really
possible that mysql is not able to handle this amount of connections ?

My best Regards,
Philipp


On Wed, 19 Mar 2003 10:01:38 -0600
Dan Nelson [EMAIL PROTECTED] wrote:

 In the last episode (Mar 19), Philipp said:
  thank you for your answer. While i was reading about clustering some
  weeks ago i read the openmosix FAQ claiming that openmosix would not
  work with apache, because apache was using shared memory to
  communicate with its threads, and i always thought mysql is designed
  the same way. Please someone correct me if i am wrong.
 
 SYSV shared memory (shm*) is a block of memory that one process
 creates, and depending on the access flags, multiple processes can
 attach to and see each other's changes.
 
 Threads use shared memory by definition, because a threaded application
 is still one process.  No SYSV shm tricks are needed.
 
 Openmosix won't be able to balance mysql threads, because even if it
 were possible to synchronize shared memory between machines with Mosix,
 synching thread mutexes would be horrendously slow.  Better to just get
 a multi-CPU box.
 
 -- 
   Dan Nelson
   [EMAIL PROTECTED]
 


-- 


-
Philipp Steinkrueger
Oberberg Online Informationssysteme GmbH
Technik
http://www.oberberg.net

PGPkeyID: 690A9504
Key Fingerprint: 35CE 467E C813 06B0 B8E3  0275 2B1E E84A 690A 9504

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Problem reinstalling MySQL on Mac OS X

2003-03-19 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

thanks for reporting this. I assume, you used the MySQL package from
mysql.com?

On Thu, 6 Mar 2003, Perry Arnold wrote:

 I installed the MySQL binary (4.0.11-gamma package) on my Mac OS X
 machine (version 10.2.4) and I couldn't get it to start up. When I run
 bin/mysqld_safe, I kept getting the error Fatal error: Can't open
 privilege tables: Table 'mysql.host' doesn't exist [note: I later
 figured out that I *think* I'm getting this error because my machine
 does not have a recognizable hostname (i.e. you can't look it up via
 normal DNS)].

Hmm, this case is currently not properly handled, indeed. Thanks for the
hint! mysql_install_db simply aborts, if the host name cannot be resolved,
but the error does not get fed back to the installer itself...

 After mucking around for quite a while without much success, I decided
 to start over and reinstall from scratch. So, I deleted my mysql
 directory and reinstalled from the Package. Now, when I try to run
 bin/mysqld_safe, I get the following error: InnoDB:  Operating system
 error number 13 in a file operation. It looks like when you reinstall
 from the package, it skips the step where it changes file permissions of
 the data directory and its subdirectories.

 How-To-Repeat:

 On a fresh MacOS X 10.2.4 system, (1) install the 4.0.11-gamma package,
 (2) delete the mysql directories (the /usr/local/mysql link and
 /usr/local/mysql-standard-4.0.11-gamma-apple-darwin6.4-powerpc
 directory), (3) install the 4.0.11 package again, (4) run
 bin/mysqld_safe.

 Fix:
 Change the file permissions of the data directory and its
 subdirectories. Ideally, this would be fixed within the Package
 installer, but a release note or something would work as well.

This is interesting. Are you sure you removed all mysql directories in
/usr/local? The installation package includes a postinstall script, that
does the following:

[SNIP]
if cd /usr/local/mysql ; then
if [ ! -f data/mysql/db.frm ] ; then
./scripts/mysql_install_db
fi

if [ -d data ] ; then
chown -R mysql data
fi
else
exit $?
fi
[SNIP]

/usr/local/mysql is a symlink, pointing to the real installation directory
and is included in the package itself. So if you really removed all files,
the ownerships should have been set up correctly. Unfortunately it's very
hard to debug this problem, since the Package Installer does not offer any
logging functionality...

After looking through your mail again, I wonder how you tried to start
MySQL. Did you use sudo mysqld_safe, as described in the docs? If you
try it as a normal user (omitting sudo, the directory permissions and
ownerships indeed will give you a permission denied error message. This
is intentional!

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+eJjQSVDhKrJykfIRAu9eAJ9AWiSgVNOB9e3LMMxzllQ2VTNESQCfa/mg
/FXb3eaPfsHvOtK0zfPXqsg=
=glQe
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: [PATCH] 1 line fix for gen_lex_hash.cc

2003-03-19 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, 9 Mar 2003, SUGIOKA Toshinobu wrote:

 I found obvious bug that causes segmentation fault while building on
 sh-linux. Please apply.

 --- mysql-3.23.54a.orig/sql/gen_lex_hash.cc Thu Dec  5 18:37:06 2002
 +++ mysql-3.23.54a/sql/gen_lex_hash.cc  Sun Mar  9 10:13:36 2003
 @@ -274,7 +274,7 @@
   function_plus,function_mod);

int *prva= (int*) my_alloca(sizeof(int)*function_mod);
 -  for (i=0 ; i = function_mod; i++)
 +  for (i=0 ; i  function_mod; i++)
  prva[i]= max_symbol;

for (i=0;isize;i++)

Thanks, it was applied already:

http://mysql.bkbits.net:8080/mysql-3.23/[EMAIL PROTECTED]

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+eJqbSVDhKrJykfIRAmsvAJ9Rfp9ntOg2v7RJ1e7cGL9//u6QLACfTtR6
d713aDtQd5Ob4T8Y3fAbs4s=
=DHET
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: please rename dbug.h

2003-03-19 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Fri, 14 Mar 2003, Jonathan Stockley wrote:

 I've hit a problem on AIX 4.3 with mysql client include files. My app
 needs to include xcoff.h which includes dbug.h. The problem is that
 I also need to access mysql. It turns out that the mysql include
 directory also has a dbug.h which get pulled in instead of the systems
 file.

 The fix is simple, rename the mysql dbug.h to my_dbug.h and change the
 include in my_global.h to #include my_dbug.h instead.

 Rather than my having to fix this with every new mysql release I
 download, could you please consider making this change in the master
 codelines?  (ideally it would be nice if you prefixed all your header
 files with my_to avoid future clashes with system header files)

Thanks for pointing this out! Monty has now fixed it in the 4.0 tree and
it will be merged into 4.1 as well.

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+eJ33SVDhKrJykfIRAkaKAJ4/OuegSU/xfYVfr6mbOfH8YzTOTQCfd99P
iNQZsRcx9hObwwWhPtJdLMw=
=8Drb
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: OS X codewarrior libraries

2003-03-19 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

sorry for the late reply.

On Wed, 5 Mar 2003, ben nevile wrote:

  Please define not compatible. What exactly happens when you try to
  use them? Is there an error? Which version of MySQL/Code Warrior do
  you use?

 I am using the most up-to-date version of CodeWarrior, v8.3, and I have
 tried with several different versions of MySQL - 3.23.55, standard
 4.0.9, and standard 4.0.10.  CodeWarrior will not let me import the
 library files into my project.  In the compiler's documentation I read
 that on Mac OS a library has a file type of 'MPLF' and a creator of
 'CWIE'.  The distributed libraries have no creator or file type, but
 this makes sense because they are not Mac OS files.  If I manually munge
 the file's type and creator code to these values CodeWarrior will
 successfully import the file into the project, but compilation results
 in a Illegal object file data error.  So I am assuming that there is
 some deeper level of incompatibility between the format of the library
 files and what CodeWarrior expects to use.

Could it be because the MySQL files have been compiled with the GNU C
compiler gcc?

 So what are my options?  If nobody has a CodeWarrior version of the
 header files available, I am assuming I can attempt to compile one
 myself.  I downloaded a 4.0.10 gamma distribution which appears to have
 all the necessary source code.  I am a relative newbie to the world of
 unix-based programming - I've never even used the make utility before.
 Am I setting myself up for a world of pain?

To be honest, I've never tried to compile MySQL with the CodeWarrior
compiler - I'd be interested to hear how it went!

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+eKPASVDhKrJykfIRAmh3AJ4vQgwFfUexDwaPvTTQaCQ1x5iaDACeIFJ5
Iz9+Fd5U5Yn6p8DZieOLxCc=
=zRZc
-END PGP SIGNATURE-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Text formatting of articles pulled from database??

2003-03-19 Thread Landy Atkinson
I am setting u a simple article storage/retrieval system and have set 
up a MySQL database with a few VARCHAR fields for author, date, 
source and a BLOB field for article.  I have also set up two pages, 
one for editing/adding new articles and a second one for viewing the 
articles.

The adding/deleting page uses a FORM with TEXTAREA to allow 
someone to copy past the text into the article field.  This seems 
to work just fine and if I display the  text back in a FORM 
TEXTAREA field, formatting works as I expect.  Paragraphs are 
separated by a line of white space and the text wraps to the size of 
the TEXTAREA.

I am trying to display the article on a second page which is 
formatted to look nice.  I would like to avoid the borders and fixed 
height (with scroll bars) of the TEXTAREA field and instead put the 
text into an auto height table cell with fixed width=500 so the text 
still wraps nicely on the screen.  I've set up a table with 3 columns 
to allow me to display the title, author, date, etc. nicely at the 
top and then defined a table cell that spans the 3 columns to hold 
the article.

echo TD colspan=\3\ width=\532\P$article/P/TD;

The text displays, but the paragraph breaks are gone and all the text 
is just run together into one long paragraph.

Any suggestions on how to get $article to display and keep the white 
space between paragraphs that it has when displayed in a 
FORMTEXTAREA like

echo td colspan=6textarea name='article' rows='15' 
cols='120'$article/textarea/td;

For an example, see 
http://www.cobblekids.org/Pages/Articles/Article_View4b.php and click 
on an article title.

Thanks,
-Landy
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


RE: another table to query!

2003-03-19 Thread Andrew
I have done this and have now started to populate the items_city table with the
appropriate records what I now need to do is show the records using the city
items_table.  At the moment the records are dipslyed when a city is selected bu
the cityID is from the items table. Lie this:

$result=mysql_query(SELECT items.ItemSKU, items.ItemName,
items.ItemDescription, items.PostCode, items.Category, items.CityID,
items.CTelephone, items.ItemID, items.Cfax, items.Cemail, items.Caddress,
items.CTown, items.Cwww FROM items WHERE Category='$Category' and
CityID='$CityID' ORDER BY CityID);

Presumably I need to do a JOIN ?

Andrew

-Original Message-
From: Bruce Feist [mailto:[EMAIL PROTECTED]
Sent: 19 March 2003 16:53
To: [EMAIL PROTECTED]
Subject: Re: another table to query!


Andrew wrote:

I have just discovered through luck that I need to have the same record in
(table items) accessable if it is listed as being in more than one city (table
city).  Obviously I don't want to create new records for the same
item so it can
be displayed if it's in different cities.  Is the best way to do this
to create
a new table and call it reference_city with items.ItemID and
city.CityID as the
columns?


Yes, although I'd probably call it item_city to make it more obvious
what it is.

Bruce Feist




---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 17/03/2003



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Process Limit on Linux ?

2003-03-19 Thread Joseph Bueno
Hi,

You may get a signal 11 because mysqld process is running out of
virtual memory (instead of physical memory).
If you want to run 1500 simultaneous connections, you have to be very
careful on how mysqld allocates its memory:
Since you are on a 32bits system, a process is limited to 4Gb.
On Linux, these 4Gb are split in 3Gb user space/1Gb kernel space
and user space is split in 1Gb code segment/2Gb data segment.
So you have only 2Gb for all mysqld data.
You can get more info on how mysqld allocates memory at:
http://www.mysql.com/doc/en/Memory_use.html
and http://www.mysql.com/doc/en/InnoDB_start.html if you
have InnoDB.
As a rule of thumb,
execute 'show variables',
evaluate:
 key_buffer_size
   + innodb_additional_mem_pool_size
   + innodb_buffer_pool_size
   + innodb_log_buffer_size
   = global_data_size
 thread_stack
   + 2 * net_buffer_length (1 connection buffer, 1 result buffer)
   + record_buffer OR record_rnd_buffer (depends on table access method)
   + sort_buffer_size (if resultset needs to be sorted)
   = per_thread_data_size
and make sure that:
global_data_size + per_thread_data_size * nb_of_connections  2Gb
Although I have never run mysql with more than ~600 connections,
I have used this formula (a simplified version since I don't use
InnoDB) to allocate a key_buffer as big as possible and make sure
that I won't run out of memory.
Hope this helps,
Joseph Bueno
Philipp wrote:
Hi Dan,

i just talked about openmosix because i read about
shared memory segments. my only desire is to make mysql
able to spawn 1000-1500 connections and *not* to tell
my client cant create new thread, perhaps out of memory
while 1.5 GB of RAM is only used for caching. Is that really
possible that mysql is not able to handle this amount of connections ?
My best Regards,
Philipp
On Wed, 19 Mar 2003 10:01:38 -0600
Dan Nelson [EMAIL PROTECTED] wrote:

In the last episode (Mar 19), Philipp said:

thank you for your answer. While i was reading about clustering some
weeks ago i read the openmosix FAQ claiming that openmosix would not
work with apache, because apache was using shared memory to
communicate with its threads, and i always thought mysql is designed
the same way. Please someone correct me if i am wrong.
SYSV shared memory (shm*) is a block of memory that one process
creates, and depending on the access flags, multiple processes can
attach to and see each other's changes.
Threads use shared memory by definition, because a threaded application
is still one process.  No SYSV shm tricks are needed.
Openmosix won't be able to balance mysql threads, because even if it
were possible to synchronize shared memory between machines with Mosix,
synching thread mutexes would be horrendously slow.  Better to just get
a multi-CPU box.
--
Dan Nelson
[EMAIL PROTECTED]





-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


appending to longtext field

2003-03-19 Thread Mr Orange
Hello all,

I have a database with a type longtext called notes.

Say I wanted to append some text to this field, what command would I use?

I have tried the following sql..
  update clients set notes=notes+text to append where id=1;

But this doesn't seem to do the job.

I am new to MySQL so sorry if I've asked an obvious question!

Many thanks in advance,

Steve.


PS.  What is needed is a database to store notes on each client which can be
added to as necessary.  If anyone has a better idea of a way to do this, I'd
be very grateful for any help!  Cheers.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Restoring from a .sql file

2003-03-19 Thread Tab Alleman
MySQL 3.23.54, Win2k Server:

I am trying to take a .sql file that I got from a mysqldump from one
mysql server, and use it to populate a new mysql server, as though I
were restoring a backup after a total system crash.

I am using the following command, following the only example I could
find in the documentation (mysql prompt shown for clarity):

mysql mysql  u:/db backup 20030318/cm_central.sql;

But I get the following error message:

ERROR 1064: You have an error in your SQL syntax near 'mysql  u:/db
backup 2003
0318/cm_central.sql' at line 1

I'm going to try things like copying the file locally and taking the
spaces out of the folder name, but also just wanted to ask if I'm even
on the right track here.  Is this the correct way to import from a .sql
file?

Thanks,
Tab

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Text formatting of articles pulled from database??

2003-03-19 Thread Stefan Hinz
Landy,

 echo TD colspan=\3\ width=\532\P$article/P/TD;

 The text displays, but the paragraph breaks are gone and all the text 
 is just run together into one long paragraph.

In PHP, you can use nl2br(), like:

echo TD colspan=\3\ width=\532\P.nl2br($article)./P/TD;

This will replace \n (the new-line character that makes that line
break in TEXTAREA) by br/. If you're a maniac (like I am) you can
even do:

echo TD colspan=\3\ width=\532\P
 .str_replace(nl2br($article),br/,/pp
 style=\text-indent:10px\)
 ./P/TD;

Or something similar to that.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Process Limit on Linux ?

2003-03-19 Thread Dan Nelson
In the last episode (Mar 19), Philipp said:
 i just talked about openmosix because i read about shared memory
 segments. my only desire is to make mysql able to spawn 1000-1500
 connections and *not* to tell my client cant create new thread,
 perhaps out of memory while 1.5 GB of RAM is only used for caching.
 Is that really possible that mysql is not able to handle this amount
 of connections ?

With appropriate tuning you should be able to handle that amount. Check
the list archives; there have been many posts showing how to adjust
Linux's limits to allow for lots of threads.

-- 
Dan Nelson
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Text formatting of articles pulled from database??

2003-03-19 Thread Henning Heil
 Landy Atkinson wrote on 19.03.2003 18:14 

...


echo TD colspan=\3\ width=\532\P$article/P/TD;

The text displays, but the paragraph breaks are gone and all the text 
is just run together into one long paragraph.

Any suggestions on how to get $article to display and keep the white 
space between paragraphs that it has when displayed in a 
FORMTEXTAREA like

echo td colspan=6textarea name='article' rows='15' 
cols='120'$article/textarea/td;

For an example, see 
http://www.cobblekids.org/Pages/Articles/Article_View4b.php and click 
on an article title.

Thanks,
-Landy 


Landy,

I think this is far more a php/html than a MySQL problem, I don't 
remember the code exactly but try playing around with the php-function 
htmlspecialchars (or similar) before inserting into DB / echo-ing out 
the article and you'll hopefully find a solution soon.

Rgds,

Henning

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: appending to longtext field

2003-03-19 Thread GV
I think is better to have an additional record each time a user inserts 
new information

Mr Orange wrote:
Hello all,

I have a database with a type longtext called notes.

Say I wanted to append some text to this field, what command would I use?

I have tried the following sql..
  update clients set notes=notes+text to append where id=1;
But this doesn't seem to do the job.

I am new to MySQL so sorry if I've asked an obvious question!

Many thanks in advance,

Steve.

PS.  What is needed is a database to store notes on each client which can be
added to as necessary.  If anyone has a better idea of a way to do this, I'd
be very grateful for any help!  Cheers.
-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Re: another table to query!

2003-03-19 Thread Bruce Feist
Andrew wrote:

I have just discovered through luck that I need to have the same record in
(table items) accessable if it is listed as being in more than one city (table
city).  Obviously I don't want to create new records for the same item so it can
be displayed if it's in different cities.  Is the best way to do this to create
a new table and call it reference_city with items.ItemID and city.CityID as the
columns?


Yes, although I'd probably call it item_city to make it more obvious
what it is.
Bruce Feist

PS If you specify sql,query,queries, or smallint in a message to this 
mailing list, it doesn't get nuked as spam!





-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: another table to query!

2003-03-19 Thread Bruce Feist
Andrew wrote:

I have done this and have now started to populate the items_city table with the
appropriate records what I now need to do is show the records using the city
items_table.  At the moment the records are displayed when a city is selected bu
the cityID is from the items table. Like this:
$result=mysql_query(SELECT items.ItemSKU, items.ItemName,
items.ItemDescription, items.PostCode, items.Category, items.CityID,
items.CTelephone, items.ItemID, items.Cfax, items.Cemail, items.Caddress,
items.CTown, items.Cwww FROM items WHERE Category='$Category' and
CityID='$CityID' ORDER BY CityID);
Presumably I need to do a JOIN ?
 

Yes.  It should look something like:

SELECT i.ItemSKU, i.ItemName, i.ItemDescription, i.PostCode, i.Category,   ic.CityID, i.CTelephone, i.ItemID, i.Cfax, i.Cemail, i.Caddress, i.CTown, i.Cwww 
FROM items i Inner Join item_city ic ON ic.ItemID = i.ItemID
WHERE i.Category='$Category' and ic.CityID='$CityID' 
ORDER BY ic.CityID

Note that if you're just looking for a single CityID, there's no reason 
to ORDER BY it, and little reason to SELECT it.

Also, now that you have the item_city table, you can and should remove 
city_id from items.  If you have a significant amount of data already 
entered, you might want to copy the cityid/itemid information from items 
into item_city first.

Bruce Feist



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Restoring from a .sql file

2003-03-19 Thread Ryan Fox
On Wednesday 19 March 2003 12:31 pm, Tab Alleman wrote:
 I am using the following command, following the only example I could
 find in the documentation (mysql prompt shown for clarity):

 mysql mysql  u:/db backup 20030318/cm_central.sql;

Run this from a command line, not the mysql client.

Ryan


sql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Restoring from a .sql file

2003-03-19 Thread Paul DuBois
At 12:31 -0500 3/19/03, Tab Alleman wrote:
MySQL 3.23.54, Win2k Server:

I am trying to take a .sql file that I got from a mysqldump from one
mysql server, and use it to populate a new mysql server, as though I
were restoring a backup after a total system crash.
I am using the following command, following the only example I could
find in the documentation (mysql prompt shown for clarity):
mysql mysql  u:/db backup 20030318/cm_central.sql;

But I get the following error message:

ERROR 1064: You have an error in your SQL syntax near 'mysql  u:/db
backup 2003
0318/cm_central.sql' at line 1
I'm going to try things like copying the file locally and taking the
spaces out of the folder name, but also just wanted to ask if I'm even
on the right track here.  Is this the correct way to import from a .sql
file?
Nope.  But you knew that already! :-)

If you're in mysql already, use the SOURCE command:

mysql SOURCE filename;

But that may not work with a filename that has colons, slashes, spaces, etc.

The  syntax can be used, but that's for use from the command line
prompt.  For example:
C:\ mysql  u:\db backup 20030318\cm_central.sql

Note that in this case you use backslashes.  I imagine you'll also
have to put quotes around the filename if it contains spaces.
--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


RE: Strange problem on the difference of mysql connection between cgi and shell

2003-03-19 Thread Jennifer Goodie
It is not strange, it is expected behavior.  A browser can only handle so
many lines of html before getting all wonky.  Running a query that takes
over 5 minutes to run in a web application is a bad idea, no one is going to
want to sit there and wait for it and if there is no output for an extended
period of time newer browsers will be helpful and re-request the page,
causing lock issues and such.  I would suggest trying to speed up the query,
you need to make sure you are using indexes. or you might need to use
summary tables.  You will also want to only display a portion of your result
set at a time as 10,000 records is probably going to crash browsers.  You
will also need to flush output to prevent the browser from re-requesting,
you also might want to put something in to prevent the user from hitting
reload (such as checking at the beginning to see if the query is already
running, most of the time web users do not understand that for every time
they hit reload their wait time is going to increase.



-Original Message-
From: Liu Haifeng [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Strange problem on the difference of mysql connection between
cgi and shell


Hi,

I am coding a cgi program to query the records from the mysql tables.  When
I execute the sql query (which is a join operation on two tables) in the
mysql shell, the results are shown correctly.  However, if I use cgi script
to execute the same query, the web browser just crashed after a while (5 or
6 minutes which is the same as the query execution time ).   I am guessing
the problem is relevant to the larger result (more than 10,000 records),
because if I execute the query against another two tables which have the
same structure but contain the less records, both cgi script and shell
method can work.

So anybody can help me figure out the problem?  I have adjusted the
configuration of mysqld to be a huge one but still failed.

Regards
Haifeng Liu


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Custom Authentication Mechanisms

2003-03-19 Thread Joe Lewis
Hello, all!

I would like to alter MySQL in the following manner :
  - If the standard MySQL [PASSWORD()] fails, use PAM to auth
  - If the user is authenticated using PAM :
  - If a database does not exist of the users name, create it
  - Restrict the datamanipulation to that specific database
I know, some of these ideas may be way out in left field, but I am 
handling some dynamic web hosting and do not want the users' to be able 
to view each others tables and data.  But, at the same time, I don't 
want to have to enter in the data for every user if they request MySQL 
access.

My questions are :
  - has this already been implemented anywhere?  (If so, how)
  - If not implemented, which files in the source code would have to be 
altered?

Joe

ReliaNet
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Can't Load Data Into The Database With Operator

2003-03-19 Thread Yasen Petrov
Hello,

I'm using Win98 OS and MySQL 3.23.39-max. Now, I'm trying to load data from
the DOS Prompt into a new database (samp_db):

samp_db  create_president.sql

and it returns ERROR 1064: you have an error in your sql syntax near
'samp_db  create_president.sql' at line 1

Any ideas will be highly appreciated.

Yasen


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Can't Load Data Into The Database With Operator

2003-03-19 Thread Paul DuBois
At 20:57 +0100 3/19/03, Yasen Petrov wrote:
Hello,

I'm using Win98 OS and MySQL 3.23.39-max. Now, I'm trying to load data from
the DOS Prompt into a new database (samp_db):
samp_db  create_president.sql

and it returns ERROR 1064: you have an error in your sql syntax near
'samp_db  create_president.sql' at line 1
Any ideas will be highly appreciated.
You're running this from within mysql.  Run this command from the
DOS prompt:
C:\ mysql samp_db  create_president.sql

Or else run this command:

C:\ mysql samp_db

and then within mysql use this command:

mysql SOURCE create_president.sql;

--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Can't Load Data Into The Database With Operator

2003-03-19 Thread Joe Lewis
I know DOS doesn't have a cat command, so try :

  type create_president.sql  samp_db

Or have I been out of the DOS world too long?

Joe

Yasen Petrov wrote:
Hello,

I'm using Win98 OS and MySQL 3.23.39-max. Now, I'm trying to load data from
the DOS Prompt into a new database (samp_db):
samp_db  create_president.sql

and it returns ERROR 1064: you have an error in your sql syntax near
'samp_db  create_president.sql' at line 1
Any ideas will be highly appreciated.

Yasen

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


RE: Restoring from a .sql file

2003-03-19 Thread Tab Alleman
Thanks for the replies, Ryan and Paul.

I tried the suggestion of using the command prompt, and it did attempt
to run the .sql file.  That's when it *really* gets troublesome:

C:\mysql\bin mysql  \mysql\cm_central.sql
ERROR 1049 at line 7: Unknown database '`cm_central`'

Line 7 is:
USE `cm_central`;

And yet, the database is there:

mysql show databases;
++
| Database   |
++
| cm_central |
| dev_central|
| dev_hotel_data |
| isl_central|
| mysql  |
| test   |
++
6 rows in set (0.00 sec)

Any ideas why MySQL doesn't like me today?


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Can't Load Data Into The Database With Operator

2003-03-19 Thread Tab Alleman
Hehe.. I just got past this problem and on to the next.  You need to
make sure you are executing the command from a DOS prompt..the response
you got indicates (I'm pretty sure) that you are executing it from a
mysql prompt (ie: a mysql client prompt).

Yasen Petrov wrote:
 Hello,
 
 I'm using Win98 OS and MySQL 3.23.39-max. Now, I'm trying to
 load data from the DOS Prompt into a new database (samp_db):
 
 samp_db  create_president.sql
 
 and it returns ERROR 1064: you have an error in your sql
 syntax near 'samp_db  create_president.sql' at line 1
 
 Any ideas will be highly appreciated.
 
 Yasen
 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Process Limit on Linux ?

2003-03-19 Thread walt
On Wednesday 19 March 2003 12:38 pm, Dan Nelson wrote:
 In the last episode (Mar 19), Philipp said:
  i just talked about openmosix because i read about shared memory
  segments. my only desire is to make mysql able to spawn 1000-1500
  connections and *not* to tell my client cant create new thread,
  perhaps out of memory while 1.5 GB of RAM is only used for caching.
  Is that really possible that mysql is not able to handle this amount
  of connections ?

 With appropriate tuning you should be able to handle that amount. Check
 the list archives; there have been many posts showing how to adjust
 Linux's limits to allow for lots of threads.

I just saw in the latest mysql manual (downloaded per page html tarball) in 
the linux installation notes a discussion on linux threads. The html file is 
manual_Installing.html#Linux


-- 
Walter Anthony
System Administrator
National Electronic Attachment
Atlanta, Georgia 
1-800-782-5150 ext. 1608
 If it's not broketweak it

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



AUTO_INCREMENT Columns reacting differently to MyODBC

2003-03-19 Thread Andrew Kuebler
In one of my tables, I have an AUTO_INCREMENT column that changes to
#Deleted in each column in Access when I add a new record. To read the
data, I just entered, I must close the table and then reopen it. In
another table when I do the same thing, I see the new AUTO_INCREMENT
number come up in the record after I add it and I can read the data
without closing and reopening it.

I think this probably has something to do with my one table being
created in an older version of MySQL... I'm currently running 4.0.9.
What must I do to make the first table react like the second table?

Thank you in advance!

Andrew

Sql, query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



The MySQL Backup problem

2003-03-19 Thread Dyego Souza do Carmo
Hi,

 

I am developing a mySql Backup software and I intend to develop two
different options for backup: Complete and Incremental, where Complete means
the full copy of a database, and Incremental means that only the log file
have to be copied. The logic is the follow:



Once a week, my customers will make a complete copy of their databases to a
DAT streamer or other media they can choose, and every day they will make an
incremental copy of their databases. In case of database damage, they will
be able to restore the full copy they had made and run the log file in their
hard disk. But, if the log file was not found, then the backed up log will
be used to restore the database as closed to its last state as it could be
restored.



The main problem I am experiencing is that mySql is not able to make
different log files for each database. This way I am obliged to copy all the
databases every time I start a backup, because if the user had to use the
restore option, only one single log will be executed, and it has the SQL
statements used in all the databases in my server.



I really would like that mySql had an option to make different log files for
each database. Is it possible to be developed for the mySql team? And how
long will it take you to come out this feature?



Thanks in advance,


P.S.: I intend to make this software and its source code available for free.
Then I expect you could download and enjoy it when it was ready.

sql,query
-
  ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento   
-
 E S C R I B A   I N F O R M A T I C A
-
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
--ICQ   : 221602060
$ look into my eyes Phone : +55 041 296-2311  r.112
look: cannot open my eyes Fax   : +55 041 296-6640
-
   Reply: [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Can't Load Data Into The Database With Operator

2003-03-19 Thread Yasen Petrov
how to ececute it from dos prompt as long as I have to connect to mysql
first. so i'll have mysql prompt anyway. please give me a better
explanation. thank you


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: OS X codewarrior libraries

2003-03-19 Thread ben nevile
To be honest, I've never tried to compile MySQL with the CodeWarrior
compiler -
it sounds like nobody has!  i guess i'll be the guinea pig.


I'd be interested to hear how it went!
i'll be sure to let everyone know (ie, gloat) if I am successful.

Ben

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: optimizer bug in the index used by mysql/Innodb in the search

2003-03-19 Thread Peter Zaitsev
On Tue, 2003-03-18 at 21:38, [EMAIL PROTECTED] wrote:
  Description:
 
  Hello Peter,
 
  Have you explained to Heikki this problem?
  Have you fixed it?
 
  Please, tell me about it.
 

Dear Rafarife,

This problem is qualified as wrong optimizer plan selection.
Happily you can select proper plan by using FORCE INDEX() clause.

We will improve optimizer to handle this case, but I can't promise you 
how soon this would happen - it is very tricky task as you need to make
sure your changes do not worsen behavior in other cases.

Also I would recommend you to posting your message to most appropriate
mailing list instead of both. Many users are subscribed to both mailing
list and they will get your message twice. 


-- 
 MySQL 2003 Users Conf. - http://www.mysql.com/events/uc2003/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /   Peter Zaitsev [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
 /_/  /_/\_, /___/\___\_\___/   Moscow, Russia
___/   www.mysql.com   


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Restoring from a .sql file

2003-03-19 Thread Paul DuBois
At 14:07 -0500 3/19/03, Tab Alleman wrote:
Thanks for the replies, Ryan and Paul.

I tried the suggestion of using the command prompt, and it did attempt
to run the .sql file.  That's when it *really* gets troublesome:
C:\mysql\bin mysql  \mysql\cm_central.sql
ERROR 1049 at line 7: Unknown database '`cm_central`'
Line 7 is:
USE `cm_central`;
And yet, the database is there:

mysql show databases;
++
| Database   |
++
| cm_central |
| dev_central|
| dev_hotel_data |
| isl_central|
| mysql  |
| test   |
++
6 rows in set (0.00 sec)
Any ideas why MySQL doesn't like me today?
Try omitting the backticks from the database name.

mysql has a slightly different parser than the server and that may
be causing you a problem with the USE statement.
--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


RE: Restoring from a .sql file

2003-03-19 Thread Tab Alleman
Paul DuBois wrote:
 Line 7 is:
 USE `cm_central`;

 Try omitting the backticks from the database name.
 
 mysql has a slightly different parser than the server and
 that may be causing you a problem with the USE statement.

Thanks again Paul, that did the trick...which is kind of a BitterSweet
thing, actually...

Mysqldump puts the backticks in by default, and then mysql  file.sql
chokes on the backticks by default.

Is there any way to tweak either of these two steps to get them work
together without my having to manually remove the backticks from the
.sql file?  If not, I think it would make a great new feature in a
future version.

Tab mysql, sql

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: fulltext search

2003-03-19 Thread Heikki Tuuri
Sidar,

- Original Message - 
From: Sidar Lopez Cruz [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, March 18, 2003 10:50 PM
Subject: fulltext search


 
 
 
 
 when MySQL will support fulltext search on InnoDB tables?

we are still waiting for some customer to sponsor the porting.

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, hot backup, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-4.0 from http://www.mysql.com

sql query





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: another table to query!

2003-03-19 Thread Andrew
ok this is making sense and I should have thought about this before* I created
my city table  as now I have a city table that in effect is useless and
comlicated the existing queries :(

A lesson to be learnt indeed.

-Original Message-
From: Bruce Feist [mailto:[EMAIL PROTECTED]
Sent: 19 March 2003 17:59
Cc: MySQL-Lista
Subject: Re: another table to query!


Andrew wrote:

I have done this and have now started to populate the items_city
table with the
appropriate records what I now need to do is show the records using the city
items_table.  At the moment the records are displayed when a city is
selected bu
the cityID is from the items table. Like this:

$result=mysql_query(SELECT items.ItemSKU, items.ItemName,
items.ItemDescription, items.PostCode, items.Category, items.CityID,
items.CTelephone, items.ItemID, items.Cfax, items.Cemail, items.Caddress,
items.CTown, items.Cwww FROM items WHERE Category='$Category' and
CityID='$CityID' ORDER BY CityID);

Presumably I need to do a JOIN ?


Yes.  It should look something like:

SELECT i.ItemSKU, i.ItemName, i.ItemDescription, i.PostCode,
i.Category,   ic.CityID, i.CTelephone, i.ItemID, i.Cfax, i.Cemail,
i.Caddress, i.CTown, i.Cwww
FROM items i Inner Join item_city ic ON ic.ItemID = i.ItemID
WHERE i.Category='$Category' and ic.CityID='$CityID'
ORDER BY ic.CityID

Note that if you're just looking for a single CityID, there's no reason
to ORDER BY it, and little reason to SELECT it.

Also, now that you have the item_city table, you can and should remove
city_id from items.  If you have a significant amount of data already
entered, you might want to copy the cityid/itemid information from items
into item_city first.

Bruce Feist



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 17/03/2003



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Query Help

2003-03-19 Thread Andrew
Hi All MySQL guru's

I have a query that I need some help with. I have put into operation a setup
that needs to be chnaged and could do with a little help before the Db get any
bigger.  It's only a small MySQL DB at the moment but will grow so I need to get
this right now before it gets bigger.

Andrew


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Column comment

2003-03-19 Thread Ruvinskiy, Ray
Hi,

I am aware of the fact that with 4.1.0, you can specify comments on a column
by column by basis. I was wondering if this functionality could somehow be
simulated in 4.0.x? It is high priority for me, but I cannot deploy the
alpha stage 4.1.0 in a production environment.

Basically, what I would like to do is associate a human readable label with
each column (in the comment field) so that I can automatically generate
web-based forms for any given table. The script would look at the column's
metadata, display the appropriate HTML element, and display the
corresponding label read from the column field.

Is there any way this can be accomplished with MySQL 4.0.12?

Thanks,

Ray


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Can't Load Data Into The Database With Operator

2003-03-19 Thread Paul DuBois
At 21:21 +0100 3/19/03, Yasen Petrov wrote:
how to ececute it from dos prompt as long as I have to connect to mysql
first. so i'll have mysql prompt anyway. please give me a better
explanation. thank you
Uh, sorry.  Apparently you didn't even *try* to use the instructions
given, so I will just repeat them below.  If you try them and they don't
work, then please indicate what happened.  Note that you *don't* have
to connect to mysql first.
At 20:57 +0100 3/19/03, Yasen Petrov wrote:
Hello,

I'm using Win98 OS and MySQL 3.23.39-max. Now, I'm trying to load data from
the DOS Prompt into a new database (samp_db):
samp_db  create_president.sql

and it returns ERROR 1064: you have an error in your sql syntax near
'samp_db  create_president.sql' at line 1
Any ideas will be highly appreciated.
You're running this from within mysql.  Run this command from the
DOS prompt:
C:\ mysql samp_db  create_president.sql

Or else run this command:

C:\ mysql samp_db

and then within mysql use this command:

mysql SOURCE create_president.sql;

--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


RE: Restoring from a .sql file

2003-03-19 Thread Paul DuBois
At 14:56 -0500 3/19/03, Tab Alleman wrote:
Paul DuBois wrote:
 Line 7 is:
 USE `cm_central`;

 Try omitting the backticks from the database name.

 mysql has a slightly different parser than the server and
 that may be causing you a problem with the USE statement.
Thanks again Paul, that did the trick...which is kind of a BitterSweet
thing, actually...
Mysqldump puts the backticks in by default, and then mysql  file.sql
chokes on the backticks by default.
Is there any way to tweak either of these two steps to get them work
together without my having to manually remove the backticks from the
.sql file?  If not, I think it would make a great new feature in a
future version.
Tab mysql, sql
It appears that this particular problem is fixed in 4.1.
I'll report the problem for 4.0; maybe it will get fixed there as well.
--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: The MySQL Backup problem

2003-03-19 Thread Paul DuBois
At 16:11 -0300 3/19/03, Dyego Souza do Carmo wrote:
Hi,



I am developing a mySql Backup software and I intend to develop two
different options for backup: Complete and Incremental, where Complete means
the full copy of a database, and Incremental means that only the log file
have to be copied. The logic is the follow:


Once a week, my customers will make a complete copy of their databases to a
DAT streamer or other media they can choose, and every day they will make an
incremental copy of their databases. In case of database damage, they will
be able to restore the full copy they had made and run the log file in their
hard disk. But, if the log file was not found, then the backed up log will
be used to restore the database as closed to its last state as it could be
restored.


The main problem I am experiencing is that mySql is not able to make
different log files for each database. This way I am obliged to copy all the
databases every time I start a backup, because if the user had to use the
restore option, only one single log will be executed, and it has the SQL
statements used in all the databases in my server.


I really would like that mySql had an option to make different log files for
each database. Is it possible to be developed for the mySql team? And how
long will it take you to come out this feature?
Perhaps you could use the --database option to mysqlbinlog to generate
per-database logs.
--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Query Help

2003-03-19 Thread Ryan McDougall
--- Andrew [EMAIL PROTECTED] wrote:
 Hi All MySQL guru's
 
 I have a query that I need some help with. I have put into operation a setup
 that needs to be chnaged and could do with a little help before the Db get
 any
 bigger.  It's only a small MySQL DB at the moment but will grow so I need to
 get
 this right now before it gets bigger.
 
 Andrew

Well you're gonna need to describe things a little better. Saying you need help
with a query with out posting it or the table descriptions isn't going to do
anyone any good.

Ryan

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Error 1030 during import batch

2003-03-19 Thread Tab Alleman
Me again, new problem further down the same road:

C:\mysql\binmysql  \dev_hotel_data.sql
ERROR 1030 at line 73106: Got error 28 from table handler

C:\mysql\binmysql  \dev_hotel_data.sql
ERROR 1030 at line 74097: Got error 28 from table handler  

Yes, just as it looks, the same error occurred on subsequent runs of the
same exact batch file.  I didn't make any changes to the file or
anything else between the two runs; I just ran it once, got the error
and ran it again.  And yet, the error occurs at two different points,
supporting my theory that there's nothing wrong with the code being
executed.  Both lines are simple INSERT statements that work fine when
run by themselves.  Is this a hardware limitation?  A MySQL limitation?
When I checked the MySQL.err file after each attempt, nothing was
recorded about either error.  Searching for 1030 in the documentation
produces nothing.

Anybody got a clue as to what could be causing it, and/or what I can do
about it?

Tab

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Error 1030 during import batch

2003-03-19 Thread Paul DuBois
At 17:18 -0500 3/19/03, Tab Alleman wrote:
Me again, new problem further down the same road:

C:\mysql\binmysql  \dev_hotel_data.sql
ERROR 1030 at line 73106: Got error 28 from table handler
C:\mysql\binmysql  \dev_hotel_data.sql
ERROR 1030 at line 74097: Got error 28 from table handler 
Yes, just as it looks, the same error occurred on subsequent runs of the
same exact batch file.  I didn't make any changes to the file or
anything else between the two runs; I just ran it once, got the error
and ran it again.  And yet, the error occurs at two different points,
supporting my theory that there's nothing wrong with the code being
executed.  Both lines are simple INSERT statements that work fine when
run by themselves.  Is this a hardware limitation?  A MySQL limitation?
When I checked the MySQL.err file after each attempt, nothing was
recorded about either error.  Searching for 1030 in the documentation
produces nothing.
Anybody got a clue as to what could be causing it, and/or what I can do
about it?
Tab
Get a bigger disk?

C:\ perror 28
Error code  28:  No space left on device
--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Help with Query

2003-03-19 Thread Daren Cotter
Thanks, this works great in the MySQL server...I guess
I've never used temp tables before, but when I try to
run this in a PHP script, I get table does not
exist. How do I do this?

--- Harald Fuchs [EMAIL PROTECTED]
wrote:
 In article
 [EMAIL PROTECTED],
 Daren Cotter [EMAIL PROTECTED] writes:
 
  I have a table that keeps track of when members of
 my
  site are mailed. The important fields in the table
  are: member_id, mail_id
 
  I need to write a query that will return the # of
  members and # of mailings, like the table below:
 
  # of mailings sent # of members
  ---
  1  10,000
  2  20,000
  ......
 
  Meaning, there are 10,000 members that have been
 sent
  1 mailing, and 20,000 members that have been sent
 2
  mailings.
 
  Is this possible in one query?
 
 I'd do it like that:
 
   SELECT nmails, COUNT(member_id)
   FROM (
 SELECT member_id, COUNT(mail_id) AS nmails
 FROM tbl1
 GROUP BY member_id
) AS nm
   GROUP BY nmails;
 
 Since MySQL versions  4.1.0 don't know about
 derived tables, you'd need a
 workaround:
 
   CREATE TEMPORARY TABLE nm
   SELECT member_id, COUNT(mail_id) AS nmails FROM
 tbl1 GROUP BY member_id;
 
   SELECT nmails, COUNT(member_id) AS nmem
   FROM nm
   GROUP BY nmails;
 
 
 [Filter fodder: SQL query]
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail

[EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: another table to query!

2003-03-19 Thread Bruce Feist
Andrew wrote:

ok this is making sense and I should have thought about this before* I created
my city table  as now I have a city table that in effect is useless and
comlicated the existing queries :(
Well, your city table probably isn't useless... it can be used to 
translate city IDs into city names.

A lesson to be learnt indeed.

Everything is g.

Bruce



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Problems with the api c++

2003-03-19 Thread Warren Young
Tuomas Heroja wrote:
I have red hat 8.0, gcc-3.2-7, gcc-c++-3.2-7 and
mysql++-1.7.9-3.rh8x.i386.rpm. When I use the command
g++ -I/usr/include/sqlplus myfirstdatabaseprogram.cpp, I get
several basic errors concerning the include file sqlplus.hh
Right now, MySQL++ isn't very well tuned for modern C++ environments
like g++ 3.x.  The best thing to do is to download the source code,
apply the two GCC 3.x patches.  You may also wish to search out my 
custom.pl patch on the MySQL++ mailing list or ask me to email it to 
you, because that kills a whole bunch of warnings when building 
custom-macros.hh with g++ 3.x.  (I tried to post it to the list but the 
mailing list software rejects messages with attachments.)

With these patches applied, build and install the library.  You'll get 
some warnings, but don't worry about them.

Next, when building code that uses the library, use the -Wno-deprecated
flag to suppress warnings about uses of old pre-Standard header names
and such.
With all of this in place, you shouldn't be getting any warnings any
more.  If you do, send the compiler output to the list so that those
interested in fixing the problem have enough information to do so.  The 
deprecated C++ warnings will be fixed in 1.8.0, but that won't be out 
for a while yet.

You should send such messages to the MySQL++ mailing list, by the way.
It's a very low-volume list, so don't worry about subscribing to it.
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


New UNION ALL and problem with ORDER BY ?

2003-03-19 Thread Mike Lemke
Hello MySQL Guru's-
This is regarding UNION support in MySQL 4.0.12.

The query below is attempting to return rows that can
be easily parsed for the purposes of creating XML. 
The ORDER BY is not being processed properly at the
end of the query.  Sample scripts are shown below, to
setup the DB and test the query.

The query should result in a heirarchy of rows, so
that the Tag column should have a sequence of:
1,2,3,3,3,3,2,3,2,3,3,3

MySQL instead returns an unsorted list:
1,2,2,2,3,3,3,3,3,3,3,3

Does anyone know how to get the UNION to actually
ORDER BY properly?



Here is DB setup script:


CREATE DATABASE UnionTestDB;
USE UnionTestDB;

CREATE TABLE Users (
UserID int NOT NULL ,
FirstName varchar (32) NOT NULL ,
LastName varchar (32) NOT NULL 
) 
;

CREATE TABLE Cars (
CarID int NOT NULL ,
UserID int NOT NULL ,
Details varchar (64) NULL 
) 
;

CREATE TABLE Trips (
TripID int NOT NULL ,
CarID int NOT NULL ,
Mileage int NULL 
)
;


Here is Init DB script:


INSERT INTO Cars (CarID, UserID, Details) VALUES (1,
2, 'Ford');
INSERT INTO Cars (CarID, UserID, Details) VALUES (2,
2, 'Toyota');
INSERT INTO Cars (CarID, UserID, Details) VALUES (3,
2, 'Honda');
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (1,
1, 123);
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (2,
1, 450);
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (3,
1, 798);
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (4,
1, 27);
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (5,
2, 58);
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (6,
3, 1200);
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (7,
3, 1222);
INSERT INTO Trips (TripID, CarID, Mileage) VALUES (8,
3, 377);
INSERT INTO Users (UserID, FirstName, LastName) VALUES
(1, 'Ted', 'Smith');
INSERT INTO Users (UserID, FirstName, LastName) VALUES
(2, 'Sally', 'Jackson');
INSERT INTO Users (UserID, FirstName, LastName) VALUES
(3, 'Meg', 'Ryan');
INSERT INTO Users (UserID, FirstName, LastName) VALUES
(4, 'Tony', 'Curtis');

-
Finally, here is the UNION ALL query:
-

SELECT  1 AS Tag, 
NULL AS Parent,
Users.UserIdAS 'User!1!UserID!hide',
Users.FirstName AS 'User!1!FirstName',
Users.LastName  AS 'User!1!LastName',
NULLAS 'Cars!2!CarID!hide',
NULLAS 'Cars!2!Details',
NULLAS 'Trips!3!TripID!hide',
NULLAS 'Trips!3!Mileage'
FROM Users 
WHERE Users.UserId='2'

UNION ALL

SELECT  2, 
1,
Users.UserId,
NULL,
NULL,
Cars.CarID,
Cars.Details,
NULL,
NULL
FROM Cars
INNER JOIN Users ON Cars.UserID = Users.UserID 
WHERE Users.UserId='2'

UNION ALL

SELECT  3, 
2,
Users.UserId,
NULL,
NULL,
Cars.CarID,
NULL,
Trips.TripID,
Trips.Mileage
FROM Trips
INNER JOIN Cars ON Trips.CarID = Cars.CarID 
INNER JOIN Users ON Cars.UserID = Users.UserID 
WHERE Users.UserId='2'

ORDER BY 'Cars!2!CarID!hide', 
 'User!1!UserID!hide',
 Tag
;


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Column comment / metadata tables

2003-03-19 Thread Stephen Brownlow
 Basically, what I would like to do is associate a human readable label
with
 each column (in the comment field) so that I can automatically generate
 web-based forms for any given table. The script would look at the column's
 metadata, display the appropriate HTML element, and display the
 corresponding label read from the column field.

MySQL could do something that would make MySQL more complete and more able
to satisfy these Codd rules:
0. A relational database must be able to manage databases entirely through
its relational capabilities.
1. The Information Rule. All information in a relational database (including
table and column names) is represented explicitly as values in tables.

The metadata would be loaded into tables (real, virtual, heap or
temporary?). It would be refreshed as necessary by mysqld, when processing
ALTER, DROP, CREATE, etc.

Normal SELECTs would be used to efficiently view those metadata tables.

Why should it be necessary for tools such as MySQLfront to use?:
SHOW TABLE STATUS, SHOW FIELDS FROM table, SHOW KEYS FROM table.

Thanks,
Stephen



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: MySQL 4.0.12

2003-03-19 Thread Stephen Tiano
Re: this latest version of MySQL. Has anyone installed a production 
version of MySQL 4 on the Macintosh platform yet? Anything significant 
to report? Advice not to do it yet?

Thank you.

Steve Tiano

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: MySQL 4.0.12

2003-03-19 Thread Paul DuBois
At 19:38 -0500 3/19/03, Stephen Tiano wrote:
Re: this latest version of MySQL. Has anyone installed a production 
version of MySQL 4 on the Macintosh platform yet? Anything 
significant to report? Advice not to do it yet?
You can't use BDB tables.

Thank you.

Steve Tiano


--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


JDBC Question [Using Multiple databases]

2003-03-19 Thread Mark C. Roduner, Jr.
Scenario:
The current JDBC Connection is

jdbc:mysql//localhost:3306/=xql?user=rootpassword=myrootpass
The database `xql` contains 1 table, `settings`
Another database, `login` contains 1 table, `users`
'm' is a Matcher Object, that contains the users Name in $1, and
Domain in $2
Code: 
pre
13) String sqlString = ;
14) sqlString += SELECT * FROM `users` WHERE `user`=' +
m.group(1);
15) sqlString += ' AND `domain`=' + m.group(2)+' AND
`pass`=PASSWORD( + password + );
16) ResultSet logins =
rootConnection.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY).executeQuery(sqlString);
/pre

Error Message:
General error,  message from server: Table 'xqlServer.users'
doesn't exist
java.sql.SQLException: General error,  message from server:
Table 'xqlServer.users' doesn't exist
at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1628)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:917)
at
com.mysql.jdbc.Connection.execSQL(Connection.java:1806)
at
com.mysql.jdbc.Connection.execSQL(Connection.java:1740)
at
com.mysql.jdbc.Statement.executeQuery(Statement.java:1220)
at LoginDaemon.LoginUser(LoginDaemon.java:16)
at XQLServer.authLoop(XQLServer.java:103)
at XQLServer.run(XQLServer.java:121)
at java.lang.Thread.run(Unknown Source)
Question:
Seeing that my method obviously fails, is there any way to make
the MySQL JDBC driver allow SQL queries to use a database other than
the current one? (Other than using 'USE [DATABASE]')

Any tips or workarounds would be greatly appreciated.

Thank you in Advance: Mark C. Roduner, Jr. ([EMAIL PROTECTED])


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reported to SpamCop

2003-03-19 Thread Alan W. Rateliff, II
A few minutes ago I noticed the emails from MySQL list were being rejected
at my server because of the mysql.com server being listed in SpamCop.

Information from http://spamcop.net/w3m?action=checkblockip=62.119.101.229
reveals that some of the spam messages that have made it through the list
were either reported to SpamCop by users, or filtered by SpamCop.

Just a heads-up.  Generally, it's not a good, nor fair, idea to report spam
received through a mailing list to SpamCop or other spam-catching entities,
for this very reason.  Now MySQL's list server has wound up on a block list.

query, mysql

--
   Alan W. Rateliff, II:   RATELIFF.NET
 Independent Technology Consultant :[EMAIL PROTECTED]
  (Office) 850/350-0260:  (Mobile) 850/559-0100
-
[System Administration][IT Consulting][Computer Sales/Repair]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Installation failure

2003-03-19 Thread Adam Stern
SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `' and `').
SEND-PR:
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Installation failure
Description:
	I downloaded the MYSQL Complete package from apple.com (type 'mysql' into 
the search box and its the first result).  I installed mysql fine from this 
package, but the daemon won't run.  It just says mysqld ended.  Even using 
safe_mysqld.
How-To-Repeat:
	I tried on three different computers running Mac OS X v10.2.4 that 
strangely didn't have mysql pre-installed.
	To repeat, just d/l the 'mysql complete' from apple, install it, and try 
running the daemon.
Fix:
	I don't know

Submitter-Id:   submitter ID
Originator: System Administrator
Organization:
	Cold Copy
MySQL support: [none | licence | email support | extended email support ]
Synopsis:   Installation Failure
Severity:   serious
Priority:   medium
Category:   mysql
Class:  sw-bug
Release:mysql-3.23.55 (Source distribution)

Environment:
	machine, os, target, libraries (multiple lines)
System: Darwin Oboebeatle.local. 6.4 Darwin Kernel Version 6.4: Wed Jan 29 
18:50:42 PST 2003; root:xnu/xnu-344.26.obj~1/RELEASE_PPC  Power Macintosh 
powerpc

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1151, based on gcc version 3.1 20020420 
(prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC:

lrwxr-xr-x  1 root  wheel  15 Mar  3 18:25 /usr/lib/libc.dylib - 
libSystem.dylib
Configure command: ./configure '--with-pthreads' '--with-innodb' 
'--prefix=/Library/MySQL' '--enable-thread-safe-client' '--enable-shared'



_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: JDBC Question [Using Multiple databases]

2003-03-19 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mark C. Roduner, Jr. wrote:
Scenario:
	The current JDBC Connection is
	
jdbc:mysql//localhost:3306/=xql?user=rootpassword=myrootpass
	The database `xql` contains 1 table, `settings`
	Another database, `login` contains 1 table, `users`
	'm' is a Matcher Object, that contains the users Name in $1, and
Domain in $2
Code: 
pre
13)	String sqlString = ;
14)	sqlString += SELECT * FROM `users` WHERE `user`=' +
m.group(1);
15)	sqlString += ' AND `domain`=' + m.group(2)+' AND
`pass`=PASSWORD( + password + );
16)	ResultSet logins =
rootConnection.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY).executeQuery(sqlString);
/pre

Error Message:
General error,  message from server: Table 'xqlServer.users'
doesn't exist
java.sql.SQLException: General error,  message from server:
Table 'xqlServer.users' doesn't exist
at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1628)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:917)
at
com.mysql.jdbc.Connection.execSQL(Connection.java:1806)
at
com.mysql.jdbc.Connection.execSQL(Connection.java:1740)
at
com.mysql.jdbc.Statement.executeQuery(Statement.java:1220)
at LoginDaemon.LoginUser(LoginDaemon.java:16)
at XQLServer.authLoop(XQLServer.java:103)
at XQLServer.run(XQLServer.java:121)
at java.lang.Thread.run(Unknown Source)
Question:
Seeing that my method obviously fails, is there any way to make
the MySQL JDBC driver allow SQL queries to use a database other than
the current one? (Other than using 'USE [DATABASE]')
Any tips or workarounds would be greatly appreciated.

Thank you in Advance: Mark C. Roduner, Jr. ([EMAIL PROTECTED])
Sure, just fully specify the table name using databasename.tablename.

	-Mark

- -- 
MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+eR0VtvXNTca6JD8RAkDZAJsF/DTuud76edmiwi1GmJA/jF9L7gCfcgcb
JVG/iB02RMhFVbj+cTFEoN8=
=8OjB
-END PGP SIGNATURE-
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: appending to longtext field

2003-03-19 Thread Mr Orange
GV wrote:
 I think is better to have an additional record each time a user
 inserts
 new information

 Mr Orange wrote:
 Hello all,

 I have a database with a type longtext called notes.

 Say I wanted to append some text to this field, what command would I
 use?

 I have tried the following sql..
   update clients set notes=notes+text to append where id=1;

 But this doesn't seem to do the job.

 I am new to MySQL so sorry if I've asked an obvious question!

 Many thanks in advance,

 Steve.


 PS.  What is needed is a database to store notes on each client
 which can be added to as necessary.  If anyone has a better idea of
 a way to do this, I'd be very grateful for any help!  Cheers.

Hi GV,

What do you mean by adding an additional record?

At the moment, say I have a table set up as follows:
  id int(6) not null auto_increment,
  notes longtext,

I have no idea at the beginning how many notes a user will enter on a
particular client, so how would I create the table?  Obviously I
couldn't have,
  int int(6) not null auto_increment,
  note1 longtext,
  note2 longtext, etc.

Is it possible to create a 'dynamic' table where the fields in there could
grow to accomodate any inputted notes?

If you could offer any help on this, by way of email, or links to webpages
or whatever, I'd be really grateful,

Cheers,

Mr O.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: appending to longtext field

2003-03-19 Thread Jeff Shapiro
At 1:50 + 3/20/03, Mr Orange wrote:
GV wrote:
 I think is better to have an additional record each time a user
 inserts
 new information
 Mr Orange wrote:
 Hello all,

 I have a database with a type longtext called notes.

 Say I wanted to append some text to this field, what command would I
 use?
 I have tried the following sql..
   update clients set notes=notes+text to append where id=1;
 But this doesn't seem to do the job.

 I am new to MySQL so sorry if I've asked an obvious question!

 Many thanks in advance,

 Steve.

 PS.  What is needed is a database to store notes on each client
 which can be added to as necessary.  If anyone has a better idea of
 a way to do this, I'd be very grateful for any help!  Cheers.
Hi GV,

What do you mean by adding an additional record?

At the moment, say I have a table set up as follows:
  id int(6) not null auto_increment,
  notes longtext,
I have no idea at the beginning how many notes a user will enter on a
particular client, so how would I create the table?  Obviously I
couldn't have,
  int int(6) not null auto_increment,
  note1 longtext,
  note2 longtext, etc.
Is it possible to create a 'dynamic' table where the fields in there could
grow to accomodate any inputted notes?
If you could offer any help on this, by way of email, or links to webpages
or whatever, I'd be really grateful,
Cheers,

Mr O.
I think what GV is suggesting is that every time a user adds a note 
to your system, you use the INSERT INTO ... command to add a new 
record into the database. I would add a timestamp column so that you 
can sort the notes by their order of entry (of course there are 
several other ways to accomplish this as well). Actually, this is 
probably the best way to handle the set up. You mention that these 
notes are being entered for a particular client. I assume that you 
also have a client table as well as the notes table. This is an ideal 
situation for a parent/child table relational set up (or one-to-many 
relationship). When you need notes for a particular client, you 
SELECT on the client identifier in the notes table and you will have 
a listing of the all notes for the client.

Here's basically the set up that I would use:

Parent table: (the client information)
--
client_id   int(6) not null auto_increment,
name, address, and all the other important client contact stuff
Child table: (the note information)

note_id int(6) not null auto_increment,
client_id   int(6),
entry_date  timestamp,
notelongtext,
index   idx_client_id (client_id),  === you may not need this index
foreign key references client_table (client_id)
Of course to use the foreign keys you will need to use InnoDB table type.

With this type of set up, a client may have anything from 0 to your 
free hard disc space of notes.

I'm sure that if I made some glaring error here, some one will point 
it out and correct me (which I woudl greatly appreciate :-).

Back to your original question:

You didn't mention what you are using to access MySQL. PHP? C++? Perl?

If I *really*, *really* wanted to keep only one note record for each 
client (or to have the notes in the client table), I would create an 
update form and populate the form with the proper client 
information and use the my language's functions to concatenate the 
old and new information. After that use an UPDATE statement to 
replace the existing note with the new note.

Depending on what type of system you are creating, doing this 
update method may bring in all kinds of headaches down the road. 
You may get people trying to change information that some one else 
put in the tables.

The best way to go is the parent/child relationship.

just my $0.02.
jeff
--

Jeff Shapiro, Colorado Springs, CO, USA

At work I *have* to use a Windows machine, at home I *get* to use a Mac.

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


difference between 3.23.41 3.23.32.

2003-03-19 Thread RamananK

Kindly help.

Where can I the difference between MySql versions 3.23.41 and 3.23.32.


thanks in advance
Ramanan


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



long query

2003-03-19 Thread geeta varu
if there is a long query i want to continue it 
in next like 
eg
Select canID from table1 where(text like '%a%' or text
 lik
e '%b%') AND canID not in ( text like '%c%' or canID 
like '%d%') 

here i want to use some concatenation of lines any
solution




__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Embedded MySQL?

2003-03-19 Thread Roland Bengtsson
Hi, I have a question I hope you can help me with.

I try to develop a database in Borlands Delphi or with C++ and Visual Studio
6 (Windows 2000). Probably I choose Delphi.
Now I want to use MySQL as a platform for my program. According to
http://www.mysql.com/doc/en/libmysqld_overview.html
I can run a standalone server in my program. Now I wonder how this works in
practise?

Ideally I want to call an API in a dll-file to create and maintain the
database.

/Roland

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.462 / Virus Database: 261 - Release Date: 2003-03-13
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: long query

2003-03-19 Thread Michael Shulman
Each line in MySQL is terminated with a semicolon (;). You can break your
query into as many lines as you need, and just end the last one with a
semicolon. 

C:\mysql\binmysql --user=root -p
Enter password: **
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.12-max-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql use mysql
Database changed
mysql select
- user,
- host
- from
- user
- ;
+---+---+
| user  | host  |
+---+---+
| everserve | localhost |
| root  | localhost |
+---+---+
2 rows in set (0.00 sec)

mysql

-Original Message-
From: geeta varu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 19, 2003 9:05 PM
To: [EMAIL PROTECTED]
Subject: long query

if there is a long query i want to continue it 
in next like 
eg
Select canID from table1 where(text like '%a%' or text
 lik
e '%b%') AND canID not in ( text like '%c%' or canID 
like '%d%') 

here i want to use some concatenation of lines any
solution




__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php