Re: NOT NULL question

2003-01-23 Thread Opus
I'm really just currious as to WHAT you would want to see as opposed 
to NULL?  

How could you have a field that has no value?  What would it mean?  
NULL is the answer to this.  It is recording the absence of 
something.  So, I would say that this is an expected behaviour of any 
database engine.

For example, a price field might have 3 distinct values.  First value 
is >0.  This says that there is a price, and what it is.  Second 
value is 0.  This might say that it is a 'free' item.  The third 
value is NULL.  This would say that there is no price.  For data 
collection, 0 would mean that it was measured, but the value was 0.  
There might be 0" of rain fall in a day.  A NULL in this case would 
say that while the field is there, either measurements were not done, 
or there was a 'problem' with the reporting device, or it has not 
reported yet.

Ah, and remember that NULL and "NULL" are different.

On 15 Jan 2003 at 18:48, Benjamin Pflugmann wrote:

> Hello.
> 
> On Tue 2003-01-14 at 09:32:02 -0800, [EMAIL PROTECTED] wrote:
> > I'm aware that NULL and "" are not the same thing.. I would like to
> > prevent the column from accepting values automatically ( with out the
> > presence of a DEFAULT).
> [...]
> 
> The problem is: You have a DEFAULT, you just don't know it. ;-)
> 
> Do a SHOW CREATE TABLE stuff, and you'll see what I mean. That is a
> known deficiency, as Eric told you:
> 
>   It's a known behaviour and is described in the MySQL manual:
> 
> http://www.mysql.com/doc/en/Bugs.html
> 
>   You can change it if you compile MySQL server with
>   -DDONT_USE_DEFAULT_FIELDS option. But in this case you can't use
>   default values at all.
> 
> http://www.mysql.com/doc/en/configure_options.html describes
> -DDONT_USE_DEFAULT_FIELDS.
> 
> HTH,
> 
>   Benjamin.
> 
> -- 
> [EMAIL PROTECTED]
> 


--Opus--

There is no such thing as an underestimate of average intelligence.
- Henry Adams


Get added to my Humor list:
mailto:[EMAIL PROTECTED]?subject=ADD_HUMOR
Get added to my Neat list:
mailto:[EMAIL PROTECTED]?subject=ADD_NEAT
Get my PGP public key:
mailto:[EMAIL PROTECTED]?subject=PSEND&body=send%20PublicKEY.asc
Visit My Home Page:
http://value.net/~opus/




-
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: create mysql user?? how

2003-01-23 Thread Dr. Poo
Actually, i'm sorry. I don't know why i didn't put a little more thought into 
what i was writting. "another late night" i guess. That wasn't very cool of 
me at all. My appologies, seriously.  

Though, the time was not wasted, i've been were you seem to be before, and 
none of the time anyone helped me went wasted (hopfully), so i assume the 
same from everyone else.

And i did respond...with a very good, or atleast reasonable answer to your 
question...i think. I should have just left off the whole sentence within the 
( )'s, cause it was rude... Sorry again.

-Chris

On Wednesday 22 January 2003 10:12 am, you wrote:
> hey, i am really sorry to waste your valuable time.. and again sorry that
> you wasted unneeded time to send back a response...
>
> thanks
>
>
>
>
>
>
>
> From: "Dr. Poo" <[EMAIL PROTECTED]>
>
> >To: "M A" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> >Subject: Re: create mysql user?? how
> >Date: Wed, 22 Jan 2003 23:29:35 -0600
> >
> >How about (not to be rude, but that do it for me!! attitude should not be
> >accepted) you go to mysql.com, or google and type in those same two
> >questions... Much faster.
> >
> > -Chris
> >
> >On Tuesday 21 January 2003 07:16 pm, M A wrote:
> > > hi,
> > >
> > > would someone please tell me how to create mysql user? and how to set
> >
> >the
> >
> > > mysql root password?
> > >
> > >
> > > Thanks
> > >
> > > _
> > > The new MSN 8: advanced junk mail protection and 2 months FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> > > -
> > > 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
>
> _
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail

-
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




nested queries

2003-01-23 Thread Justin French
Hi,

I'm trying to dig a bit deeper into mysql queries... I've come across an
application that i'm building which requires (it would seem on the surface)
many queries, do to the relational nature of the data.

The actual app is way too complex to explain, but I've come up with a
reasonably simple example.

Let's say i've got the cliche hierarchical menu system:

parent 1
child 1
grandchild 1
grandchild 2
child 2
grandchild 1
grandchild 2
child 3
child 4
parent 2
child 1
child 2
child 3
child 4
parent 3
child 1
child 2
child 3
child 4
grandchild 1
grandchild 2


>From a table point of view, lets say I have 3 tables:

parent (id,name)
child (id, parentID, name)
grandchild (id, parentID, name)


Now, it's easy to query to get all the parents:

select * from parents


And it only takes 2 queries to get all the children of parent 2 (for
expanding one section of the menu)

select * from parents and
select * from children where parentID='2'


But when I decide I want to expand all the parents and children to show the
entire menu structure, it's a HEAP of queries.  Sure, I don't have to WRITE
them all, because PHP can do that for me in loops, but it occured to me that
I might be missing a HUGE piece of the puzzle in terms of what MySQL can
do...

can anyone help with a link to somewhere in the manual, or a tutorial that i
should be reading :)

thanks,

justin

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: mysqldump questions

2003-01-23 Thread Natale Babbo
Hi,

1) try this: GRANT SELECT, RELOAD ON *.* to dump@”%”
IDENTIFIED BY ;

2) in the backup file insert this line above all: SET
FOREIGN_KEY_CHECKS = 0; ... and all will be ok!

regards


 --- Glenn Ticket <[EMAIL PROTECTED]> ha
scritto: > 
> I have 2 questions concerning mysqldump.
> 
> 1) What grants does the user need to have to perform
> a dump: if I want to create a user which is only
> used to perform database dumps (in scripts), which
> priviliges does it need ?
> 
> 2) I'm using innoDB tables to be able to use foreign
> keys.  Unfortunatly mysqldump seems to dump the
> tables in alphabetical order, which results in error
> when one tries to restore a database from this dump
> (due to references to tables which don't exist yet).
>  This is easily fixed for a small database (with a
> few cut and pastes), but is the database gets
> complex, it causes some headache.  Is there a manner
> in which this can be avoided ?
> 
> I'm using mySQL 3.23.53 on a Windows 2000
> environnement.
> 
> thanks in advance,
> 
> Glenn Ticket
> 
>
-
> 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
>  

__
Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
http://it.yahoo.com/mail_it/foot/?http://it.mobile.yahoo.com/index2002.html

-
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: ReiserFS vs Ext3

2003-01-23 Thread Salvesen, Jens-Petter
I use XFS. Though my benchmarking is incomplete, it appears that it
outperforms ReiserFS and Ext3 on large files. This is probably due to the
fact that XFS was developed by SGI, whose systems work on large
Audio/Visual files.

Beware that you'll need to spend more time on your kernel once you start
applying patches, since the standard distrobution kernels won't work any
longer.

best regards,

Jeppe

-Original Message-
From: Chung Ha-nyung [mailto:[EMAIL PROTECTED]]
Sent: 22. januar 2003 16:57
To: 'David Brodbeck'; 'Nicholas Gaugler'
Cc: [EMAIL PROTECTED]
Subject: RE: ReiserFS vs Ext3



 What about XFS?
 I'm considering using XFS instead of ext3 since it seems to be said that
XFS is more stable and
 efficient than any other linux's journaling fs in the environment of large
and not-so-many files.
 If it is true, I guess that XFS would be the best choice with InnoDB.

--
 Chung Ha-nyung 
 SayClub 
 NeoWiz 


> -Original Message-
> From: David Brodbeck [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 22, 2003 11:10 PM
> To: Nicholas Gaugler
> Cc: [EMAIL PROTECTED]
> Subject: RE: ReiserFS vs Ext3
> 
> 
> 
> 
> > -Original Message-
> > From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
> 
> > I would E-mail the reiserfs list and ask for whether ReiserFS 
> > would be 
> > better for a MySQL-only partition than ext3 and see what 
> answers you 
> > get.  In the worst case, you'll have some extreme "resierfs 
> is always 
> > better" responses that don't help you decide.  In the best 
> > (and what I 
> > think will happen), someone will tell you the differences in 
> > CPU usage 
> > or fast file access speeds or some such value that will mean 
> > something, 
> > or even that it is not actually going to make a difference.
> 
> If Nicholas does this, I hope he'll report back here with 
> what he finds out.
> I'm facing the same choice very soon, for a database that 
> will eventually
> have millions of entries (but each individual entry very 
> small.)  I'm trying
> to decide whether to go with reiserfs or ext3.  ext3's my 
> current favorite,
> but only because it's more of a known, stable quantity.
> 
> -
> 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 
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: Transaction Support in mysql13.23.54

2003-01-23 Thread Pål Arne Hoff
hi,
i have installed mysql3.23.54 on windows and have
followed all instructions as required for using
mysqld-max to have transaction support.
i have created a table using TYPE=INNODB, but cannot
use rollback on it.
the error i get in my jsp is "transactions not
supported".
please advice me on how i can use commit - rollback on
mysql database tables.
I am connecting to the mysql database thru my java
web-app.
thank you in advance.
regards,
nirmal
(23 jan 03)



Go to this page: http://www.innodb.com/howtouse.html and have a look 
under: How to create tables in the InnoDB format.

Basically you will at least have to specify this line in 
C:\WINDOWS\my.ini and restart your mysql-max server:

innodb_data_file_path=ibdata1:30M

All the best,
Pål Arne Hoff



-
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: mysqldump questions

2003-01-23 Thread Glenn Ticket

This works perfect.  Thanks !

>Hi,
>
>1) try this: GRANT SELECT, RELOAD ON *.* to dump@"%"
>IDENTIFIED BY ;
>
>2) in the backup file insert this line above all: SET
>FOREIGN_KEY_CHECKS = 0; ... and all will be ok!
>
>regards

>> I have 2 questions concerning mysqldump.
>> 
>> 1) What grants does the user need to have to perform
>> a dump ?
>> 
>> 2) I'm using innoDB tables to be able to use foreign
>> keys.  Unfortunatly mysqldump seems to dump the
>> tables in alphabetical order, which results in error
>> when one tries to restore a database from this dump
>> (due to references to tables which don't exist yet).

-
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




Limitations of InnoDB about REPLICATION

2003-01-23 Thread Dyego Souza do Carmo
Hello guy !

The limitations about InnoDB on replication is present in >= 4.0.9 release
?

* THE LOAD TABLE FROM MASTER DOES NOT WORK ON INNODB TABLES
* THE TABLES ARE LOADED AUTOMATICALLY ON SET REPLICATION

is true this limitations on >= 4.0.9 ?


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
-- 
$ 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




Some Problems with MySQL 3.23.54

2003-01-23 Thread Shripal Shah
Dear Sir/Madam,
 
I can't able to do following things with MySQL 3.23.54.
 
Sub-selects
SELECT INTO TABLE
Transactions
Stored Procedures and Triggers
Foreign Keys
Views
 
But, what can I do if I can't do anything without Transaction Support,
Stored Procedures & Triggers.
Please suggest me, if there is any alternative. And hopefully in which
version I can able to get this. For your information I am using MySQL
with Visual Basic.
 
Thanks & Regards,
 
Shripal.


-
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: Compiling MySQL 4.0.9-gamma under FreeBSD 4.7-Stable with linuxthreads

2003-01-23 Thread Thomas Spahni
Maximo,

have a look at config.log and the configure script after line 14585. That
will tell you what goes wrong.

Thomas Spahni
-- 
filter: sql, query

On Mon, 20 Jan 2003, Maximo Migliari wrote:

> Hello there,
>
> I'm trying to compile MySQL 4.0.9-gamma under FreeBSD 4.7-Stable with
> linuxthreads.
> I installed linuxthreads through the ports system by doing:
> cd /usr/local/ports/devel/linuxthreads
> make
> make install
>
> it installed just fine.
> I downloaded the source distribution of MySQL (not using the ports system,
> as I cannot find the gamma version of mysql4 through it, even after an
> update of my ports collection).
>
> This is the configure command I try to use:
> CFLAGS="-O3 -DHAVE_BROKEN_REALPATH -mcpu=pentiumpro -D__USE_UNIX98
> -D_REENTRANT -D_THREAD_SAFE \
> -I/usr/local/include/pthread/linuxthreads " \
> CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti
> -mcpu=pentiumpro" \
>   ./configure --prefix=/usr/local/mysql --enable-assembler \
> --with-mysqld-ldflags=-all-static \
> --with-client-ldflags=-all-static \
> --localstatedir=/usr/local/mysql/data \
> --enable-thread-safe-client \
> --enable-local-infile \
> --with-extra-charsets=complex \
> --disable-shared \
> --with-innodb \
> --with-mit-threads=no \
> --without-debug \
> --with-named-thread-libs='-DHAVE_GLIBC2_STYLE_GETHOSTBYNAME_R -D_THREAD_SAFE \
> -I/usr/local/include/pthread/linuxthreads -L/usr/local/lib -llthread -llgcc_r'
>
>
> this is the error I get:
> checking size of char... configure: error: cannot compute sizeof (char), 77
>
> which ends configure.  Does anyone know what could be causing this?


-
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: Limitations of InnoDB about REPLICATION

2003-01-23 Thread Heikki Tuuri
Dyego,

- Original Message -
From: "Dyego Souza do Carmo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 12:13 PM
Subject: Limitations of InnoDB about REPLICATION


> Hello guy !
>
> The limitations about InnoDB on replication is present in >= 4.0.9 release
> ?
>
> * THE LOAD TABLE FROM MASTER DOES NOT WORK ON INNODB TABLES

true.

> * THE TABLES ARE LOADED AUTOMATICALLY ON SET REPLICATION

Sorry, I do not understand? Do you mean that when you set up a new slave,
you make a cold or a hot backup of the InnoDB tablespace and log files and
.frm files, and use them to set up the new slave? That is the normal
procedure to set up a new slave. The command LOAD TABLE FROM MASTER is
awkward anyway if you have lots of tables.

> is true this limitations on >= 4.0.9 ?
>
>
> sql,query
>
> -
>   ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento

Regards,

Heikki


> -
>  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
> --
> $ 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




No suitable driver ..... urgent..

2003-01-23 Thread nitsy
Hello,
I'm using MySQL 4.0.1 with Tomacat 3.3 & JSP.
I'm getting this error every time i access my jsp
page:
"javax.servlet.ServletException: No suitable driver"

Can anybody help me out..

i tried to download from download/J but it's not
gettin opened ...


its urgent ..

Thanks




__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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: indexing a full text

2003-01-23 Thread Thomas Spahni
Hi, David

On Tue, 21 Jan 2003, David T-G wrote:

> % Are you sure that smallint is enough for your index? Do you really need to
>
> I've thought about that a bit, but don't know if there is a more 'right'
> answer that comes with experience...  In this case and other cases I've
> had so far, it is; that will give me 64k.  Perhaps it's not worth thinking
> about the few bytes a smallint will save me; I already use smallint even
> where tinyint will do just fine for the sake of consistency ("all of my
> ID columns are smallint, so foreign key references can automatically be
> smallint").  Do you suggest that perhaps I just go with int or bigint for
> my IDs, again for consistency but now across all of my work rather than
> just guaranteed within a database?

I would suggest to use INT UNSIGNED. Primary keys are not re-used and with
SMALLINT you could easily run out of numbers.

> % index the full title?
>
> I think so...  If the title is "Let Not the Wise Man Glory in his Wisdom"
> and I want to be able to use 'wisdom' as a keyword for my search, it
> needs to be indexed, right?

 ... that would be a query similar to:

  SELECT * FROM mydb WHERE musictitle LIKE '%wisdom%';

and this will not use the index at all. You have to set up a FULLTEXT
index on your titles or search  LIKE 'let not%'.

Thomas Spahni
-- 
filter: 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: Install on WIN2k

2003-01-23 Thread Stefan Hinz, iConnect \(Berlin\)
Norris,

> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
> I remember this well but I don't remember what I did to fix it.

Not to be impolite, but I'd say you should simply start the MySQL server
:)

Check system control > administration > services if there is a service
called "Mysql", and if it's running. If not, install the service (I'd
suggest to use winmysqladmin.exe for this) and start it. If you're
having problems like the MySQL server starts but crashes immediately
after starting, you can try this in a DOS window:

c:\mysql\bin> mysqld --standalone --console

This will give you output in the DOS window so you can see why it keeps
crashing.

And, of course, you can use any other server than mysqld, e.g.
mysqld-max-nt.exe, to try the same. mysqld-max... has InnoDB tables
switched on by default, and there is a good chance something's wrong in
your setup and InnoDB can't create its tablespace etc. You will see all
of this in the DOS window output, though.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Norris, Joseph" <[EMAIL PROTECTED]>
To: "Mysql_List (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 1:55 AM
Subject: Install on WIN2k


> Hello,
>
> I have been running mysql on windows 2000 for about 8 months. Now I
have to
> install it on a new win2k box.
> I get everything installed and go to get into mysql and I am getting
this
> error:
>
>
> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
>
>
> I remember this well but I don't remember what I did to fix it.  Any
and all
> help appreciated.
>
> -
> 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




AW: Some Problems with MySQL 3.23.54

2003-01-23 Thread Franz, Fa. PostDirekt MA
Hi Shripal,

your requests were:

>I can't able to do following things with MySQL 3.23.54.
 
>Sub-selects
 Thats right , subselects come with version 4.1 (out for a view days).
 About 99% of all subselects are can be done with the right JOIN.

>SELECT INTO TABLE
 Try: INSERT INTO  SELECT ...

>Transactions
 You have to compile with mysql-max to get them

>Stored Procedures and Triggers
 There aren't any.
 
>Foreign Keys
 There is a support for this I heard , but don't know if for 3.23.54

>Views
 There aren't any , but a view is (I guess it is ORACLE you come from) just
 a stored 'SELECT'-statement.
 After you said , that you are using a programming-language , (I heard VB is something 
like this - just
 kidding)  this should not be a problem.

>But, what can I do if I can't do anything without Transaction Support,
>Stored Procedures & Triggers.
>Please suggest me, if there is any alternative. And hopefully in which
>version I can able to get this. For your information I am using MySQL
>with Visual Basic.

It depends on what you want to achieve.
You can work around a lot of these things by planning your jobs
in a different way saving triggers , but sometimes there is no clean
solution without triggers.
If you describe a certain problem on that list , a lot of real experts (not me I 
guess) will try
to help.

prosit
Klaus

-
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: indexing a full text

2003-01-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas, et al --

...and then Thomas Spahni said...
% 
% Hi, David

Hi!


% 
% On Tue, 21 Jan 2003, David T-G wrote:
% 
% > % Are you sure that smallint is enough for your index? Do you really need to
% >
% > I've thought about that a bit, but don't know if there is a more 'right'
...
% > smallint").  Do you suggest that perhaps I just go with int or bigint for
% > my IDs, again for consistency but now across all of my work rather than
% > just guaranteed within a database?
% 
% I would suggest to use INT UNSIGNED. Primary keys are not re-used and with
% SMALLINT you could easily run out of numbers.

Fair enough.  Damn the disk space; we'll use four bytes instead of two :-)


% 
% > % index the full title?
% >
% > I think so...  If the title is "Let Not the Wise Man Glory in his Wisdom"
% > and I want to be able to use 'wisdom' as a keyword for my search, it
% > needs to be indexed, right?
% 
%  ... that would be a query similar to:
% 
%   SELECT * FROM mydb WHERE musictitle LIKE '%wisdom%';

Hmmm...  That makes sense.


% 
% and this will not use the index at all. You have to set up a FULLTEXT
% index on your titles or search  LIKE 'let not%'.

And, in fact, I could use '%wise%glory%', right?  But what about
searching for keywords 'wisdom' and 'glory'?  If I list them in that
order, no matter how I use %, I won't get the result.  Should I use some
ANDs in there?  Would I want to do that with a fulltext anyway, and the
fulltext just speeds things up?


% 
% Thomas Spahni
% -- 
% filter: sql, query


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+L9meGb7uCXufRwARAqN8AKDe0QOO48quMrTWXyeup2aqH0ZCOQCgwnkI
h0SurqJODmKtX72w7+1rBL8=
=Ctof
-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: MySQL BLOB fields and large binary data

2003-01-23 Thread Aigars Grins
Hi,

I'm not sure my reply will be of any use to you, but here it goes..

I've recently had problems with a perl driver (DBD::mysqlPP) with regards
to, amongst other things, large BLOB data entries. My short-term work-around
is simply to handle all BLOBs on the client side, i.e. split up all long
queries into several small ones. This works for almost all types of
statements. I know it's more or less obvious, and that you might think it's
too impractical. My, smallish, experience does however say that it's not
that much work and the performance impace, for me, isn't too great.

Just a pointer..

--
Aigars

-Original Message-
From: Bruno Batarelo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 20:37
To: [EMAIL PROTECTED]
Subject: MySQL BLOB fields and large binary data


Greetings

Seemingly MySQL has a persistant problem that I could not solve whatever I
tried to do. It seems that it is impossible to send large amount of binary
data to mysql's BLOB field. It is written in manual that 4.0x versions do
not have limit for max_allowed_packet. It is also written that bugs
regarding that problem are corrected in 4.08. However, I can not send a file
to blob field that is larger than 4-5 MB. I use ADO 2.6 and recommended
STREAM object for inserting binary data. max_allowed_packet is very large,
60-100MB, database has one table without records, MySQL is 4.08 with its 128
MB of ram, and other 128 is for windows 2000 system. Wait timeout is also
very big. Table type is InnoDB. But error message persists: MySQL Server has
gone away. MyODBC is 3.51.05. This is recent data regarding this problem in
documentation:

You will also get a lost connection if you are sending a packet >= 16M if
your client is older than 4.0.8 and your server is 4.0.8 and above, or the
other way around.

One thing that I do not understand is client's version. I presume that it
referes to mysql.exe, but I access server using VB application and MyODBC.
Has anyone solved this problem. It is, I'd say "stupid", that these kind of
things can not be done with such robust database system. I like MySQL very
much, but my whole project depends on this situation and I'll seriously
think about using some other RDBMS if I can't solve this problem.

Thank you all in advance
Bruno
Croatia


-
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




Replication

2003-01-23 Thread Guddack Thorsten ICM MP SCM GO 21
Hi,

I'm using 2 WinNT-Servers, Sp6 with mysql 4.0.5. max-nt.

I ve setup a replication between these two servers as discribed in tha
manual and some small problems comes up.

May some can give me some help.

1.) On the Master I create a user repl with the rights 'replication slave'.
 On the slave I used a user with all possible rights.
 Starting the replication with 'reset slave', 'change master to.'
and 'start slave', I get an error:
 Show slave status says Slave_IO_running no and some entry in mysql.err.

 This Problem I could solve using a user in 'change master to ' that
has also admin rights.
 What could cause the problem?

2.) The more important Problem:
 If the replication is running, and I try to replicate a table where
data was inserted on the master with 'LOAD DATA INFILE...' or
'LOAD DATA LOCAL INFILE' the server process on the slaves
crushes
 The files on the master, for LOAD DATA.were still there.
Any Ideas?


Best regards

Thorsten.guddack

  



-
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: No suitable driver ..... urgent..

2003-01-23 Thread Henning Heil
hello . . .

did you install the necessary mysql driver you call in your jsp 
"ClassForName"-statement?

you can find mm.mysql at sorceforge.net

regards,

henning



nitsy wrote:

Hello,
I'm using MySQL 4.0.1 with Tomacat 3.3 & JSP.
I'm getting this error every time i access my jsp
page:
"javax.servlet.ServletException: No suitable driver"

Can anybody help me out..

i tried to download from download/J but it's not
gettin opened ...


its urgent ..

Thanks




__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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




re: deleting records

2003-01-23 Thread Victoria Reznichenko
On Wednesday 22 January 2003 19:39, Bill Rausch wrote:

> I've inherited a busted database and need to clean it up.  I can't
> figure out how to do something which seemingly should be simple.
>
> For example, I've got two tables:
>
> Table One
> id int primary key auto_increment not null
> ...other data
>
> Table Two
> id int primary key auto_increment not null
> ...other data
>
> I'd like to delete all of the records from Table Two which have an id
> that is not found in Table One.
>
> I could do it programatically in C or PHP or ... but is there some
> kind of SQL statement than can do the job?

You can do it in version 4.0 and up, like

DELETE t2 FROM t2 LEFT JOIN t1 ON t2.id=t1.id WHERE t1.id IS NULL;

or since 4.0.2 like

DELETE FROM t2 USING t2 LEFT JOIN t1 ON t2.id=t1.id WHERE t1.id IS NULL;

for more info check the following section of the manual:
http://www.mysql.com/doc/en/DELETE.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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




re: FW: question about update sql

2003-01-23 Thread Victoria Reznichenko
On Wednesday 22 January 2003 21:10, Norris Joseph wrote:

> Hello,
>
> I have the following in my SQL:
>
> update call_center set call_center.who_for_id = activeemployees.hr_emp_no
> where call_center.who_for_id = activeemployees.id;
>
>
> This is something I think that I should be able to do, but I get an error.
>
> Is there a way to do what I am trying to do here?

Yup, but multi-tables updates are supported since 4.0.4:
http://www.mysql.com/doc/en/UPDATE.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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




re: Install on WIN2k

2003-01-23 Thread Egor Egorov
On Thursday 23 January 2003 02:55, Norris Joseph wrote:

> I have been running mysql on windows 2000 for about 8 months. Now I have to
> install it on a new win2k box.
> I get everything installed and go to get into mysql and I am getting this
> error:
>
>
> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
>
>
> I remember this well but I don't remember what I did to fix it.  Any and
> all help appreciated.

Is MySQL server running?



-- 
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




re: NOT NULL Fields

2003-01-23 Thread Egor Egorov
On Wednesday 22 January 2003 19:24, Valdir Stiebe Junior wrote:

> Creating a table with a not null field, and then trying to insert it
> doesn't raise an error 'Column XXX cannot be null'
> Well, this was the steps (sql to bypass filter) i did:
>
> 1. create table TEST ( id_test integer, name varchar(50) not null );
> 2. insert into TEST (id_test, name) values (1, 'ppl1');  (ok it works)
> 3. insert into TEST (id_test, name) values (2, NULL); (ok raise an error)
> 4. insert into TEST (id_test) values (3); (insert a row with name = '')
>
> This is correct? A bug? Or i'm to worried about raising errors? :)

It's a known behaviour and described here:
http://www.mysql.com/doc/en/Bugs.html

If you don't specify column explicit in the INSERT statement and column 
defined as NOT NULL empty string ''(or 0) will be inserted. 



-- 
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




Re: Limitations of InnoDB about REPLICATION

2003-01-23 Thread Heikki Tuuri

- Original Message -
From: "Dyego Souza do Carmo" <[EMAIL PROTECTED]>
To: "Heikki Tuuri" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 12:31 PM
Subject: Re[2]: Limitations of InnoDB about REPLICATION


> Dobrý den,
> quinta-feira, 23 de janeiro de 2003, 08:28:43, napsal jste:
>
> HT> Dyego,
...
> >> * THE LOAD TABLE FROM MASTER DOES NOT WORK ON INNODB TABLES
>
> HT> true.
>
> >> * THE TABLES ARE LOADED AUTOMATICALLY ON SET REPLICATION
>
> HT> Sorry, I do not understand? Do you mean that when you set up a new
slave,
> HT> you make a cold or a hot backup of the InnoDB tablespace and log files
and
> HT> .frm files, and use them to set up the new slave? That is the normal
> HT> procedure to set up a new slave. The command LOAD TABLE FROM MASTER is
> HT> awkward anyway if you have lots of tables.
...
> The Command LOAD TABLE FROM MASTER work on slave with InnoDB tables ?
> ( >= 4.0.9 )

sorry, no. The workarounds are:

A.
1) convert the table to MyISAM in the master,
2) use then LOAD TABLE FROM MASTER in the slave,
3) convert back to InnoDB in the master.

B.
Or simply dump the table in the master and import the dumpfile to the slave.

> Tanks ;)
>
> sql,query
>
> -
>   ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento

You are welcome :),

Heikki




-
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: solution for opposite of this join / join from this subselect

2003-01-23 Thread M Wells
Hi Josh,

As I mentioned elsewhere, you're very welcome, happy to help.

To answer your next questions as best I can (if I make any errors I'd be
grateful if someone else on the list would highlight them):

Let's imagine you have two tables, 1 table contains employees, the other
table contains the project to which each employee is currently assigned
(Note, this is not necessarily great database design, but it should
serve as an adequate illustration). In the real world, of course, not
every employee is currently assigned to a project, and not every project
has yet been assigned to an employee.

CREATE TABLE `tblemployees` (empid INT NOT NULL AUTO_INCREMENT, empname
VARCHAR(50) NOT NULL DEFAULT '', empdetails VARCHAR(50) NOT NULL DEFAULT
'', PRIMARY KEY (`empid`)) TYPE=MYISAM ROW_FORMAT=DEFAULT;

CREATE TABLE `tblprojects` (projid INT NOT NULL AUTO_INCREMENT, empid
INT NULL, projname VARCHAR(50) NOT NULL DEFAULT '', PRIMARY KEY
(`projid`)) TYPE=MYISAM ROW_FORMAT=DEFAULT;

INSERT INTO tblemployees (empname, empdetails) VALUES ('employee1',
'employee details1');
INSERT INTO tblemployees (empname, empdetails) VALUES ('employee2',
'employee details2');
INSERT INTO tblemployees (empname, empdetails) VALUES ('employee3',
'employee details3');
INSERT INTO tblemployees (empname, empdetails) VALUES ('employee4',
'employee details4');

INSERT INTO tblprojects (empid, projname) VALUES (1, 'project1');
INSERT INTO tblprojects (empid, projname) VALUES (NULL, 'project2');
INSERT INTO tblprojects (empid, projname) VALUES (2, 'project3');
INSERT INTO tblprojects (empid, projname) VALUES (4, 'project4');

So, if we wanted to do something relatively simple such as retrieve a
recordset that reflects those employees who have been assigned to a
project, and to which project they have been assigned, we would use an
INNER JOIN:

SELECT te.empname, te.empdetails, tp.projname FROM tblemployees te INNER
JOIN tblprojects tp ON te.empid = tp.empid;

This returns a recordset that looks like:

"employee1","employee details1","project1"
"employee2","employee details2","project3"
"employee4","employee details4","project4"

(Another way of retrieving the same recordset would be:

SELECT te.empname, te.empdetails, tp.projname FROM tblemployees te,
tblprojects tp WHERE te.empid=tp.empid;)

INNER JOINs only return records from tables where associated records can
be found in both.

Now, we can see from the above recordset that employee1 is assigned to
project1, employee2 is assigned to project3 and employee4 is assigned to
project4. This recordset doesn't communicate anything about employee3 or
project2, because the INNER JOIN excludes them for not having a matching
record in the other table.

Because we're dealing with a very small and very straightforward
scenario, however, we can probably work out under our own steam just by
looking at the above recordset that employee3 mustn't be currently
assigned to a project and project2 hasn't been assigned to an employee.

However, in a more complex scenario we might be mistakenly _assuming_
employee3 and project2 actually exist in our tables at all!

So that there's no potential for confusion, you can use, for example, a
LEFT JOIN to reflect all of the records in the tblemployees table and
only those records from tblprojects that are currently assigned to an
employee.

I.E.:

SELECT te.empname, te.empdetails, tp.projname FROM tblemployees te LEFT
JOIN tblprojects tp ON te.empid = tp.empid;

"employee1","employee details1","project1"
"employee2","employee details2","project3"
"employee3","employee details3",NULL
"employee4","employee details4","project4"

Here there can be no confusion -- employee3 does exist, but isn't
assigned to a project, as indicated by the NULL in the [projname]
column. Project2 is not listed in this recordset because the LEFT JOIN
in this example returns all of the records from tblemployees, but only
the matching records from tblprojects.

Similarly, we can return all of the projects and the details of the
employees that have been assigned to them, where they have been
assigned. To do this, change the syntax from a LEFT JOIN to a RIGHT
JOIN:

SELECT te.empname, te.empdetails, tp.projname FROM tblemployees te RIGHT
JOIN tblprojects tp ON te.empid = tp.empid;

"employee1","employee details1","project1"
NULL,NULL,"project2"
"employee2","employee details2","project3"
"employee4","employee details4","project4"

Here we see that project2 does exist, but no employee has yet been
assigned to it, as idicated by the NULLs in the [empname] and
[empdetails] columns. Employee3 is not listed in this recordset because
the RIGHT JOIN in this example returns all of the records from
tblprojects, but only the matching records from tblemployees.

You could, of course, simply maintain the LEFT JOIN syntax and change
the order of the tables in the FROM clause, thus:

SELECT te.empname, te.empdetails, tp.projname FROM tblprojects tp LEFT
JOIN tblemployees te ON te.empid = tp.empid;

By reversing the 

ReE: nested queries

2003-01-23 Thread Roger Baklund
* Justin French
> I'm trying to dig a bit deeper into mysql queries... I've come across an
> application that i'm building which requires (it would seem on
> the surface)
> many queries, do to the relational nature of the data.

No. SQL was created to do queries on data of a relational nature, thus the
name RDBMS: Relational Database Management System. Most RDBMS's, including
mysql, use SQL as the main query language. It is of course capable of
querying multiple related tables in a single query.

> The actual app is way too complex to explain, but I've come up with a
> reasonably simple example.
>
> Let's say i've got the cliche hierarchical menu system:
>
> parent 1
> child 1
> grandchild 1
> grandchild 2
> child 2
> grandchild 1
> grandchild 2
> child 3
> child 4
> parent 2
> child 1
> child 2
> child 3
> child 4
> parent 3
> child 1
> child 2
> child 3
> child 4
> grandchild 1
> grandchild 2
>
>
> From a table point of view, lets say I have 3 tables:
>
> parent (id,name)
> child (id, parentID, name)
> grandchild (id, parentID, name)

This is not a good data model for this task. You only need one table:

item (id,parent,name)

This table is related to itself, using 'parent' as a foreign key.

> Now, it's easy to query to get all the parents:
>
> select * from parents

select * from item where parent is NULL;

> And it only takes 2 queries to get all the children of parent 2 (for
> expanding one section of the menu)
>
> select * from parents and
> select * from children where parentID='2'

select * from item where parent is NULL;
select * from item where parent=2;

...or, using one query:

select p.id,p.name,i.id,i.name
  from item as p
  left join item as i on
i.parent=p.id and
i.parent=2
  where p.parent is NULL;

> But when I decide I want to expand all the parents and children
> to show the
> entire menu structure, it's a HEAP of queries.  Sure, I don't
> have to WRITE
> them all, because PHP can do that for me in loops, but it occured
> to me that
> I might be missing a HUGE piece of the puzzle in terms of what MySQL can
> do...

You can also expand all items using only one query:

select p.id,p.name,i.id,i.name
  from item as p
  left join item as i on
i.parent=p.id
  where p.parent is NULL;

> can anyone help with a link to somewhere in the manual, or a
> tutorial that i should be reading :)

Read about JOINS and about database normalization:

http://www.mysql.com/doc/en/JOIN.html >
http://www.mysql.com/portal/sites/item-146.html >
http://www.google.com/search?q=database+normalization >

HTH,

--
Roger


-
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: NOT NULL question

2003-01-23 Thread Benjamin Pflugmann
Hi.

On Wed 2003-01-22 at 23:07:24 -0800, [EMAIL PROTECTED] wrote:
> I'm really just currious as to WHAT you would want to see as opposed 
> to NULL?  

Well, you asking the wrong guy, because I did not need that feature,
but I'll try to explain anyhow.

They want to see an error instead. It is the same why people use
foreign keys and constraints: They want to enforce that only data
which complies which certain rules enters the database. And before you
are asking: Yes, there are situations where you know that an unknown
value (NULL) is neither needed nor wanted for a column.

> How could you have a field that has no value?  What would it mean?

As I said, they want an error instead. If you don't know a value for
this field, they want that you are not allowed to insert/update that
row.

> NULL is the answer to this.  It is recording the absence of
> something.  So, I would say that this is an expected behaviour of
> any database engine.

I see which point you are making and you are correct about it but you
are missing their requirements.

Bye,

Benjamin.

[...]
> > On Tue 2003-01-14 at 09:32:02 -0800, [EMAIL PROTECTED] wrote:
> > > I'm aware that NULL and "" are not the same thing.. I would like to
> > > prevent the column from accepting values automatically ( with out the
> > > presence of a DEFAULT).
> > [...]

-- 
[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




gethostbyname_r() (un)bug in MySQL source build

2003-01-23 Thread Michael Bacarella
Hope everyone's having fun at LinuxWorld.


I couldn't find any discussion of a solution for this (according
to Google, mysql.com search), other than at least a dozen reports
from people having trouble with it.  The bug is that the proper error
is not reported and at least I was sent on a wild goose chase.

In attempting to build MySQL 3.23.54a on a fresh Red Hat 8.0:

libmysql.c: In function `mysql_real_connect':
libmysql.c:1325: warning: passing arg 5 of `gethostbyname_r' from incompatible pointer 
type
libmysql.c:1325: too few arguments to function `gethostbyname_r'
libmysql.c:1325: warning: assignment makes pointer from integer without a cast

Very odd.  What ends up being generated in include/my_net.h is:

#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),

When it should be generating:

struct hostent *my_gethostbyname_r(const char *name,struct hostent
*result, char *buffer,int buflen, int *h_errnop);

It does not get generated because ./configure does not detect GLIBC2's
gethostbyname_r() even though it is there, and it is the six argument
version that ends up being called with five.

The problem actually has nothing to do with gethostbyname_r().

The problem is that g++ is not installed.  The configure test program
for gethostbyname_r() type depends on a C++ compiler, and ./configure is
not halting the process for lack of C++ compiler:

configure:19299: checking style of gethostname_r routines
configure:19347: g++ -c -O -DDBUG_OFFconftest.cc >&5
./configure: line 1: g++: command not found
configure:19350: $? = 127
configure: failed program was:
#line 19316 "configure"
#include "confdefs.h"
#undef inline
#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT)
#define _REENTRANT
#endif
#include 
#include 
#include 
#include 
#include 
#include 
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
 extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
int skr;

 skr = gethostbyname_r((const char *) 0,
  (struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);
  ;
  return 0;
}

Solution?  Tell the user there is no C++ compiler if there is no C++ compiler.

-- 
Michael Bacarella  24/7 phone: 646 641-8662
Netgraft Corporation   http://netgraft.com/
  "unique technologies to empower your business"

Finger email address for public key.  Key fingerprint:
  C40C CB1E D2F6 7628 6308  F554 7A68 A5CF 0BD8 C055

-
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




Writing program to communicate with remote internet MySQL server?

2003-01-23 Thread Murray Wells
Hello All,

For some time I've been wondering if it's possible to write a program
that can automatically check my local MySQL server, create a recordset
containing any new or updated records found in my local table(s) since
the last check, and upload those new / updated records to the MySQL
server my web site uses at phpwebhosting.com.

My background is VB / VBA, but I also have access to Perl, Python and
Ruby.

I'm wondering if anyone can tell me if it's possible, using one of these
languages, to connect to a remote MySQL server over the internet and to
manipulate tables on the remote server as though they were recordset
objects, similarly to how you might achieve this on a local server using
MyODBC?

The end goal is to develop a program I can fire as a Windows XP
scheduled task to synchronize the remote database with the local one. 

Any help appreciated!

Regards and best wishes,

M Wells



-
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




Writing program to communicate with remote internet MySQL server?

2003-01-23 Thread M Wells
Hello All,

For some time I've been wondering if it's possible to write a program
that can automatically check my local MySQL server, create a recordset
containing any new or updated records found in my local table(s) since
the last check, and upload those new / updated records to the MySQL
server my web site uses at phpwebhosting.com.

My background is VB / VBA, but I also have access to Perl, Python and
Ruby.

I'm wondering if anyone can tell me if it's possible, using one of these
languages, to connect to a remote MySQL server over the internet and to
manipulate tables on the remote server as though they were recordset
objects, similarly to how you might achieve this on a local server using
MyODBC?

The end goal is to develop a program I can fire as a Windows XP
scheduled task to synchronize the remote database with the local one. 

Any help appreciated!

Regards and best wishes,

M Wells



-
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: Low Impact Security Exposure in MySQL Monitor

2003-01-23 Thread Egor Egorov
On Thursday 23 January 2003 05:12, George Toft wrote:

> I have discovered an exposure in the history recall functionality of
> MySQL Monitor.  When a user uses MySQL monitor authenticated as the
> database root user to issue commands, such as changing user passwords or
> database table creation, that history can be recalled by a database user
> of lesser privileges.  This exposes passwords and table structure, which
> may not want to be exposed.  This happens because the MySQL Monitor
> history is stored in the invoking Unix user's home directory.  Likewise,
> that Unix user can simply cat the history file (cat .mysql_history) and
> see the commands, like this:
> aaron:~ $ cat .mysql_history
> select * from user;
> select Host,User,Password from user;
> update user set Password=password("secret1") where User="root";
> select Host,User,Password from user;

You can just use -q option of the MySQL client to skip history file :)



-- 
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




LOAD_DATA_LOCAL

2003-01-23 Thread Fletcher Peter
Hello

I'm new to MySQL and struggling with all sorts of things.

First things first: (hope someone can help)

I'm running MySQL 3.23.53, PHP 4.2.3, Apache 1.3.27 and phpMyAdmin 2.3.2 on
Solaris 8.

All seemed ok until the site administrators tried to upload a csv file into
the database through phpMyAdmin.
The following error occurred :
---
Error
SQL-query :  
LOAD DATA LOCAL INFILE '/var/tmp/phpHRaW9g' INTO TABLE `branches` FIELDS
TERMINATED BY '' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' 
MySQL said: 
The used command is not allowed with this MySQL version


I have started mysql with the '-local-infile=1' option as per the MySQL docs
but still doesn't work.

Can anybody help??


Peter Fletcher

Peter Fletcher
Technical Analyst
01765 694295


-
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: Is this possible?

2003-01-23 Thread Doug Coning

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Doug Coning" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 9:15 AM
Subject: Re: Is this possible?


> Your message cannot be posted because it appears to be either spam or
> simply off topic to our filter. To bypass the filter you must include
> one of the following words in your message:
>
> sql,query,queries,smallint
>
> If you just reply to this message, and include the entire text of it in
the
> reply, your reply will go through. However, you should
> first review the text of the message to make sure it has something to do
> with MySQL. Just typing the word MySQL once will be sufficient, for
example.
>
> You have written the following:
>
> I am trying to merge the results of multiple columns into 1 column or
Alias,
> group them and sort them.
>
> So if I had a table with 4 fields: Cat1, Cat2, Cat3, & Cat4 like such:
>
> +-+--+-+--+
> | Cat1| Cat2 | Cat3| Cat4 |
> +-+--+-+--+
> |  F |   A   | |   A   |
> |  D |   C   |   H   |   A   |
> |  G | | | |
> |  F  |   B   |   I |   A   |
> +-+--+-+--+
>
> It would select all the values, merge them into 1 column, group them, and
> sort them like such so that the result would be a single column, returning
> only 1 instance of each returned value:
>
> ++
> | Result |
> ++
> | A |
> | B |
> | C |
> | D |
> | F |
> | G |
> | H |
> |  I |
> ++
>
> Is there as singe Select command that can do this?  Right now I am using a
> temporary table where I first clear out the values, then copy each column
> one at a time over into the tables...  It works, however, I was wondering
if
> there is an easier way to get the single column result with all the merged
> information without having to use a temporary table...
>
> Thanks,
>
> Doug Coning
>
>
>
>




-
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




problem with DELETE+REPLACE in InnoDB table

2003-01-23 Thread Stanislav Malyshev
We have a table in the database holding session data. The data is updated 
rather oftenly using REPLACE INTO query with primary key. Table structure 
is:
++---+--+-+-+---+
| Field  | Type  | Null | Key | Default | Extra |
++---+--+-+-+---+
| sesskey| varchar(32)   |  | PRI | |   |
| stamp  | timestamp(14) | YES  | MUL | NULL|   |
| value  | text  |  | | |   |
| secure_key | varchar(32)   | YES  | MUL | NULL|   |
++---+--+-+-+---+

Now, once a day there's a query launched that should delete all records 
with timestamp older than X days. The problem is that it seems to be 
very slow and lock out a lot of updates, which are essential for site 
workings, since the session page lifecycle goes as:
SELECT session data
do some stuff...
REPLACE INTO session data.

The error that is produced is: 1213 (Deadlock found when trying to get 
lock; Try restarting transaction)

First I have used the regular ISAM tables, but it just made the REPLACES
get stuck and the load on the servers rise. Then I replaced it with InnoDB
table, which should do better since the 'dead' rows to be removed should
not, theoretically, prevent data in 'live' rows from updating. However,
looks like it is not so - DELETE is still blocking REPLACE's and I'm
getting that error about deadlock. Am I doing something wrong? Is there
any other way to make DELETE not block the updates? Maybe some advices
about reworking the scheme so that cleanup could be doen without blocking
the work? The table has about 300.000 rows.

TIA,
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109







-
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




Memory optimization (my.cnf options). Please shed some light!

2003-01-23 Thread Maximo Migliari
Hello there,

I have moved from a Dual PIII--866 Server with linux redhat and 384MB of 
RAM, to a dual Athlon 1.5Ghz with FreeBSD 4.7-Stable installed and 1 GB of RAM.

Something I noticed, with the help of a few of you on the list, is that the 
configuration options I had done in my.cnf, specifically those dealing with 
memory,  behaved very differently from one machine instalation to the other.

When importing a medium-sized database (150 MB) insto the the more 
powerfull FreeBSD machine, with the same my.cnf memory settings as the old 
Linux machine, the server crashed complaining about memory usage.  Indeed, 
the error file gave warnings that the server crashed due to lack of memory 
- that mysql was trying to use 8 GB when I have only 1 GB.  However, the 
SAME my.cnf on linux would not give me these errors.  Its as if Linux had 
some kind of feature that would not allow a program to use more memory than 
the OS can allocate to it.  FreeBSD "trusted" my configuration and the 
server crashed.  I have reduced my memory settings in my.cnf and everything 
is working fine now.

Anyway, the point of this whole e-mail is to ask a few things about memory 
settings under my.cnf.  The manual at mysql.com is very detailed, however, 
there are certain things that are vague to me now, especially since InnoDB 
was introduced.

Since InnoDB is a separate table manager, it has its own memory settings - 
but there are some things which to me are extremely ambiguous.  For 
example, when you set the key_buffer to a specific value, does that also 
count for InnoDB, or are ALL memory settings for InnoDB separate?
Do the table_cache, record_buffer and sort_buffer also affect InnoDB??

Its very hard "tuning" mysql with so many variables and so little specific 
information in the documentation - especially when you are using BOTH 
MyISAM and InnoDB.

For example, what is better, to have a huge key_buffer and fewer maximum 
connections, or to have higher maximum connections and less memory for the 
key_buffer?

My website, during its peak produces arround 50-60 queries a second.  Since 
my database is around 170 MB, and I have 1 GB of RAM, I would like to have 
it all in memory to speed things up.  If need be, I would convert all my 
tables to InnoDB and have less memory allocated to MyISAM-specific 
things.  There is very little documentation that explains this.

Perhaps Paul Dubois, who is versed in the documentation could shed some 
light into this matter?  Perhaps some of you guys could write what you 
understand and know, what works for you with regards to memory optimization?

Thanks in advance for your help!
Maximo Migliari.
www.cheathouse.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: Install on WIN2k

2003-01-23 Thread Norris, Joseph
Stefan,

I have checked these things.  To re-state the problem. I already have mysql
up and running
on several servers with apps accessing them from my web site. This is just a
new install
but it has been so long that I have forgotten what to do about this
localhost situation.

Thanks.

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 2:27 AM
To: Norris, Joseph; Mysql_List (E-mail)
Subject: Re: Install on WIN2k


Norris,

> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
> I remember this well but I don't remember what I did to fix it.

Not to be impolite, but I'd say you should simply start the MySQL server
:)

Check system control > administration > services if there is a service
called "Mysql", and if it's running. If not, install the service (I'd
suggest to use winmysqladmin.exe for this) and start it. If you're
having problems like the MySQL server starts but crashes immediately
after starting, you can try this in a DOS window:

c:\mysql\bin> mysqld --standalone --console

This will give you output in the DOS window so you can see why it keeps
crashing.

And, of course, you can use any other server than mysqld, e.g.
mysqld-max-nt.exe, to try the same. mysqld-max... has InnoDB tables
switched on by default, and there is a good chance something's wrong in
your setup and InnoDB can't create its tablespace etc. You will see all
of this in the DOS window output, though.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Norris, Joseph" <[EMAIL PROTECTED]>
To: "Mysql_List (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 1:55 AM
Subject: Install on WIN2k


> Hello,
>
> I have been running mysql on windows 2000 for about 8 months. Now I
have to
> install it on a new win2k box.
> I get everything installed and go to get into mysql and I am getting
this
> error:
>
>
> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
>
>
> I remember this well but I don't remember what I did to fix it.  Any
and all
> help appreciated.
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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

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

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




updating tables

2003-01-23 Thread Fabrizio Tivano

hello dear all, 

i have a problem updating tables:

in my queries i try to use REPLACE but  is same like INSERT command.

...i need only to refresh table_1 with  new entries from table_2.

any ideas?

TIA
 fabrizio

-
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: mysqld getting signal 14

2003-01-23 Thread Egor Egorov
On Wednesday 22 January 2003 16:34, rick wrote:

> I'm running mysql 3.23.42 on multiple machines (Solars 8, 32 bit) and on a
> couple of the machines I see the following in the .err log: ..
> 030120  9:11:10  Warning: Got signal 14 from thread 4
> 030120  9:11:10  Warning: Got signal 14 from thread 4
> 030122  2:20:09  Warning: Got signal 14 from thread 4
> 030122  2:20:09  Warning: Got signal 14 from thread 4
> ..
>
> It only occurs on a few machines, although all do the same type of
> processing.  On one machine, mysqld crashed and restarted (it had been
> running for several months).  It's worth noting that on most machines, the
> .err log is error-free and mysqld has been up for 6-9 months in most cases.
>
> What is the cause of this SIGALRM?  And it's always thread 4, on every
> machine that it occurs?.  Is this a known bug or problem fixed in a later
> release (and yes, I went through the list of fixes and did not see this
> explicitly)?

Could you check it on the latest stable version?



-- 
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




Bind Variables.

2003-01-23 Thread Alvaro Avello
Hi everybody:
I 'm actually having an problem trying to mygrate to mysql. it's true 
that mysql does not support bind variables ? . Actually the development 
in my company is over Centura team developer connected to Centura 
Sqlbase , and the code of the aplications is widely using bind variables 
. there is a workaround for this ? there is a posibility that in the 
future releases of mysql bind variables will be supported ?' thanks in 
advance.

Alvaro.


-
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



Red Hat/Mandrake or Other

2003-01-23 Thread Fernando Grijalba
I would like to know which Linux Distribution is best suited to run MySQL
4.0.9.  I was thinking of Red Hat or Mandrake so if someone could tell me
which of these is better for a production system or if there is a better
distro other than these two

Your comments are really appreciated.

Thank you,

JFernando
* 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




How to write this query??

2003-01-23 Thread Inandjo Taurel
hi all,
i have a table trans with this structure:

today(date) | heure1(time) | amount(double) | client(varchar 30)

Now i need to write a query that would take the start date and time, end 
date and time, and return all the records between the two.

So for example, the query should return all records between 01/01/2002 at 
17:00 and 01/30/2002 at 08:00.
How can i get that query in one query??

SQL SQL


_
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: Transaction Support in mysql13.23.54

2003-01-23 Thread Robert Tam
Correct me if I am wrong, but I believe mysql 3.23.54 does not support
transaction support, version 3.23.54 has row locking only.  Transaction
feature starts with version 4.0.x.

Bob

- Original Message -
From: "Nirmal Shah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 7:56 PM
Subject: Transaction Support in mysql13.23.54


> hi,
> i have installed mysql3.23.54 on windows and have
> followed all instructions as required for using
> mysqld-max to have transaction support.
> i have created a table using TYPE=INNODB, but cannot
> use rollback on it.
> the error i get in my jsp is "transactions not
> supported".
> please advice me on how i can use commit - rollback on
> mysql database tables.
> I am connecting to the mysql database thru my java
> web-app.
> thank you in advance.
> regards,
> nirmal
> (23 jan 03)
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> -
> Before posting, please check:
>http://www.mysql.com/doc/ (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[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




Problem (server crashes) with Version 3.23.54 on remoteconnections

2003-01-23 Thread Martin Abell
MySQL support: none
Synopsis:  Server crashes on remote connection
Severity:  serious
Priority:  high
Category:  mysql
Class: Bug / Local Problem?
Release:   mysql-3.23.54 (Source distribution)

mysql-server-3.23.54a-4
mysql-3.23.54a-4
mysql-devel-3.23.54a-4
 (used rpms from updates.redhatcom)

RedHat 8.0, kernel 2.4.18-19.8.0 i686 i686 i386 GNU/Linux
Architecture: i686
Pentium 4, 1.9 Ghz
512 Mb memory
glibc-2.2.93-5

A second machine also has the same symptoms.  It is similar, except the disk
drive setup is completely different.

SYMPTOM
In the log (below) any line beginning "Tcp port: 3306" is an attempt to
connect remotely (using a GUI client, or using command line mysql, or using
a perl program) that fails.  That's the only evidence of the attempt.
(Maybe a different logging option would give more info?  We used
--debug=d,general,query as suggested in manual.)  Queries from localhost all
seem to work.

For example, with perl, Apache log (with specifics edited out) says:
DBI->connect(databasename:hostname.domainname.net:3306) failed: Lost
connection to MySQL server during query at /path/cat_show.pl line 22.

And... and other open connections (localhost) were lost at the same time and
had to reconnect on next query.

Using mysql at command line gives basically the same complaint.

 The Uptime shows that mysqld has restarted mysql in each case.

Connection attempts are as user martin.  User table is:
+---++--+-+
| Host  | User   | Password | All_priv|
+---++--+-+
| localhost | root   |  | Y   |
| localhost | martin |  | Y   |
| % | martin |  | Y   |
+---++--+-+
(All users have all privileges and a password.) ipTables is disabled.

I did a shutdown and ran ISAMCHK on MYI files as suggested in manual.

Any feedback would be appreciated.

Martin Abell
SpeedSpan

= LOG 

tail -50 sp31.log 

Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time Id CommandArgument
030122 22:51:47   1 Connect root@localhost on
  1 Statistics
  1 Quit
/usr/libexec/mysqld, Version: 3.23.54-log, started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time Id CommandArgument
030122 23:05:12   1 Connect root@localhost on
  1 Query   SHOW VARIABLES LIKE 'pid_file'
  1 Shutdown
/usr/libexec/mysqld, Version: 3.23.54-log, started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time Id CommandArgument
030122 23:22:54   1 Connect Access denied for user: 'root@localhost'
(Using password: YES)
030122 23:23:21   2 Connect root@localhost on
030123  9:15:57   3 Connect root@localhost on
030123  9:16:02   3 Init DB mysql
  3 Query   show databases
  3 Query   show tables
  3 Field List  columns_priv
  3 Field List  db
  3 Field List  func
  3 Field List  host
  3 Field List  tables_priv
  3 Field List  user
030123  9:16:12   3 Query   select * from user
030123  9:17:23   4 Connect root@localhost on
  4 Statistics
  4 Quit
030123  9:17:51   5 Connect root@localhost on
  5 Statistics
  5 Quit
/usr/libexec/mysqld, Version: 3.23.54-log, started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time Id CommandArgument
030123  9:17:59   1 Connect root@localhost on
  1 Statistics
  1 Quit
030123  9:18:46   2 Connect root@localhost on mysql
  2 Query   show databases
  2 Query   show tables
  2 Field List  columns_priv
  2 Field List  db
  2 Field List  func
  2 Field List  host
  2 Field List  tables_priv
  2 Field List  user
  2 Query   show variables
030123  9:27:15   2 Query   show variables





= VARIABLES 

mysql> show variables \G
*** 1. row ***
Variable_name: back_log
Value: 50
*** 2. row ***
Variable_name: basedir
Value: /usr/
*** 3. row ***
Variable_name: bdb_cache_size
Value: 8388600
*** 4. row ***
Va

Changing InnoDB files

2003-01-23 Thread Michael T. Babcock
As the person who's asking a question and just had it rejected twice, 
here it is again ... sql, query, blah, blah.

I have three InnoDB data files that I've created as time has gone on; 
100M, 250M and 1G (autoextend).  I would like to create a new data file 
on a new raid partition and make it autoextend instead of the current 
one.  How do I properly set the size on the current file so that it has 
no problems if I remove the autoextend keyword, or is this not.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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



Memory optimization (my.cnf options). Please shed some light!

2003-01-23 Thread Maximo Migliari
Hello there,

I have moved from a Dual PIII--866 Server with linux redhat and 384MB of 
RAM, to a dual Athlon 1.5Ghz with FreeBSD 4.7-Stable installed and 1 GB of RAM.

Something I noticed, with the help of a few of you on the list, is that the 
configuration options I had done in my.cnf, specifically those dealing with 
memory,  behaved very differently from one machine instalation to the other.

When importing a medium-sized database (150 MB) insto the the more 
powerfull FreeBSD machine, with the same my.cnf memory settings as the old 
Linux machine, the server crashed complaining about memory usage.  Indeed, 
the error file gave warnings that the server crashed due to lack of memory 
- that mysql was trying to use 8 GB when I have only 1 GB.  However, the 
SAME my.cnf on linux would not give me these errors.  Its as if Linux had 
some kind of feature that would not allow a program to use more memory than 
the OS can allocate to it.  FreeBSD "trusted" my configuration and the 
server crashed.  I have reduced my memory settings in my.cnf and everything 
is working fine now.

Anyway, the point of this whole e-mail is to ask a few things about memory 
settings under my.cnf.  The manual at mysql.com is very detailed, however, 
there are certain things that are vague to me now, especially since InnoDB 
was introduced.

Since InnoDB is a separate table manager, it has its own memory settings - 
but there are some things which to me are extremely ambiguous.  For 
example, when you set the key_buffer to a specific value, does that also 
count for InnoDB, or are ALL memory settings for InnoDB separate?
Do the table_cache, record_buffer and sort_buffer also affect InnoDB??

Its very hard "tuning" mysql with so many variables and so little specific 
information in the documentation - especially when you are using BOTH 
MyISAM and InnoDB.

For example, what is better, to have a huge key_buffer and fewer maximum 
connections, or to have higher maximum connections and less memory for the 
key_buffer?

My website, during its peak produces arround 50-60 queries a second.  Since 
my database is around 170 MB, and I have 1 GB of RAM, I would like to have 
it all in memory to speed things up.  If need be, I would convert all my 
tables to InnoDB and have less memory allocated to MyISAM-specific 
things.  There is very little documentation that explains this.

Perhaps Paul Dubois, who is versed in the documentation could shed some 
light into this matter?  Perhaps some of you guys could write what you 
understand and know, what works for you with regards to memory optimization?

Thanks in advance for your help!
Maximo Migliari.
www.cheathouse.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: Transaction Support in mysql13.23.54

2003-01-23 Thread Jayce^
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday 22 January 2003 08:56 pm, Nirmal Shah wrote:
> hi,
> i have installed mysql3.23.54 on windows and have
> followed all instructions as required for using
> mysqld-max to have transaction support.
> i have created a table using TYPE=INNODB, but cannot
> use rollback on it.
> the error i get in my jsp is "transactions not
> supported".
> please advice me on how i can use commit - rollback on
> mysql database tables.

You might check your connection to, I received a similar on a machine 
connecting through perl/DBI, and the problem was that the DBI package merely 
needed upgrading, mysql had been set up correctly.  If your mysql really is 
set up right, you could verify this by trying to perform a transaction via 
command line.  If it works there, it's your connection most likely.

- -- 
- --Jayce^
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+MCoIA10/0O8cAHgRAgRWAKC1sZxyOoV+He8dZSe+vHbmTwlyMgCfVqrs
c6+peQEq9/gIBwOxASBfYDk=
=Y/8s
-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




[ current date ]

2003-01-23 Thread Elby Vaz
hello people,

I want to construct a table, and in this table I have a column (date type) 
that if I insert blank date, the MySQL automaticly insert the current date 
of system.
How do I do it?

Thanks,
Elby.





_
MSN Messenger: converse com os seus amigos online.  
http://messenger.msn.com.br


-
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: mysqlstat (WAS Re: Optimizing Ext3 for MySQL)

2003-01-23 Thread Michael T. Babcock
Jeremy Zawodny wrote:


Now, I just have to remember to push out mytop 1.3 so that folks can
shake out any new bugs I've introduced...
 


Just make it one binary that recognizes its argv[0] calling (like gzip) 
and also supports command-line options.  The two data collection methods 
are the same ... so you might as well have essentially `alias mysqlstat 
$x='mytop --vmstat=$x'` (yes, I know that's not valid bash symantics).

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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



Building MySQL with LinuxThreads

2003-01-23 Thread Jonathan Disher
I have been trying, for the past two days, to successfully build MySQL
3.23.54 using LinuxThreads on a FreeBSD 5.0-RELEASE SMP box.
Unfortunately, I have been unable to get a successful, working build.

Some of the failed builds I have had:
* Successfully compiles and installs, but gets a signal 11 upon start.
* Successfully compiles, installs, and starts, but does nothing (except
fork() another process) when something tries to connect.
* Successfully compiles and installs, but complains about pthred mutexes
or some such when trying to initialize InnoBase (which isn't that big of a
deal, since I'm not using innobase tables).

I'm running FreeBSD 5.0-RELEASE on a dual Athlon MP2200+ with 1GB of ram.
I installed LinuxThreads 2.2.3_9 from ports, and am compiling MySQL from
source.  I've looked around on the mailing list archives, but not found an
answer to the problems.

We need to be able to use both CPUs for this project, and, while
I'd prefer we used Solaris or Linux, the boss is the boss, and he wants
FreeBSD.  If someone can walk me through making this work, I would very
much appreciate it.  If more information is needed, that's not a problem.

Thanks.

-j


-
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 write this query??

2003-01-23 Thread Inandjo Taurel




hi all,
i have a table trans with this structure:

today(date) | heure1(time) | amount(double) | client(varchar 30)

Now i need to write a query that would take the start date and time, end 
date and time, and return all the records between the two.

So for example, the query should return all records between 01/01/2002 at 
17:00 and 01/30/2002 at 08:00.
How can i get that query in one query??

SQL SQL

_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


-
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



Is this possible?

2003-01-23 Thread Doug Coning
Is this possible in MySQL without using a temporary table with multiple SQL
commands:

I am trying to SELECT the results of multiple columns into 1 column or
Alias,
group them and sort them.

So if I had a table with 4 fields: Cat1, Cat2, Cat3, & Cat4 like such:

+-+--+-+--+
| Cat1| Cat2 | Cat3| Cat4 |
+-+--+-+--+
|  F |   A   | |   A   |
|  D |   C   |   H   |   A   |
|  G | | | |
|  F  |   B   |   I |   A   |
+-+--+-+--+

It would select all the values, merge them into 1 column, group them, and
sort them like such so that the result would be a single column, returning
only 1 instance of each returned value:

++
| Result |
++
| A |
| B |
| C |
| D |
| F |
| G |
| H |
|  I |
++

Is there as singe Select command that can do this?  Right now I am using a
temporary table where I first clear out the values, then copy each column
one at a time over into the tables...  It works, however, I was wondering if
there is an easier way to get the single column result with all the merged
information without having to use a temporary table...

Thanks,

Doug Coning





-
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




group multiple queries.. if one fails all fail

2003-01-23 Thread Ciprian I. Acatrinei
Hi,

I looked a lot and I couldn't find a solution to this problem:

Ex: I have 5 queries. I run them and one of them fails. The rest are ok.
So 4 tables are affected and one is not. Is there a way of testing the
queries if they will be successful and only if all of them are then they
should be run?

Thank you,
-- 
Ciprian I. Acatrinei <[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




group multiple queries.. if one fails all fail

2003-01-23 Thread Ciprian I. Acatrinei
Hi,

I looked a lot and I couldn't find a solution to this problem:

Ex: I have 5 queries. I run them and one of them fails. The rest are ok.
So 4 tables are affected and one is not. Is there a way of testing the
queries if they will be successful and only if all of them are then they
should be run?

Thank you,
-- 
Ciprian I. Acatrinei <[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




How to write this query??

2003-01-23 Thread Inandjo Taurel




hi all,
i have a table trans with this structure:

today(date) | heure1(time) | amount(double) | client(varchar 30)

Now i need to write a query that would take the start date and time, end 
date and time, and return all the records between the two.

So for example, the query should return all records between 01/01/2002 at 
17:00 and 01/30/2002 at 08:00.
How can i get that query in one query??

SQL SQL


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


-
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: FreeBSD 5.0 Thread Work...

2003-01-23 Thread Ken Menzel
Hi Jeremy,
   My only concern with LinuxThreads is building MySQL 4.0 or 4.1 with
them as there is still not a FreeBSD port for MySQL 4 !!!  I had alot
of trouble making Linux Threads work initialy.  If people want to use
MySQL 4 and want to build from ports (the recommended method) I think
they are stuck at present.  Building from source with native threads
is easy.

Do you have a shell script you would share that builds MySQL 4.0
and/or 4.1 from source with Linux Threads?

Thanks for all the help and great answers you always provide,
Ken
- Original Message -
From: "Jeremy Zawodny" <[EMAIL PROTECTED]>
To: "Grigor, Peter" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 4:45 PM
Subject: Re: FreeBSD 5.0 Thread Work...


> On Mon, Jan 20, 2003 at 02:20:10PM -0500, Grigor, Peter wrote:
> > Alrighty then!
> >
> > Now FreeBSD 5.0 has been released, what are the plans for mysql to
evaluate
> > the new (really new :) thread implementation.
>
> What's wrong with LinuxThreads on FreeBSD?  It works great with
> FreeBSD 4.x.
>
> Jeremy
> --
> Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
> <[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/
>
> MySQL 4.0.8: up 2 days, processed 83,092,818 queries (328/sec. avg)
>
> 
-
> 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




[Help MySQL-3.23.54a crash on AIX 5.1 when connect through TCP/IP]

2003-01-23 Thread yongh
>Description:

>How-To-Repeat:

>Fix:


>Submitter-Id:  
>Originator:DBA User
>Organization:
 
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:  
>Severity:  
>Priority:  
>Category:  mysql
>Class: 
>Release:   mysql-3.23.54 (Source distribution)
>Server: ../client/mysqladmin  Ver 8.23 Distrib 3.23.54, for ibm-aix5.1.0.0 on powerpc
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.54-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 20 min 37 sec

Threads: 1  Questions: 3  Slow queries: 0  Opens: 6  Flush tables: 1  Open tables: 0 
Queries per second avg: 0.002
>Environment:

System: AIX boveri 1 5 000B078F4C00


Some paths:  /usr/bin/perl /usr/linux/bin//make /usr/opt/freeware/bin/gmake 
/usr/bin/gcc
GCC: Reading specs from 
/usr/bin/../lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/specs
gcc version 2.9-aix51-020209
Compilation info: CC='/usr/local/bin/gcc -pipe -Wa,-many'  CFLAGS=''  
CXX='/usr/local/bin/g++ -pipe -Wa,-many'  CXXFLAGS='-felide-constructors 
-fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 bin  bin19 Jan  6 15:04 /lib/libc.a -> 
/usr/ccs/lib/libc.a
lrwxrwxrwx1 bin  bin19 Jan  6 15:04 /usr/lib/libc.a -> 
/usr/ccs/lib/libc.a
Configure command: ./configure '--enable-static' '--disable-shared' 
'--prefix=/usr/local/mysql' '--localstatedir=/shark1/mysql/data' 
'--sbindir=/usr/local/sbin' '--libexecdir=/usr/local/sbin' 
'--enable-thread-safe-client' '--enable-large-files' '--with-mysqld-user=dba' 
'--with-innodb' 'CC=/usr/local/bin/gcc -pipe -Wa,-many' 'CXXFLAGS=-felide-constructors 
-fno-exceptions -fno-rtti' 'CXX=/usr/local/bin/g++ -pipe -Wa,-many'


-
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: gethostbyname_r() (un)bug in MySQL source build

2003-01-23 Thread Gelu Gogancea
Hi,
IMHO:
I think if you use autoheader it's possible to fix that according with your
glibc/compiler version.Also (...from what i remember what i saw in the
source code)  is used macros for checking GLIBC2 style.

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: "Michael Bacarella" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 4:23 PM
Subject: gethostbyname_r() (un)bug in MySQL source build


> Hope everyone's having fun at LinuxWorld.
>
>
> I couldn't find any discussion of a solution for this (according
> to Google, mysql.com search), other than at least a dozen reports
> from people having trouble with it.  The bug is that the proper error
> is not reported and at least I was sent on a wild goose chase.
>
> In attempting to build MySQL 3.23.54a on a fresh Red Hat 8.0:
>
> libmysql.c: In function `mysql_real_connect':
> libmysql.c:1325: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
> libmysql.c:1325: too few arguments to function `gethostbyname_r'
> libmysql.c:1325: warning: assignment makes pointer from integer without a
cast
>
> Very odd.  What ends up being generated in include/my_net.h is:
>
> #define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),
>
> When it should be generating:
>
> struct hostent *my_gethostbyname_r(const char *name,struct hostent
> *result, char *buffer,int buflen, int *h_errnop);
>
> It does not get generated because ./configure does not detect GLIBC2's
> gethostbyname_r() even though it is there, and it is the six argument
> version that ends up being called with five.
>
> The problem actually has nothing to do with gethostbyname_r().
>
> The problem is that g++ is not installed.  The configure test program
> for gethostbyname_r() type depends on a C++ compiler, and ./configure is
> not halting the process for lack of C++ compiler:
>
> configure:19299: checking style of gethostname_r routines
> configure:19347: g++ -c -O -DDBUG_OFFconftest.cc >&5
> ./configure: line 1: g++: command not found
> configure:19350: $? = 127
> configure: failed program was:
> #line 19316 "configure"
> #include "confdefs.h"
> #undef inline
> #if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT)
> #define _REENTRANT
> #endif
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #ifdef F77_DUMMY_MAIN
> #  ifdef __cplusplus
>  extern "C"
> #  endif
>int F77_DUMMY_MAIN() { return 1; }
> #endif
> int
> main ()
> {
> int skr;
>
>  skr = gethostbyname_r((const char *) 0,
>   (struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);
>   ;
>   return 0;
> }
>
> Solution?  Tell the user there is no C++ compiler if there is no C++
compiler.
>
> --
> Michael Bacarella  24/7 phone: 646 641-8662
> Netgraft Corporation   http://netgraft.com/
>   "unique technologies to empower your business"
>
> Finger email address for public key.  Key fingerprint:
>   C40C CB1E D2F6 7628 6308  F554 7A68 A5CF 0BD8 C055
>
> -
> 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




The diferences about /dev/hda1 and access via raw device

2003-01-23 Thread Dyego Souza do Carmo
Hi ! this question is very relevant for me !!!


The speed of InnoDB is more fast if the "raw device" is specified
with

/dev/hda1:20Gnewraw

or with created using /dev/hda1 ? ex:


bash# cd /dev
bash# sh MAKEDEV raw
bash# raw /dev/raw1 /dev/hda1

in my.cnf

/dev/raw1:20Gnewraw


The speed is more fast in the last case or no ?


Tanks,

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
-- 
$ 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




Financial packages

2003-01-23 Thread Ed Reed

Does anyone have a list of manufactures of financial packages that will
run with MySQL?
We need to move from Intuit Quickbooks to something that can
potentially scale to as many as 200 users. Greatplains and Solomon
appear to only run on SQLServer. 

Any suggestions or past upgrade experiences would be great.


-
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




Financial packages

2003-01-23 Thread Ed Reed
Does anyone have a list of manufactures of financial packages that will
run with MySQL?
We need to move from Intuit Quickbooks to something that can
potentially scale to as many as 200 users. Greatplains and Solomon
appear to only run on SQLServer. 

Any suggestions or past upgrade experiences would be great.


-
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: Transaction Support in mysql13.23.54

2003-01-23 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert Tam wrote:

Correct me if I am wrong, but I believe mysql 3.23.54 does not support
transaction support, version 3.23.54 has row locking only.  Transaction
feature starts with version 4.0.x.

Bob


You're corrected :)

3.23.54 supports InnoDB which has transactions.

The real question is, is what JDBC driver is giving the problems with 
'No Transaction Support' It either must be a very old version of 
MM.MySQL or the JDBC-ODBC bridge.

You should upgrade to MySQL Connector/J 3.0.x (Which is what MM.MySQL 
has become, now that I, the developer behind MM.MySQL am employed by 
MySQL AB). It supports transactions :)

See http://www.mysql.com/products/connector-j/

	-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+MFZFtvXNTca6JD8RArklAKCnRX99M+OiVYm0gclzJj+b5xeAiQCgkU0D
Gz1lK5Yw1qSxK7/V6pK/Mpw=
=kUJ5
-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: Red Hat/Mandrake or Other

2003-01-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Fernando --

...and then Fernando Grijalba said...
% 
% I would like to know which Linux Distribution is best suited to run MySQL
% 4.0.9.  I was thinking of Red Hat or Mandrake so if someone could tell me
% which of these is better for a production system or if there is a better
% distro other than these two

SuSE is the best.  Period.  It's awesome.

Well, OK; most of them are just fine and even if I'm not partial to
RedHat it still works.  If you've used a Linux flavor before, give that
one a shot first.  If you haven't used any Linux, give SuSE a try.



% 
% Your comments are really appreciated.
% 
% Thank you,
% 
% JFernando
% * sql *


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+MFagGb7uCXufRwARAtvLAKCb468jXYHnl65N2cDIUuLT4Xm6MQCdG+HF
T+mzMA7h2hUdiT0NTAF1qJM=
=gX+D
-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




query help

2003-01-23 Thread Johnny Withers

I'm pretty sure that I have two queries that could be combined
into one query using a JOIN, but I can not figure out how to do
it. Basically, I need all the rows from TABLE1 that are either
NOT in TABLE2 or IN TABLE2 BUT have been marked as voted by a
user id. Yes, that makes no sense, I'll try to explain it in the
layout of the tables and sql below.

Here's the table structure:

hh_images
id smallint unsigned not null auto_increment primary_key,
fname varchar(20) not null default 'n/a',
img varchar(64) not null default 'n/a'

hh_votes
vote tinyint unsigned not null default 0,
vote_for smallint unsigned not null default 0,
vote_by smallint unsigned not null default 0

hh_votes.vote_for and vote_by are indexed.

hh_votes.vote_by contains a user id, once someone has voted for a
particular image, their id, vote and which image they voted on are
stored in hh_votes, this is so they can not vote on an image again.

The two queries I have to get the images someone has NOT voted on
are:

SELECT vote_for FROM hh_votes WHERE vote_by=1;

=>4

SELECT id,fname,img FROM hh_images WHERE id NOT IN(4);

=>Results where id is not 4


I tried this query, but it only works if there is only one user id
in hh_votes:

SELECT hh_images.id,hh_images.fname,hh_images.img
FROM hh_images
LEFT JOIN hh_votes ON hh_images.id=hh_votes.vote_for
WHERE hh_votes.vote_for IS NULL
AND hh_votes.vote_by<>1;

(I realize that is because of hh_votes.vote_by<>1 gives matching rows
 for other user id's in hh_images).


Could someone give me some direction here?

-
Johnny Withers
[EMAIL PROTECTED]
p. 601.853.0211
c. 601.209.4985

 


-
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: Writing program to communicate with remote internet MySQL server?

2003-01-23 Thread Gelu Gogancea
Hi,
IMHO:
I think the better way is to use replication between your local MySQL server
and MySQL from the Web Server.

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: "Murray Wells" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 4:30 PM
Subject: Writing program to communicate with remote internet MySQL server?


> Hello All,
>
> For some time I've been wondering if it's possible to write a program
> that can automatically check my local MySQL server, create a recordset
> containing any new or updated records found in my local table(s) since
> the last check, and upload those new / updated records to the MySQL
> server my web site uses at phpwebhosting.com.
>
> My background is VB / VBA, but I also have access to Perl, Python and
> Ruby.
>
> I'm wondering if anyone can tell me if it's possible, using one of these
> languages, to connect to a remote MySQL server over the internet and to
> manipulate tables on the remote server as though they were recordset
> objects, similarly to how you might achieve this on a local server using
> MyODBC?
>
> The end goal is to develop a program I can fire as a Windows XP
> scheduled task to synchronize the remote database with the local one.
>
> Any help appreciated!
>
> Regards and best wishes,
>
> M Wells
>
>
>
> -
> 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: Changing InnoDB files

2003-01-23 Thread Grigor, Peter
Heya thar:

Take the file that you have as autoextend right now, round it down to the
nearest meg, and enter this value as the size (without autoextend).

Then make the new file autoextend.

Peter
<^_^>

-Original Message-
From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 12:18 PM
To: '[EMAIL PROTECTED]'
Subject: Changing InnoDB files


As the person who's asking a question and just had it rejected twice, 
here it is again ... sql, query, blah, blah.

I have three InnoDB data files that I've created as time has gone on; 
100M, 250M and 1G (autoextend).  I would like to create a new data file 
on a new raid partition and make it autoextend instead of the current 
one.  How do I properly set the size on the current file so that it has 
no problems if I remove the autoextend keyword, or is this not.

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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




Major Problems when compiling on Sol 8

2003-01-23 Thread mysqlhelp
I am trying to compile Solaris 8 (mysql 3.23.51)

configure works fine, when I get to the yacc part ...

yacc -d sql_yacc.yy && mv y.tab.c sql_yacc.c

yacc goes fatal saying an invalid escape at line 71 (pure_parser)

So, I try bison, but I get the following complaints ...

sql_yacc.yy:(some numbers) warning : type clash on default action:  
!= <>

make still continues - but the end result of this problem is that the sql 
command parser is useless, rendering mysql usless.

Any help is gretaly appreciated - at the end of my rope here.


-
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: Transaction Support in mysql13.23.54

2003-01-23 Thread Leila Lappin
I had this problem with my new install on windows.  In my case in turned out
to be that the tables were not created as innoDB even though I had specified
type=innoDB.  I'm not sure why this happened but I fixed the problem by
recreating the tables after I made sure that I have innoDB server running.
I issued
NET STOP MySQL
to shut down the mysql server that was running and started
mysqld-max-nt --console

And then I recreated my tables with type=innoDB option and it worked.


- Original Message -
From: "Jayce^" <[EMAIL PROTECTED]>
To: "Nirmal Shah" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 9:44 AM
Subject: Re: Transaction Support in mysql13.23.54


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday 22 January 2003 08:56 pm, Nirmal Shah wrote:
> hi,
> i have installed mysql3.23.54 on windows and have
> followed all instructions as required for using
> mysqld-max to have transaction support.
> i have created a table using TYPE=INNODB, but cannot
> use rollback on it.
> the error i get in my jsp is "transactions not
> supported".
> please advice me on how i can use commit - rollback on
> mysql database tables.

You might check your connection to, I received a similar on a machine
connecting through perl/DBI, and the problem was that the DBI package merely
needed upgrading, mysql had been set up correctly.  If your mysql really is
set up right, you could verify this by trying to perform a transaction via
command line.  If it works there, it's your connection most likely.

- --
- --Jayce^
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+MCoIA10/0O8cAHgRAgRWAKC1sZxyOoV+He8dZSe+vHbmTwlyMgCfVqrs
c6+peQEq9/gIBwOxASBfYDk=
=Y/8s
-END PGP SIGNATURE-


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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[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: Building MySQL with LinuxThreads

2003-01-23 Thread Jeremy Zawodny
On Thu, Jan 23, 2003 at 12:55:33PM -0500, Jonathan Disher wrote:
> I have been trying, for the past two days, to successfully build MySQL
> 3.23.54 using LinuxThreads on a FreeBSD 5.0-RELEASE SMP box.
> Unfortunately, I have been unable to get a successful, working build.

FWIW, my FreeBSD 4.x LinuxThreads recipie (if you want to call it
that) is now on-line.

  http://jeremy.zawodny.com/blog/archives/000458.html

(I've had several requests for it recently.)

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 4.0.8: up 4 days, processed 141,294,688 queries (327/sec. avg)

-
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




Safe to delete duplicate "root" user? "Any" users?

2003-01-23 Thread Robert K S
I have just set up MySQL and the phpmyadmin script and I would like to add 
some users and do some other administrative tasks to assure security.  Above 
all, I want to make sure no user (or php script) will have access to any 
databases without a user name and password.

Right now if I look at the list of users, I see:
Any "hostname"
root "hostname"
Any localhost
root localhost

1. What's the difference between "hostname" users and localhost users?  Why 
are there two?  Is one of them safe to delete?  If so, which one ("hostname" 
or localhost)?  (If it's of any relevance, I only plan on accessing the 
databases through SSH sessions to the host machine on which the MySQL server 
is running, and through PHP scripts also running on the same host machine.
2. If there IS a difference, when I create new users, do I need to create 
two of each?  I.e.,

newuser1 "hostname"
newuser1 localhost

3. What's the deal with the Any users?  Why do they exist?  Can I delete 
them?  Like I said, I don't want anyone to have access to the databases 
without a MySQL username and password.

I've searched the documentation and the web for answers, but I can't seem to 
find what I'm looking for.  Thanks to you if you can help, and you rock.

All the best,
Robert K S

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


-
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: [ current date ]

2003-01-23 Thread Stefan Hinz, iConnect \(Berlin\)
Elby,

> I want to construct a table, and in this table I have a column (date
type)
> that if I insert blank date, the MySQL automaticly insert the current
date
> of system.

You can use a TIMESTAMP column for this. If you insert NULL (or even
nothing at all) it will be set to the current date and time. If you only
want to see the current date, you can use DATE_FORMAT() when you select
the record(s). The TIMESTAMP will also be set to the current date and
time when you UPDATE the record.

For details, see: http://www.mysql.com/doc/en/DATETIME.html

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Elby Vaz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 6:48 PM
Subject: [ current date ]


> hello people,
>
> I want to construct a table, and in this table I have a column (date
type)
> that if I insert blank date, the MySQL automaticly insert the current
date
> of system.
> How do I do it?
>
> Thanks,
> Elby.
>
>
>
>
>
> _
> MSN Messenger: converse com os seus amigos online.
> http://messenger.msn.com.br
>
>
> -
> 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: updating tables

2003-01-23 Thread Stefan Hinz, iConnect \(Berlin\)
Fabrizio,

please send the table structures of table_1 and table_2 (DESCRIBE ...)
so we can do more for you than just guess what the problem might be.

REPLACE seems good in the first place, but if it just INSERTs then
there's a problem with the (primary) keys.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Fabrizio Tivano" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 5:22 PM
Subject: updating tables


>
> hello dear all,
>
> i have a problem updating tables:
>
> in my queries i try to use REPLACE but  is same like INSERT command.
>
> ...i need only to refresh table_1 with  new entries from table_2.
>
> any ideas?
>
> TIA
>  fabrizio
>
> -
> 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: Install on WIN2k

2003-01-23 Thread Stefan Hinz, iConnect \(Berlin\)
Joseph,

>> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

Okay, if MySQL is up and alive, you should check on which port it is
listening. For instance, you could (in a DOS window) do:

 mysqld --print-defaults

to find out if there are some strange configuration settings. If the
port is the problem, you could try to connect somehow like this:

 mysql -h localhost -p 3307

HTH,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Norris, Joseph" <[EMAIL PROTECTED]>
To: "'Stefan Hinz, iConnect (Berlin)'" <[EMAIL PROTECTED]>; "Norris,
Joseph" <[EMAIL PROTECTED]>; "Mysql_List (E-mail)"
<[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 5:20 PM
Subject: RE: Install on WIN2k


Stefan,

I have checked these things.  To re-state the problem. I already have
mysql
up and running
on several servers with apps accessing them from my web site. This is
just a
new install
but it has been so long that I have forgotten what to do about this
localhost situation.

Thanks.

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 2:27 AM
To: Norris, Joseph; Mysql_List (E-mail)
Subject: Re: Install on WIN2k


Norris,

> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
> I remember this well but I don't remember what I did to fix it.

Not to be impolite, but I'd say you should simply start the MySQL server
:)

Check system control > administration > services if there is a service
called "Mysql", and if it's running. If not, install the service (I'd
suggest to use winmysqladmin.exe for this) and start it. If you're
having problems like the MySQL server starts but crashes immediately
after starting, you can try this in a DOS window:

c:\mysql\bin> mysqld --standalone --console

This will give you output in the DOS window so you can see why it keeps
crashing.

And, of course, you can use any other server than mysqld, e.g.
mysqld-max-nt.exe, to try the same. mysqld-max... has InnoDB tables
switched on by default, and there is a good chance something's wrong in
your setup and InnoDB can't create its tablespace etc. You will see all
of this in the DOS window output, though.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Norris, Joseph" <[EMAIL PROTECTED]>
To: "Mysql_List (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 1:55 AM
Subject: Install on WIN2k


> Hello,
>
> I have been running mysql on windows 2000 for about 8 months. Now I
have to
> install it on a new win2k box.
> I get everything installed and go to get into mysql and I am getting
this
> error:
>
>
> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
>
>
> I remember this well but I don't remember what I did to fix it.  Any
and all
> help appreciated.
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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

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

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



-
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 (server crashes) with Version 3.23.54 on remoteconnections

2003-01-23 Thread Stefan Hinz, iConnect \(Berlin\)
Martin, Larry,

> Synopsis:  Server crashes on remote connection

I'm not a Unix guru but I experienced the same sympton on SuSE Linux
8.0/8.1, and I heard of people reporting the same of Red Hat Linux
7.x/8.x.

MySQL runs stable, you can connect from localhost via socket and tcp/ip,
but as soon as you try a connect from some other machine, mysqld
segfaults.

In all cases I heard of, the problem was some glibc version that caused
all the trouble. You say you use

> glibc-2.2.93-5

This version # looks a bit strange to me, well ... In a SuSE Linux
Newsgroup I heard that everything's okay if you use >= 2.2.5-151. We use
glibc-2.2.5-164 on SuSE Linux 8.1, and with our 3.23.54, we've had no
problems at all.

HTH,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Martin Abell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Larry Airaghi" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 6:10 PM
Subject: Problem (server crashes) with Version 3.23.54 on
remoteconnections


> MySQL support: none
> Synopsis:  Server crashes on remote connection
> Severity:  serious
> Priority:  high
> Category:  mysql
> Class: Bug / Local Problem?
> Release:   mysql-3.23.54 (Source distribution)
>
> mysql-server-3.23.54a-4
> mysql-3.23.54a-4
> mysql-devel-3.23.54a-4
>  (used rpms from updates.redhatcom)
>
> RedHat 8.0, kernel 2.4.18-19.8.0 i686 i686 i386 GNU/Linux
> Architecture: i686
> Pentium 4, 1.9 Ghz
> 512 Mb memory
> glibc-2.2.93-5
>
> A second machine also has the same symptoms.  It is similar, except
the disk
> drive setup is completely different.
>
> SYMPTOM
> In the log (below) any line beginning "Tcp port: 3306" is an attempt
to
> connect remotely (using a GUI client, or using command line mysql, or
using
> a perl program) that fails.  That's the only evidence of the attempt.
> (Maybe a different logging option would give more info?  We used
> --debug=d,general,query as suggested in manual.)  Queries from
localhost all
> seem to work.
>
> For example, with perl, Apache log (with specifics edited out) says:
> DBI->connect(databasename:hostname.domainname.net:3306) failed: Lost
> connection to MySQL server during query at /path/cat_show.pl line 22.
>
> And... and other open connections (localhost) were lost at the same
time and
> had to reconnect on next query.
>
> Using mysql at command line gives basically the same complaint.
>
>  The Uptime shows that mysqld has restarted mysql in each
case.
>
> Connection attempts are as user martin.  User table is:
> +---++--+-+
> | Host  | User   | Password | All_priv|
> +---++--+-+
> | localhost | root   |  | Y   |
> | localhost | martin |  | Y   |
> | % | martin |  | Y   |
> +---++--+-+
> (All users have all privileges and a password.) ipTables is disabled.
>
> I did a shutdown and ran ISAMCHK on MYI files as suggested in manual.
>
> Any feedback would be appreciated.
>
> Martin Abell
> SpeedSpan
>
> = LOG 
>
> tail -50 sp31.log
>
> Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
> Time Id CommandArgument
> 030122 22:51:47   1 Connect root@localhost on
>   1 Statistics
>   1 Quit
> /usr/libexec/mysqld, Version: 3.23.54-log, started with:
> Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
> Time Id CommandArgument
> 030122 23:05:12   1 Connect root@localhost on
>   1 Query   SHOW VARIABLES LIKE 'pid_file'
>   1 Shutdown
> /usr/libexec/mysqld, Version: 3.23.54-log, started with:
> Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
> Time Id CommandArgument
> 030122 23:22:54   1 Connect Access denied for user:
'root@localhost'
> (Using password: YES)
> 030122 23:23:21   2 Connect root@localhost on
> 030123  9:15:57   3 Connect root@localhost on
> 030123  9:16:02   3 Init DB mysql
>   3 Query   show databases
>   3 Query   show tables
>   3 Field List  columns_priv
>   3 Field List  db
>   3 Field List  func
>   3 Field List  host
>   3 Field List  tables_priv
>   3 Field List  user
> 030123  9:16:12   3 Query   select * from user
> 030123  9:17:23   4 Connect root@localhost on
>   4 Statistics
>   4 Quit
> 030123  9:17:51   5 Connect root@localhost on
>

RE: Install on WIN2k

2003-01-23 Thread Norris, Joseph
Thanks Stefan - I found the problem in my my.ini file. Fixed and on.

Thanks for the help.


-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 3:15 PM
To: Norris, Joseph; Mysql_List (E-mail)
Subject: Re: Install on WIN2k


Joseph,

>> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

Okay, if MySQL is up and alive, you should check on which port it is
listening. For instance, you could (in a DOS window) do:

 mysqld --print-defaults

to find out if there are some strange configuration settings. If the
port is the problem, you could try to connect somehow like this:

 mysql -h localhost -p 3307

HTH,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Norris, Joseph" <[EMAIL PROTECTED]>
To: "'Stefan Hinz, iConnect (Berlin)'" <[EMAIL PROTECTED]>; "Norris,
Joseph" <[EMAIL PROTECTED]>; "Mysql_List (E-mail)"
<[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 5:20 PM
Subject: RE: Install on WIN2k


Stefan,

I have checked these things.  To re-state the problem. I already have
mysql
up and running
on several servers with apps accessing them from my web site. This is
just a
new install
but it has been so long that I have forgotten what to do about this
localhost situation.

Thanks.

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 2:27 AM
To: Norris, Joseph; Mysql_List (E-mail)
Subject: Re: Install on WIN2k


Norris,

> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
> I remember this well but I don't remember what I did to fix it.

Not to be impolite, but I'd say you should simply start the MySQL server
:)

Check system control > administration > services if there is a service
called "Mysql", and if it's running. If not, install the service (I'd
suggest to use winmysqladmin.exe for this) and start it. If you're
having problems like the MySQL server starts but crashes immediately
after starting, you can try this in a DOS window:

c:\mysql\bin> mysqld --standalone --console

This will give you output in the DOS window so you can see why it keeps
crashing.

And, of course, you can use any other server than mysqld, e.g.
mysqld-max-nt.exe, to try the same. mysqld-max... has InnoDB tables
switched on by default, and there is a good chance something's wrong in
your setup and InnoDB can't create its tablespace etc. You will see all
of this in the DOS window output, though.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Norris, Joseph" <[EMAIL PROTECTED]>
To: "Mysql_List (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 1:55 AM
Subject: Install on WIN2k


> Hello,
>
> I have been running mysql on windows 2000 for about 8 months. Now I
have to
> install it on a new win2k box.
> I get everything installed and go to get into mysql and I am getting
this
> error:
>
>
> ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
>
>
> I remember this well but I don't remember what I did to fix it.  Any
and all
> help appreciated.
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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

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

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


-
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




ODBC Driver?

2003-01-23 Thread Jeffrey Powell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am preparing to migrate a client from using a large MS-ACCESS database to 
using a linux hosted MySql as the datasource. Or at least I'd like to be able 
to export tables as a backup.

Please tell me where I can get a driver.

Thanks,
- -- 
Jeff Powell
[EMAIL PROTECTED]
http://www.yonezawa-english-school.com
http://www.yonezawa-english-school.com/powell
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+MHrobJk3zHBW5lARAhyFAKDQ/bsoPm04VQVsq43+EpZNKb/DrwCeMmjO
B8Sf38yWG3Lb+ex3Rdoy1Rs=
=DajP
-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: Red Hat/Mandrake or Other

2003-01-23 Thread cal

Gentoo (www.gentoo.org)


*
* Cal Evans
* Techno-Mage
* http://www.calevans.com
*

- Original Message -
From: "Fernando Grijalba" <[EMAIL PROTECTED]>
To: "MySQL Help" <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 10:32 AM
Subject: Red Hat/Mandrake or Other


> I would like to know which Linux Distribution is best suited to run MySQL
> 4.0.9.  I was thinking of Red Hat or Mandrake so if someone could tell me
> which of these is better for a production system or if there is a better
> distro other than these two
>
> Your comments are really appreciated.
>
> Thank you,
>
> JFernando
> * 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
>
>
>


-
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: Entering Japanese characters into mySQL

2003-01-23 Thread Jeffrey Powell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Darren,

I can input Japanese text using Netscape 7.01 on a Linux PC I use a PHP script 
to write the submitted information to the database. Here is a dump from the 
"select *" query.

3
Eiji Goto
0
D
0
米沢

The Netscape->PHP->MySQL->PHP->Netscape path is OK.

I hope this helps you isolate the trouble.

Netscape 7.01
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

Jeff

- ---Original Message---
From:Darren Luckett
Sent: Thursday 23 January 2003 09:58 pm

 > hello,
 > 
 > I'm new to this mailing list and am having trouble with mySQL and 
 > japanese characters.
 > 
 > I have a web form in Netscape that the user enters japanese text 
 > (hiraghani). the data is posted to a dbinsert.jsp page. the problem is 
 > that somewhere along the line the character set transforms into 
 > half-width katakana (usually a language used for non-japanese origin 
 > words - i.e English or Computer).
 > 
 > I am using JSP and Tomcat with Apache on Mac OSX. I've tried setting the 
 > charset to Shift-JIS, JIS, ujis, AutoDetect & EUC but with no results. 
 > JIS is the most stable.
 > 
 > Can anybody help
 > 
 > Thanks
 > 
 > Darren Luckett
 > E: [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
 > 
 > 

- -- 
Jeff Powell
[EMAIL PROTECTED]
http://www.yonezawa-english-school.com
http://www.yonezawa-english-school.com/powell
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+MH95bJk3zHBW5lARApgxAJ4+0Gzknm7C34MobxA0pniWVizXagCglz2W
WJ+crra93Z96f35nNFsO6fI=
=zXls
-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: Is this possible?

2003-01-23 Thread cal
A guess...

select t1.cat1 as result from t1
union
select t2.cat2 as result from t1
union
select t3.cat3 as result from t1
union
select t4.cat4 as result from t1
group by result
order by result
*
* Cal Evans
* Techno-Mage
* http://www.calevans.com
*

- Original Message -
From: "Doug Coning" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 1:12 PM
Subject: Is this possible?


> Is this possible in MySQL without using a temporary table with multiple
SQL
> commands:
>
> I am trying to SELECT the results of multiple columns into 1 column or
> Alias,
> group them and sort them.
>
> So if I had a table with 4 fields: Cat1, Cat2, Cat3, & Cat4 like such:
>
> +-+--+-+--+
> | Cat1| Cat2 | Cat3| Cat4 |
> +-+--+-+--+
> |  F |   A   | |   A   |
> |  D |   C   |   H   |   A   |
> |  G | | | |
> |  F  |   B   |   I |   A   |
> +-+--+-+--+
>
> It would select all the values, merge them into 1 column, group them, and
> sort them like such so that the result would be a single column, returning
> only 1 instance of each returned value:
>
> ++
> | Result |
> ++
> | A |
> | B |
> | C |
> | D |
> | F |
> | G |
> | H |
> |  I |
> ++
>
> Is there as singe Select command that can do this?  Right now I am using a
> temporary table where I first clear out the values, then copy each column
> one at a time over into the tables...  It works, however, I was wondering
if
> there is an easier way to get the single column result with all the merged
> information without having to use a temporary table...
>
> Thanks,
>
> Doug Coning
>
>
>
>
>
> -
> 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: solution for opposite of this join / join from this subselect

2003-01-23 Thread Bill Easton
See interleaved comments below.

> Subject: solution for opposite of this join / join from this subselect
> To: [EMAIL PROTECTED]
> From: "Josh L Bernardini" <[EMAIL PROTECTED]>
> Date: Wed, 22 Jan 2003 11:23:44 -0800

> thanks to brent, bob and M wells for their contributions to this solution
> and to m especially who seems to have put in a lot of time and nailed it.

> This query returns a list of people not attending a particular event,
given
> an events table, a people table, and a many-many epeople table between
> them. You can modify the where clause to show all the people attending a
> particular event, all the events a person isn't/is attending - most of
what
> you might need in most many - many relationships.

> But I still haven't figured out the importance of left joins vs. right
> joins. can anyone explain why this statement requires a right join to
work?
> could it be rewritten to use a left join?

> mysql> SELECT lastname, firstname, title, event
> -> FROM people p
> -> LEFT JOIN epeople ep on p.id = ep.pid
> -> right join events e ON e.id = ep.eid
> -> WHERE ep.pid IS NULL
> -> and ep.eid is null
> -> and e.id=2
> -> ORDER BY e.id;

It can.  How about:

mysql> SELECT lastname, firstname, title, event
-> FROM events e
->   LEFT JOIN (people p
->  LEFT JOIN epeople ep on p.id = ep.pid)
->   ON e.id = ep.eid
-> WHERE ep.pid IS NULL
-> and ep.eid is null
-> and e.id=2
-> ORDER BY e.id;

This appears to work in MySQL 4.0.9; Mysql 3.23 didn't allow the
parentheses.
In fact, 4.0.9 appears to work without the parentheses, but 3.23 still
doesn't.
The point is, you want all of the people and all of the events, so you have
to have people on the left side of a left join and events on the left side
of a left join.

[...]

> now whats the functional difference between this

> SELECT lastname, firstname, title, event
> FROM people p
> LEFT JOIN epeople ep on p.id = ep.pid
> right join events e on ep.eid = e.id
> WHERE ep.pid IS NULL
> and e.id = 2
> ORDER BY ep.eid;

> and this

> SELECT lastname, firstname, title, event
> FROM people p
> LEFT JOIN epeople ep on p.id = ep.pid
> right join events e on ep.eid = e.id
> WHERE ep.pid IS NULL
> and ep.eid=2
> ORDER BY e.id;

> as written the difference is in the and statements but in my result set
> ep.eid == e.id == 2 so why can't you use the second statement
> interchangably with the first?

No, it's not so that ep.eid == e.id.
In the result of the join, before applying the where clause, ep.eid is null
and e.id is not null for a row corresponding to an event which has no
associated people.

> thanks for any insights,
> jb






-
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 cache not working with alter table rename as...

2003-01-23 Thread Sanja Byelkin
Hi!

Thank you for bugreport. This bug is fixed now. Here is patch for it:

diff -Nrc a/sql/sql_table.cc b/sql/sql_table.cc
*** a/sql/sql_table.cc  Fri Jan 24 01:54:55 2003
--- b/sql/sql_table.cc  Fri Jan 24 01:54:55 2003
***
*** 1432,1437 
--- 1432,1439 
}
send_ok(&thd->net);
  }
+ table_list->table=0;  // For query cache
+ query_cache_invalidate3(thd, table_list, 0);
  DBUG_RETURN(error);
}
  


-- 
Regards,
Alexander

-
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: FreeBSD 5.0 Thread Work...

2003-01-23 Thread Jeremy Zawodny
On Thu, Jan 23, 2003 at 01:47:43PM -0500, Ken Menzel wrote:
> Hi Jeremy,
>My only concern with LinuxThreads is building MySQL 4.0 or 4.1 with
> them as there is still not a FreeBSD port for MySQL 4 !!!  I had alot
> of trouble making Linux Threads work initialy.  If people want to use
> MySQL 4 and want to build from ports (the recommended method) I think
> they are stuck at present.  Building from source with native threads
> is easy.

Agreed.

But using native threads is so bad in other ways. :-(

> Do you have a shell script you would share that builds MySQL 4.0
> and/or 4.1 from source with Linux Threads?

Yeah, it's a bit messy, but I can dig it up tonight (or tomorrow) and
post it...

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 4.0.8: up 5 days, processed 141,611,972 queries (326/sec. avg)

-
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: Entering Japanese characters into mySQL

2003-01-23 Thread kk
In my case also I failed to set the charset to Shift-JIS though I put some
stuff in my *my.cnf.*
So I am now controlling the entire thing using my application. my charset is
still latin1. I just get the input string from the user, convert it to a
binary and store it in mysql. To display back I use vice versa.

You can use a bean component to do this job.

In case if you dont get this, mail me and I will send you my bean that you
can use in your program


regards
KayambooSuresh


- Original Message -
From: "Darren Luckett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 9:58 PM
Subject: Entering Japanese characters into mySQL


> hello,
>
> I'm new to this mailing list and am having trouble with mySQL and
> japanese characters.
>
> I have a web form in Netscape that the user enters japanese text
> (hiraghani). the data is posted to a dbinsert.jsp page. the problem is
> that somewhere along the line the character set transforms into
> half-width katakana (usually a language used for non-japanese origin
> words - i.e English or Computer).
>
> I am using JSP and Tomcat with Apache on Mac OSX. I've tried setting the
> charset to Shift-JIS, JIS, ujis, AutoDetect & EUC but with no results.
> JIS is the most stable.
>
> Can anybody help
>
> Thanks
>
> Darren Luckett
> E: [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
>


-
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: group multiple queries.. if one fails all fail

2003-01-23 Thread Steve Edberg
This would be called transactions: your're looking for COMMIT/ROLLBACK. As 
far as I know, transactions are only available on BDB and InnoDb table 
types. See

http://www.mysql.com/doc/en/Transactional_Commands.html

http://www.mysql.com/doc/en/InnoDB_overview.html



At 12:24 AM 1/23/03 , Ciprian I. Acatrinei wrote:
Hi,

I looked a lot and I couldn't find a solution to this problem:

Ex: I have 5 queries. I run them and one of them fails. The rest are ok.
So 4 tables are affected and one is not. Is there a way of testing the
queries if they will be successful and only if all of them are then they
should be run?

Thank you,
--
Ciprian I. Acatrinei <[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

++
| Steve Edberg  [EMAIL PROTECTED] |
| Database/Programming/SysAdmin(530)754-9127 |
| University of California, Davis http://pgfsun.ucdavis.edu/ |
+-- Gort, Klaatu barada nikto! --+


-
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: Is this possible?

2003-01-23 Thread Frank Peavy
I believe a sub-select with the DISTINCT command would do it.
You would have to look up the syntax.

Also, it seems that some people seem to be having a problem with 
sub-selects but
I don't have any direct experience to convey.


At 01:12 PM 1/23/03 -0600, Doug Coning wrote:
Is this possible in MySQL without using a temporary table with multiple SQL
commands:

I am trying to SELECT the results of multiple columns into 1 column or
Alias,
group them and sort them.

So if I had a table with 4 fields: Cat1, Cat2, Cat3, & Cat4 like such:

+-+--+-+--+
| Cat1| Cat2 | Cat3| Cat4 |
+-+--+-+--+
|  F |   A   | |   A   |
|  D |   C   |   H   |   A   |
|  G | | | |
|  F  |   B   |   I |   A   |
+-+--+-+--+

It would select all the values, merge them into 1 column, group them, and
sort them like such so that the result would be a single column, returning
only 1 instance of each returned value:

++
| Result |
++
| A |
| B |
| C |
| D |
| F |
| G |
| H |
|  I |
++

Is there as singe Select command that can do this?  Right now I am using a
temporary table where I first clear out the values, then copy each column
one at a time over into the tables...  It works, however, I was wondering if
there is an easier way to get the single column result with all the merged
information without having to use a temporary table...

Thanks,

Doug Coning





-
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: Entering Japanese characters into mySQL

2003-01-23 Thread Frank Peavy
Darren,
This sounds like a character set mis-match. I am wondering what character 
set the user is using and which OS.

If the user is using Netscape to enter their data, then I am assuming they 
are using an OS that supports the hira/kata/kanji character sets. What do 
they have their OS set to, from a character set perspective?

I think I would start there



At 12:58 PM 1/23/03 +, Darren Luckett wrote:
hello,

I'm new to this mailing list and am having trouble with mySQL and japanese 
characters.

I have a web form in Netscape that the user enters japanese text 
(hiraghani). the data is posted to a dbinsert.jsp page. the problem is 
that somewhere along the line the character set transforms into half-width 
katakana (usually a language used for non-japanese origin words - i.e 
English or Computer).

I am using JSP and Tomcat with Apache on Mac OSX. I've tried setting the 
charset to Shift-JIS, JIS, ujis, AutoDetect & EUC but with no results. JIS 
is the most stable.

Can anybody help

Thanks

Darren Luckett
E: [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




-
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




help with query

2003-01-23 Thread Justin French
sorry for the ambiguos subject, but not sure what terms to use!

I have four (relevant) tables:

category
partner(pid,pname,etc)
service(sid,sname,cid)
sid2pid(sid,pid)


This works fine, listing all services available within a category:

SELECT service.sid,service.sname
FROM service 
WHERE cid='3' 
ORDER BY service.sname ASC

eg:
Adventure 
Group 
Guided Tours 
Singles 
Skiing 
Under 35's 

But I want to get a count of how many times service.sid is found in the
table pid2sid as well...

eg:
Adventure (0)
Group (4)
Guided Tours (2)
Singles (45)
Skiing (0)
Under 35's (12)


I know I need to include a count(), and select from both service and
pid2sid, but other than that, I'm lost :)

TIA
Justin

query,sql


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

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




Re: The diferences about /dev/hda1 and access via raw device

2003-01-23 Thread Heikki Tuuri
Dyego,

- Original Message -
From: "Dyego Souza do Carmo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 10:35 PM
Subject: The diferences about /dev/hda1 and access via raw device


> Hi ! this question is very relevant for me !!!
>
>
> The speed of InnoDB is more fast if the "raw device" is specified
> with
>
> /dev/hda1:20Gnewraw
>
> or with created using /dev/hda1 ? ex:
>
>
> bash# cd /dev
> bash# sh MAKEDEV raw
> bash# raw /dev/raw1 /dev/hda1
>
> in my.cnf
>
> /dev/raw1:20Gnewraw
>
>
> The speed is more fast in the last case or no ?

I do not know.

Please test and report the results on this mailing list :).


> Tanks,

Thank you,

Heikki


> 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
> --
> $ 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




MySQL function in C API

2003-01-23 Thread Karen Zheng
Dear sir,

I am looking for a function which returns the column type in MySQL in C
API.
Is there one? I found in the document it describes the column types
like:

FIELD_TYPE_BLOB
FIELD_TYPE_DATE
FIELD_TYPE_VAR_STRING
... ...

Could you please get back to me if it is possible? Thank you very much.

Regards,

-Karen


-
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