MySQL problems with VC++ n Ado

2003-01-03 Thread cable
i cant add record to MySQL using VC++6 with Ado.. 
i can del record but i cant move forwrd.. it will have a error stating
tat 

Query-based update failed because the row to update cannot be found.

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

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: Order by does not use an index when it should.

2003-01-03 Thread Brian Lindner
harm,

Your order by will not use your weg_2 index because, as you stated,
weg_2 index is on (col1, col2, col3, nr) as a group so it wont be used
for the individual columns as you need

try to create a separate index on just the nr column, that should be used by the 
orderby
clause.  This way your weg_5 will be used for the where (the 3 col)
and the new index will be for the orderby

Hope that helps

--
 Brian Lindner

Friday, January 3, 2003, 8:05:05 PM, you wrote:
> Hello,

> I am trying to get a sort to use an index. The query is very simple:

> select nr from mytable where col1='const' and col2='another const' and col3='YA
> const' order by nr;

> The explain gives me:
> 
>+-+--+--+---+-+---+--+--+
> | table   | type | possible_keys| key   | key_len | ref
> | rows | Extra|
> 
>+-+--+--+---+-+---+--+--+
> | mytable | ref  | bla4,weg,weg_3,weg_4,weg_5,weg_2 | weg_5 |  17 |
> const,const,const | 2840 | Using where; Using index; Using filesort |
> 
>+-+--+--+---+-+---+--+--+

> According to the docs (http://www.mysql.com/doc/en/ORDER_BY_optimisation.html)
> it should use index 'weg_2', which is an index on (col1, col2, col3, nr)
> but it doesn`t. You are suppost to tell because there is the 'Using filesort' remark
> (Again according to the docs). And of course the query is quite slow.
> Index 'weg_5' is (col1, col2, col3).

> So, to summarise, the select itself is perfectly fine, using indexes as it should, 
>it is
> just the sort should use the index as wel.

> Did I misread the docs or is there anything else? Any clues?

> Thanks for your time,

> Harmen
> (Yes I know there are lots of redundant indexes, they are leftovers from
> tests to figure this out :)
> (Using 4.0.7, 3.23.50 did the same thing)




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

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 cant add or del usign VC++ with ADO

2003-01-03 Thread cable
i cant add or del the MySQL database using Ado with VC++6.. 
anyone done this b4?
pls help.. Thanks

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

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: Question - SELECT

2003-01-03 Thread Terence Ng
Thanks for your help, but I just want
/* this condition */ lcreceive.due_date < current_date
/* affect to */ SUM(lcreceive.amount_us)
/* and not */
SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open

Terence

 --- "Christensen, Dave" <[EMAIL PROTECTED]>
ªº¶l¥ó¤º®e¡G> SELECTlcopen.bank, 
>   SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8
> AS open,
>   SUM(lcreceive.amount_us), 
>   lcreceive.due_date as receive,
> FROM lcopen, lcreceive
> WHERE lcreceive.due_date < current_date
>   AND lcopen.id=lcreceive.id GROUP BY lcopen.bank;
> 
> 
> I think this will work better.
> 
> Dave
> -Original Message-
> From: Terence Ng [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 03, 2003 9:52 AM
> To: mysql
> Subject: Question - SELECT
> 
> 
> How do I correct this SQL code:
> 
> 2 tables there, and I want to add one conditon to
> item "receive" lcopen :
> id, bank, unit_price_us, order_cbm
> lcreceive: id, amount_us, due_date
> 
> SELECT
> lcopen.bank, 
> SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
> open,
> #
> SUM(lcreceive.amount_us) where lcreceive.due_date <
> current_date AS receive,
> # # the above statement is not correct for the #
> additional condition # FROM
> lcopen, lcreceive AND lcopen.id=lcreceive.id GROUP
> BY lcopen.bank;
> 
> Terence Ng
> 
> 
>
_
> Lonely
> Christmas(?ÞÈѸ)£¬ïL¹~ÅcïL(Twins)£¬ŸoégµÀ(?Ó°)...
> ÖÁInÊ֙C?? ÅãÄãß^¶¬Ìì
> http://ringtone.yahoo.com.hk
> 
>
-
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list
> archive)
> 
> To request this thread, e-mail
> <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
>
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php 

_
Lonely Christmas(³¯«³¨³)¡A­·ºå»P­·(Twins)¡AµL¶¡¹D(¹q¼v)...
¦ÜIn¤â¾÷¹aÁn ³­§A¹L¥V¤Ñ
http://ringtone.yahoo.com.hk

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

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




Order by does not use an index when it should.

2003-01-03 Thread harm
Hello,

I am trying to get a sort to use an index. The query is very simple:

select nr from mytable where col1='const' and col2='another const' and col3='YA
const' order by nr;

The explain gives me:
+-+--+--+---+-+---+--+--+
| table   | type | possible_keys| key   | key_len | ref
| rows | Extra|
+-+--+--+---+-+---+--+--+
| mytable | ref  | bla4,weg,weg_3,weg_4,weg_5,weg_2 | weg_5 |  17 |
const,const,const | 2840 | Using where; Using index; Using filesort |
+-+--+--+---+-+---+--+--+

According to the docs (http://www.mysql.com/doc/en/ORDER_BY_optimisation.html)
it should use index 'weg_2', which is an index on (col1, col2, col3, nr)
but it doesn`t. You are suppost to tell because there is the 'Using filesort' remark
(Again according to the docs). And of course the query is quite slow.
Index 'weg_5' is (col1, col2, col3).

So, to summarise, the select itself is perfectly fine, using indexes as it should, it 
is
just the sort should use the index as wel.

Did I misread the docs or is there anything else? Any clues?

Thanks for your time,

Harmen
(Yes I know there are lots of redundant indexes, they are leftovers from
tests to figure this out :)
(Using 4.0.7, 3.23.50 did the same thing)


-- 
The Moon is Waxing Crescent (2% of Full)
(filter bait: sql, etc)

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

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: auto increment question

2003-01-03 Thread Adolfo Bello
It sounds to me that a trigger would help, but mysql doesn't has them
yet.

Adolfo

> -Original Message-
> From: Paul DuBois [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 03, 2003 8:04 PM
> To: Kevin; [EMAIL PROTECTED]
> Subject: Re: auto increment question
> 
> 
> At 15:28 -0800 1/3/03, Kevin wrote:
> >Hello,
> >
> >I have a table with an ID column and a viewed column. I 
> would like the 
> >viewed column to increment by one each time the row is updated.
> >
> >Stats
> >===
> >ID
> >views
> >
> >is this possible?
> 
> Sure.  Since you're updating the row anyway, set the column 
> value to one more than its current value. :-)
> 
> No, it won't happen automatically, which I would guess is 
> what you're really asking.
> 
> >
> >-k
> >
> >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
> 
> 
> 
> 


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

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: auto increment question

2003-01-03 Thread Adolfo Bello
It sounds to me that a trigger would help, but mysql doesn't has them
yet.

Adolfo

> -Original Message-
> From: Paul DuBois [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 03, 2003 8:04 PM
> To: Kevin; [EMAIL PROTECTED]
> Subject: Re: auto increment question
> 
> 
> At 15:28 -0800 1/3/03, Kevin wrote:
> >Hello,
> >
> >I have a table with an ID column and a viewed column. I 
> would like the 
> >viewed column to increment by one each time the row is updated.
> >
> >Stats
> >===
> >ID
> >views
> >
> >is this possible?
> 
> Sure.  Since you're updating the row anyway, set the column 
> value to one more than its current value. :-)
> 
> No, it won't happen automatically, which I would guess is 
> what you're really asking.
> 
> >
> >-k
> >
> >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
> 
> 
> 
> 


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

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: auto increment question

2003-01-03 Thread Paul DuBois
At 15:28 -0800 1/3/03, Kevin wrote:

Hello,

I have a table with an ID column and a viewed column. I would like the
viewed column to increment by one each time the row is updated.

Stats
===
ID
views

is this possible?


Sure.  Since you're updating the row anyway, set the column value to
one more than its current value. :-)

No, it won't happen automatically, which I would guess is what you're
really asking.



-k

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




can't use MySQL control center 0.8.7-alpha update Chinese

2003-01-03 Thread Tony
Hi,

I can't use MySQL control center 0.8.7-alpha to insert records with fields
of Chinese GB2312 characters. The updated execution result is something
like "?20", I use varchar. I run it on IIS, Chinese windows2000
professtional with service pack3. But when I use console insert record
command, with windows console (code page 936 GBK), without control center,
it works fine. Also, same configuration works with "PremiumSoft MySQL
studio 4.7.2 trial version" to insert or update the record. So I guess
there must be something wrong with the MySQL control center 0.8.7-alpha.
Did I do something wrong or miss
something?

Can some one out there kind enough to help me get over it, I would
appreciate it very much.

Looking forward to hearing from you soon. 

Thank you!


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

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




Re: Info: Using MySQL as Mutex

2003-01-03 Thread Jeremy Zawodny
On Fri, Jan 03, 2003 at 11:10:38AM -0600, Dana Diederich wrote:
> Yup, MySQL works quite well as a lock server; we've been using it as such
> for years.

Yeah, do we.

> I would suggest looking at the get_lock() function specifically.  It's
> designed to do exactly what you're looking for, and it won't require
> knowledge of any tables or rows.

I thought so initially too, but locks from get_lock()/release_lock()
vanish when the connection vanishes.  We didn't want that.  It added
way to much complexity to our code, so we created a lock table and
went from there...
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 19 days, processed 679,216,889 queries (397/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




auto increment question

2003-01-03 Thread Kevin
Hello,

I have a table with an ID column and a viewed column. I would like the
viewed column to increment by one each time the row is updated.

Stats
===
ID
views

is this possible?

-k

sql, query


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

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




Re: Can Expect scripts interact with mysql ?

2003-01-03 Thread Cindy

"Paul Choy" writes:
 >Hi :
 >
 >I try your scripts except changing the spawn directory but still does not wor
 >k. I wonder is it because my mysql is window version and I am running the Exp
 >ect scripts in the Cygwin environment.Here is the output below. It looks like
 > Expect is not getting the feedback from mysql output.It keep waiting for "my
 >sql>" but did not find it.

Ah, er.  All my mysql+expect experience is on *nix platforms.  Sorry,
didn't spot that.  If it doesn't work to simply call it from a spawned
shell instead, I have no further suggestions.

--Cindy

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

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: configuring MySQL

2003-01-03 Thread Kevin Mihelich
[EMAIL PROTECTED] wrote:

Ok, I finally got a src version of MySQL that worked.  Now, i've got another
problem. I FINALLY found this "termcap" library, I guess it's part of Emacs.
SO, I
installed Emacs. I even checked that termcap.c was in the /src directory.
Now, I still get this error when configuring MySQL: "checking for termcap
functions library...
configure: error: No curses/termcap library found"

p.s. I'm using 3.23.51 (all the .54 srces I found dont work)


Depending on your linux distro (assuming you are using linux), you need 
to either find the package or compile the source for the ncurses 
library. On Debian, this would be something like, libncurses5-dev. 
termcap is a rather obsolete method for doing console screen functions, 
it is the ncurses library that you need to find and install, one way or 
another.
--
Kevin


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

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: configuring MySQL

2003-01-03 Thread notionx

Ok, I finally got a src version of MySQL that worked.  Now, i've got another
problem. I FINALLY found this "termcap" library, I guess it's part of Emacs.
SO, I
installed Emacs. I even checked that termcap.c was in the /src directory.
Now, I still get this error when configuring MySQL: "checking for termcap
functions library...
configure: error: No curses/termcap library found"

p.s. I'm using 3.23.51 (all the .54 srces I found dont work)


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

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




RE: Can Expect scripts interact with mysql ?

2003-01-03 Thread Paul Choy
Hi :

I try your scripts except changing the spawn directory but still does not work. I 
wonder is it because my mysql is window version and I am running the Expect scripts in 
the Cygwin environment.Here is the output below. It looks like Expect is not getting 
the feedback from mysql output.It keep waiting for "mysql>" but did not find it.

spawn /cygdrive/c/mysql/bin/mysql test
select version();
select now();
quit;
version()
4.0.5-beta-max-nt
now()
2003-01-03 14:28:07
ERROR 1064 at line 3: You have an error in your SQL syntax.  Check the manual th
at corresponds to your MySQL server version for the right syntax to use near 'qu
it' at line 1

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:11 PM
To: Paul Choy; [EMAIL PROTECTED]
Subject: RE: Can Expect scripts interact with mysql ?


At 11:37 -0800 1/3/03, Paul Choy wrote:
>"Paul Choy" writes:
>  >Hi :
>  >
>  >I am trying to run Expect scripts to interact with mysql. So far I 
>cannot get
>  > it to work here is the list of log I got.Does anyone know how to 
>interact Ex
>  >pect scripts with mysql. What am I missing ?
>
>I've done it, but I don't spawn directly.  I spawn a regular shell
>and then just send out the command to start it, eg
>
># start up command line interface to mysql
>send "/usr/local/mysql/bin/mysql -u root -p $dbname\r"
>
>and go on from there.  Works just fine.
>
>--Cindy

I just tried using expect on Jaguar, and didn't find it necessary to
spawn a shell.  Here's my script:

% cat junk
spawn /usr/local/mysql/bin/mysql test
send "select version();"
expect "mysql>"
send "select now();\r"
expect "mysql>"
send "quit;\r"
expect EOF


And here's the result of running it:

% expect junk
spawn /usr/local/mysql/bin/mysql test
select version();Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 52 to server version: 4.0.8-gamma-log

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

mysql> select version();select now();
+-+
| VERSION()   |
+-+
| 4.0.8-gamma-log |
+-+
1 row in set (0.01 sec)

+-+
| now()   |
+-+
| 2003-01-03 16:08:06 |
+-+
1 row in set (0.01 sec)

mysql> quit;
Bye

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

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: built in commands are atomic, right?

2003-01-03 Thread Heikki Tuuri
Kathryn,

- Original Message -
From: "Kathryn Cassidy" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Friday, January 03, 2003 1:14 PM
Subject: built in commands are atomic, right?


> Hi there,
>
> This is probably a rather foolish question, but I can't find a definitive
> answer anywhere in the docs and I don't like assumptions...
>
> Are all built in mysql commands atomic?  In particular, is replace
> atomic.  In the docs it says that it deletes the entry if it exists
> then inserts it, is that actually what it does (ie, is replace just
> a macro for delete followed by insert)?
>
> I'd imagine it is atomic, but I was wondering if anyone has a definitive
> answer for me.

yes, REPLACE is 'atomic'. The word 'atomic' has many meanings. One is that
no one can see a half-completed operation.

If your table is MyISAM, MySQL locks the entire table with an exclusive lock
for the duration of the REPLACE operation.

If your table is InnoDB, the procedure is this:

1. Try the insert. If it succeeds, good.
2. If the insert does not succeed because of a UNIQUE KEY violation, set a
shared lock on the conflicting index record. That guarantees the record is
there when we come to step 3.
3. Perform either an update or a delete + insert of the conflicting row.
These operations in InnoDB automatically set exclusive locks on the index
records they look at or change.

Since InnoDB in step 3 sets an exclusive lock on every index record which it
modifies, no one can see a 'half replace'.

For the same reason as for REPLACE, every SQL statement in MySQL is
'atomic'. That is essential for replication to work. The execution of the
SQL statements must keep the master and the slave identical, though in the
master the statements are processed concurrently, while the slave processes
them in the serial order of the binlog. We say that the execution of SQL
statements is 'serializable', and the serialization order is the order in
which they are written to the binlog.

> Thanks,
> Kathryn.

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://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: LOAD DATA LOCAL

2003-01-03 Thread Jon Bertsch

I posted the same question two weeks ago. The only suggestion was to add 
flags to the my.cnf file:

[mysqld]
local-infile=1

[mysql]
local-infile=1

But this didn't work.

I've tried using the flags on startup of MySQL as shown in the manual but 
this fails as well.

We were running 3.23.49.

I then upgraded to 3.23.54a which appears to have the command turned on 
when compiled - the configure line says --enable load data local - but it 
doesn't work for this version either (on my system).

I wrote a work around script to allow upload of the file through a form on 
the web server and then ftp it to my database server. I can then use LOAD 
DATA without the local to insert the data. This works but you have to have 
the correct permissions set on the directory that the file is FTP'd into. 
So if you can get the file to the correct server then just avoid the local 
part of the clause and give the path to the file while running the command 
line or SQL. Of course this approach recreates the security hole but my 
scripts are all behind login pages anyway.

Not much help I know, but you are not the only person having this problem.

Jon Bertsch

At 09:38 PM 1/3/2003 +0100, you wrote:
Hi,

(I posted this question once before in a Re: that everyone seems to have
missed ;-)

I use 4.0.7-max-nt on a Win2K box, and whatever I do, I cannot use LOAD
DATA LOCAL (keep getting error 1148). I tried:

- Starting the server with --local-infile=1, and with --local-infile.
- Starting the mysql client with --local-infile[=1]
- Combining server and client options

The manual page on this is quite contradictory.

I agree with the user comment on that manual page:

I just wasted 3 hours of my time tracking down this
annoying security "improvement" -- thanks but no
thanks, MySQL developers. This was poorly thought
out and poorly implemented.

Any hints how to make LOAD DATA LOCAL work in spite of this
"improvement"?

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



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

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: Can Expect scripts interact with mysql ?

2003-01-03 Thread Paul DuBois
At 11:37 -0800 1/3/03, Paul Choy wrote:

"Paul Choy" writes:
 >Hi :
 >
 >I am trying to run Expect scripts to interact with mysql. So far I 
cannot get
 > it to work here is the list of log I got.Does anyone know how to 
interact Ex
 >pect scripts with mysql. What am I missing ?

I've done it, but I don't spawn directly.  I spawn a regular shell
and then just send out the command to start it, eg

# start up command line interface to mysql
send "/usr/local/mysql/bin/mysql -u root -p $dbname\r"

and go on from there.  Works just fine.

--Cindy

I just tried using expect on Jaguar, and didn't find it necessary to
spawn a shell.  Here's my script:

% cat junk
spawn /usr/local/mysql/bin/mysql test
send "select version();"
expect "mysql>"
send "select now();\r"
expect "mysql>"
send "quit;\r"
expect EOF


And here's the result of running it:

% expect junk
spawn /usr/local/mysql/bin/mysql test
select version();Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 52 to server version: 4.0.8-gamma-log

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

mysql> select version();select now();
+-+
| VERSION()   |
+-+
| 4.0.8-gamma-log |
+-+
1 row in set (0.01 sec)

+-+
| now()   |
+-+
| 2003-01-03 16:08:06 |
+-+
1 row in set (0.01 sec)

mysql> quit;
Bye

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

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-03 Thread Stefan Hinz
Hi,

(I posted this question once before in a Re: that everyone seems to have
missed ;-)

I use 4.0.7-max-nt on a Win2K box, and whatever I do, I cannot use LOAD
DATA LOCAL (keep getting error 1148). I tried:

- Starting the server with --local-infile=1, and with --local-infile.
- Starting the mysql client with --local-infile[=1]
- Combining server and client options

The manual page on this is quite contradictory.

I agree with the user comment on that manual page:

I just wasted 3 hours of my time tracking down this
annoying security "improvement" -- thanks but no
thanks, MySQL developers. This was poorly thought
out and poorly implemented.

Any hints how to make LOAD DATA LOCAL work in spite of this
"improvement"?

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



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

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: Select Date Help

2003-01-03 Thread Max Clark
Thanks everyone for their help!

"Max Clark" <[EMAIL PROTECTED]> wrote in message
av2eai$8he$[EMAIL PROTECTED]">news:av2eai$8he$[EMAIL PROTECTED]...
> Hi all,
>
> I have a DATE column (CCYY-MM-DD), I would like to do a query like this:
>
> select * from table where date = '2003-01'
>
> What additional information do I need to provide for this query to work
> properly?
>
> Thanks in advance,
> Max
>
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Can Expect scripts interact with mysql ?

2003-01-03 Thread Paul Choy
Hi :

I try it but could not get it to work. Here is part of my scripts:

exp_internal -f error_file.txt 0
spawn bash
expect "*$ "
send "/cygdrive/c/mysql/bin/mysql -u root -p test\r"
expect "Enter password:"
send "\r"
expect "*mysql>"





spawn bash 
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {2544}

expect: does "" (spawn_id 5) match glob pattern "*$ "? no
]0;/cygdrive/c/mysql/bin
Administrator@VAN-PCHOY /cygdrive/c/mysql/bin
$ 
expect: does "\x1b]0;/cygdrive/c/mysql/bin\x07\r\n\x1b[32mAdministrator@VAN-PCHOY 
\x1b[33m/cygdrive/c/mysql/bin\x1b[0m\r\n$ " (spawn_id 5) match glob pattern "*$ "? yes
expect: set expect_out(0,string) 
"\x1b]0;/cygdrive/c/mysql/bin\x07\r\n\x1b[32mAdministrator@VAN-PCHOY 
\x1b[33m/cygdrive/c/mysql/bin\x1b[0m\r\n$ "
expect: set expect_out(spawn_id) "5"
expect: set expect_out(buffer) 
"\x1b]0;/cygdrive/c/mysql/bin\x07\r\n\x1b[32mAdministrator@VAN-PCHOY 
\x1b[33m/cygdrive/c/mysql/bin\x1b[0m\r\n$ "
send: sending "/cygdrive/c/mysql/bin/mysql -u root -p test\r" to { 5 }

expect: does "" (spawn_id 5) match glob pattern "Enter password:"? no
/cygdrive/c
expect: does "/cygdrive/c" (spawn_id 5) match glob pattern "Enter password:"? no
/mysq
expect: does "/cygdrive/c/mysq" (spawn_id 5) match glob pattern "Enter password:"? no
l/bi
expect: does "/cygdrive/c/mysql/bi" (spawn_id 5) match glob pattern "Enter password:"? 
no
n/mys
expect: does "/cygdrive/c/mysql/bin/mys" (spawn_id 5) match glob pattern "Enter 
password:"? no
ql -
expect: does "/cygdrive/c/mysql/bin/mysql -" (spawn_id 5) match glob pattern "Enter 
password:"? no
u roo
expect: does "/cygdrive/c/mysql/bin/mysql -u roo" (spawn_id 5) match glob pattern 
"Enter password:"? no
t -p
expect: does "/cygdrive/c/mysql/bin/mysql -u root -p" (spawn_id 5) match glob pattern 
"Enter password:"? no
 test
expect: does "/cygdrive/c/mysql/bin/mysql -u root -p test" (spawn_id 5) match glob 
pattern "Enter password:"? no


expect: does "/cygdrive/c/mysql/bin/mysql -u root -p test\r\n" (spawn_id 5) match glob 
pattern "Enter password:"? no
expect: timed out
send: sending "\r" to { 5 }

expect: does "/cygdrive/c/mysql/bin/mysql -u root -p test\r\n" (spawn_id 5) match glob 
pattern "*mysql>"? no


expect: does "/cygdrive/c/mysql/bin/mysql -u root -p test\r\n\r\n" (spawn_id 5) match 
glob pattern "*mysql>"? no
expect: timed out

-Original Message-
From: Cindy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 5:01 PM
To: [EMAIL PROTECTED]
Subject: Re: Can Expect scripts interact with mysql ? 



"Paul Choy" writes:
 >Hi :
 >
 >I am trying to run Expect scripts to interact with mysql. So far I cannot get
 > it to work here is the list of log I got.Does anyone know how to interact Ex
 >pect scripts with mysql. What am I missing ?

I've done it, but I don't spawn directly.  I spawn a regular shell
and then just send out the command to start it, eg 

# start up command line interface to mysql
send "/usr/local/mysql/bin/mysql -u root -p $dbname\r"

and go on from there.  Works just fine.

--Cindy

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

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

2003-01-03 Thread John Fulton
On 3 Jan 2003, bruno peracchio wrote:

> I use MySQL 3.23.52/linux Mandrake 9.0
> Installing SQLEditor-2.1.3 (CBD-Common-2.1.3-3.i386.rpm)
> error:failed dependencies:
> unixODBC is needed by CBC-Common-2.1.3-3
>
> Installing UnixODBC-mysql-2.2.3-1.i386.rpm
> error: failed dependencies
> odbc is needed by UnixODBC-mysql-2.2.3-1
>
> Please can you give me an answer?

I think that this is more of RPM issue than it is a pure MySQL issue.

RPM is a package management system that manages RPM packages.  RPMs alone do
not manage package dependencies.  Thus, the process for installing a package
called x.rpm could involve downloading x.rpm and attempting to install x.rpm
only to find out that it needs a file called k.c.  In order to figure out
which package has the file called k.c, you might have to use something like
rpm-find to figure out that the file that you are interested in is contained
in a package called y.rpm.  You could spend a lot of time doing this, because
y.rpm might have the same problem.

In your case unixODBC is needed.  To search with rpm-find go here:

http://rpmfind.net/

One package management tool that solves the dependency problem nicely is
called apt-get, which was developed for the Debian GNU/Linux operating system.
Debian has a tool called dpkg which is similar to RPM, in that it can be used
to install binary ".deb" packages (as opposed to ".rpm" packages).  However,
Debian's package manager has a higher level command called apt-get, which
manages dependencies based on packages, not files.

You can run apt-get on top of an RPM system (it doen't seem to work as nicely
as an .deb based system from my experience) and it might make things easier
for you.  Have a look here:

http://freshrpms.net/apt/

If you want to try Debian go here:

http://www.debian.org/

  John



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

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: table relations

2003-01-03 Thread Anderson Pereira Ataides
Nuno Lopes

Try this:

SELECT music_id, title, artist_name, country
FROM music_table, artist_table
WHERE music_table.artist_id = artist_table.artist_id
AND country LIKE 'desired country'

Anderson Ataides

Em Sex 03 Jan 2003 07:57, you wrote:
> Hi everybody,
>
> I have a question about table relations and I would like you to help me.
> I have two tables in one server. The first tables has the following fiels:
> music_id; title; artist_id; chords
> The second one: artist_id; artist_name; country
>
> How can I JOIN this tables?? (I'm working in PHP, if it's matters).
> I want to print all musics from a specific country (first table) using the
> artist in second table. Can you help me building the SQL statement, please?
>
>
> Thanking in avance,
> Nuno Lopes
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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




unixOBDC

2003-01-03 Thread bruno peracchio
Hi everybody

I use MySQL 3.23.52/linux Mandrake 9.0
Installing SQLEditor-2.1.3 (CBD-Common-2.1.3-3.i386.rpm)
error:failed dependencies:
unixODBC is needed by CBC-Common-2.1.3-3

Installing UnixODBC-mysql-2.2.3-1.i386.rpm
error: failed dependencies
odbc is needed by UnixODBC-mysql-2.2.3-1

Please can you give me an answer?
Thank in advance

bruno




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

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




Continual Database Corruption

2003-01-03 Thread Dale
Hello,

Sorry if this has been covered, but I've searched the archives with no
results.

I have 2 identical servers running mysql 3.23.54a on RedHat linux 7.2
(custom kernel 2.4.17). One is running as master, one slave using mysql
internal replication.

The primary server has a database where one or more tables get
corrupted almost daily.  I don't think it's an extremely busy server,
although it reports an average of ~17 queries per second, 70% of those
being selects, the rest being inserts, and very few updates and
deletes.

One occassion it reported error 127 (corrupted table), other times it
just reports that the index is off and needs repaired.

The slave server seems to get corruption also, but it always seems to
differ from master server's corruption (both row position and number of
errors).  Should the slave have the master errors or be error free in
this case?

REPAIR TABLE has always worked, but I'm afraid that it won't someday. 
There is no signs of harddrive failure (software raid1) but my best
guess at this point is hardware.  What should I look at replacing
first?  Or is there a better way to debug this?  The master server
needs 24/7 access, so I'd rather not try anything that would cause too
much downtime.

Any pointers and/or suggestions are appriciated.

TIA, 
Dale

__
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: changing database location

2003-01-03 Thread rich allen
shutdown mysql, move all the files in your current data directory to 
the new location

in your my.cnf file (ie. unix: /etc/my.cnf)

[mysqld]
datadir=/my

---
all data files are in /my

- hcir

On Friday, January 3, 2003, at 07:56 AM, aman raheja wrote:

Hi All
Right now I have all my MySQL database files getting stored in
/var/lib/mysql/
If I want to change that to another location, say, /home/mysql or 
something
else, how do I do it?


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

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




Can't lock file (errno: 13) - don't understand this one on win32

2003-01-03 Thread Norris, Joseph
Group,

Here is the problem.

I have my mysql databases set up on one windoze 2000 box on d drive with the
main folder on C drive using junction
to create a symbolic link ( Unix so much easier! ) so as to make the sys
admin happier.

I have a perl script on another box that accesses this database via the
network and I am getting the following message:


DBD::mysql::st execure failed: Can't lock file (errno: 13) at (gives the
location in the script where error is happening.

Not sure how to trace this down.  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




comparision in the datetime field

2003-01-03 Thread aman raheja
Hi All
I have a datetime field in one of my tables in the MySQL database.
Can I do something like return all records between two certain dates, say
between Nov 02, 2002 and Nov 07, 2002.
Thanks
Aman

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

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: "What MySQL is"

2003-01-03 Thread JamesD
take out the last two sentences.
scares people away.

suggest last sentence:

"MySql's CLI tools give you full access and control
to all the the power of MySQL. If you prefer a visual tool
to manage your data in MySQL, like Access & Paradox tools see the
downloads/links
page, as you learn MySQL's capabilities.

suggest first sentence

"MySQL is a data storage program that runs quietly in the
background of your computer (a "Database"). It stores"

Jim

-Original Message-
From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 7:48 AM
To: [EMAIL PROTECTED]
Subject: "What MySQL is"


Suggestion page: "What MySQL is; layman style" (unless one exists I
haven't seen).

Something like:
"MySQL is a back-end database program.  It stores data for your programs
and allows you to interface with that data using SQL commands (see
reference manual).  MySQL has a command-line interface program (CLI)
called 'mysql' [ed. note: source of confusion?] that allows commands to
be typed in directly and executed immediately.  If you are only familiar
with visual database tools like Access, Paradox, etc. then you may find
MySQL daunting.  Consider downloading a visual front end program (see
downloads / links page) as you learn SQL."

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




deleting tables with same prefix !

2003-01-03 Thread aman raheja
Hi All
How can I delete all tables starting with prefix 'abc' in the MySQL database
(there
are about 200 such tables).
Wild cards?
Or if I just delete the files from the location where all the MySQL database
tables are
stored, what would happen ?
Thanks
Aman

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

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: Replication and the function now()

2003-01-03 Thread Fred van Engen
Remi, Michael,

On Fri, Jan 03, 2003 at 11:39:44AM -0500, Michael T. Babcock wrote:
> Fred van Engen wrote:
> 
> >SET TIMESTAMP=1039489014;
> >
> >Each time with the current timestamp of course. I haven't checked
> >if it is actually used by the slave however.
> > 
> >
> 
> If it is used, I would imagine its for TIMESTAMP columns, not your own 
> that include "blah = now()".

Looking at the sources, it seems to be used for the NOW function as well.
Anyway, I would consider it a bug if it wasn't used for the NOW function.


A. The slave sets the timestamp with set_time():

slave.cc:

switch(type_code) {
case QUERY_EVENT:
{
  Query_log_event* qev = (Query_log_event*)ev;
  int q_len = qev->q_len;
  int expected_error,actual_error = 0;
  init_sql_alloc(&thd->mem_root, 8192,0);
  thd->db = rewrite_db((char*)qev->db);
  if (db_ok(thd->db, replicate_do_db, replicate_ignore_db))
  {
thd->query = (char*)qev->query;
**  thd->set_time((time_t)qev->when);


B. The timestamp may be queried with current_thd->query_start():

sql_class.h:

**inline time_t query_start() { query_start_used=1; return start_time; }
  inline void   set_time(){ if (user_time) 
start_time=time_after_lock=user_time; else time_after_lock=time(&start_time); }
  inline void   end_time(){ time(&start_time); }
**inline void   set_time(time_t t) { time_after_lock=start_time=user_time=t; }
  inline void   lock_time()   { time(&time_after_lock); }


C. The NOW() call gets its timestamp from current_thd->query_start():

sql_yacc.yy:

| NOW_SYM optional_braces
**{ $$= new Item_func_now(); }


item_timefunc.cc:

void Item_func_now::fix_length_and_dec()
{
  struct tm tm_tmp,*start;
**time_t query_start=current_thd->query_start();


>   I believe now() is processed as the time 
> when the command is run, even if run from the update log.  You could 
> presumably replace all occurences of now() with the previous TIMESTAMP 
> value using some simple PERL of course ...
> 

True.


Regards,

Fred.

-- 
Fred van Engen  XB Networks B.V.
email: [EMAIL PROTECTED]Televisieweg 2
tel: +31 36 5462400 1322 AC  Almere
fax: +31 36 5462424 The Netherlands

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

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: Info: Using MySQL as Mutex

2003-01-03 Thread Dana Diederich
Yup, MySQL works quite well as a lock server; we've been using it as such
for years.

I would suggest looking at the get_lock() function specifically.  It's
designed to do exactly what you're looking for, and it won't require
knowledge of any tables or rows.

Cheers.
-Dana

> -Original Message-
> From: Michael T. Babcock [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 10:38 AM
> To:   [EMAIL PROTECTED]
> Subject:  Info: Using MySQL as Mutex
> 
> Just as an FYI to fellow developpers out there (feeling generous today):
> 
> How many times have you written a semaphore locking system for your 
> programs and worried they weren't thread-safe, or wished you didn't have 
> to?  Well, if you're feeling especially lazy (as I often do) and you 
> have MySQL on hand, try using its locking features instead of writing 
> your own (especially if your program already involves MySQL).  Connect 
> to MySQL [this assumes you're using InnoDB/BDB], do a BEGIN and try to 
> UPDATE a row in a locks table for your mutex (UPDATE Locks SET Holder = 
> "me" WHERE Name = "ThreadMutex4") and do your work.  MySQL will block 
> the UPDATE until the previous thread (if any) rolls back or commits its 
> transaction.
> 
> Any thoughts / technical comments? (I just started doing this in a large 
> internal log tracking project that does, in fact, use MySQL) :-)
> 
> -- 
> 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


**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**
 Wal-Mart Stores, Inc. Confidential
**


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

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




AIX 4.3.3 and gethostbyaddr_r() [again?]

2003-01-03 Thread Lars-Owe . Ivarsson

I'm trying to move our webserver with MySQL 3.22.32 from a slow AIX 4330-09 
box to a somewhat faster one with 4330-10.  Though not heavily used, the 
3.22.32 has worked like a charm for several years in a chroot:ed environment.  
It seems that we've forgotten to update the libraries (e.g. libpthreads.a) in 
the chroot, which might be relevant.

Moving the Apache server was easy, and at first it appeared that MySQL worked 
OK too.  Unfortunately this is not true for networked connections, only for 
local connections (not using TCP).  We downloaded MySQL 3.23.53, which appears 
to work partially, but not for TCP connections.  It's own log file says:

mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked agaist is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail

key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=0
max_connections=100
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 225791 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

021216 19:20:34  mysqld restarted
/usr/local/mysql/libexec/mysqld: ready for connections

and the operating system (errpt) reports:

Detail Data
SIGNAL NUMBER
 11
USER'S PROCESS ID:
  25276
FILE SYSTEM SERIAL NUMBER
 32
INODE NUMBER
  41984
PROGRAM NAME
mysqld
ADDITIONAL INFORMATION
_doprnt 20
sprintf 68
ho_byaddr 284
ho_byaddr 1BC
gethostby 12C
_Z14ip_to 100
_Z17check D0
_Z21handl F4
_pthread_ D4
??

Symptom Data
REPORTABLE
1
INTERNAL ERROR
0

/etc/netsvc.conf says
hosts = local , bind


I tried to download MySQL 3.23.35 from www.bull.com, on a different machine 
(AIX 4300-09, running MySQL in the real root).  A simple test 'telnet 
localhost 3306' gives:

/usr/local/bin/safe_mysqld[222]: 29488 Segmentation fault(coredump)
030103 17:27:14  mysqld restarted

and a core file revealing the following calling sequence:

is_data_there()
ho_byaddr()
ho_byaddr()
gethostbyaddr()
ip_to_hostname__FP7in_addrPUi()
check_connections_FP3THD()
handle_one_connection__FPV()

This system lacks /etc/netsvc.conf (using default values).


In yet another attempt I tried to compile MySQL from source, but I'm sorry to 
say that this too failed for me:

.
.
.
Making all in client
make[2]: Entering directory `/usr/local/src/mysql-3.23.54a/client'
source='mysql.cc' object='mysql.o' libtool=no \
depfile='.deps/mysql.Po' tmpdepfile='.deps/mysql.TPo' \
depmode=aix /bin/sh ../depcomp \
xlC_r -ma -O  -qmaxmem=8192 -DUNDEF_THREADS_HACK -I. -I. -I.. -I./../include 
-I../include -I./.. -I.. -I..  -I/usr/local/include -DHAVE_INT_8_16_32 
-DHAVE_GETHOSTBYNAME_R_RETURN_INT=1  -O3 -DDBUG_OFF -I/usr/local/include 
-DHAVE_INT_8_16_32 -DHAVE_GETHOSTBYNAME_R_RETURN_INT=1  -Wa,-many 
-DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ -c -o mysql.o `test -f 
mysql.cc || echo './'`mysql.cc
Unable to retrieve messagemake[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/usr/local/src/mysql-3.23.54a/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mysql-3.23.54a'
make: *** [all] Error 2

I'm using version 3.1.4.9 of the C++ component of xlC, and 3.1.4.10 of C.  
Both machines produce the same result.  I've used the settings suggested in 
the MySQL manual as well as the hints provied by Bull's freeware team, with 
the same end result.  I understand that the messagemake-problem has been 
reported in the past, but I'm not sure what to do anyway.  If configure is 
asked to use gcc instead, it looks for MIT Pthreads in an eternal loop.


Any suggestions are greatly appreciated.

Best regards,
   Lars-Owe


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

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



INNER JOIN problem

2003-01-03 Thread hschassen
I hope someone can help. I have a table that has serveral records with
the same name but unique datestamps.  I need to show only the records
with the latest datestamp associated with them.  I am enclosing the sql
that I am working with in hopes that someone can see the problem that I
can't.  I crashes at the GROUP BY line.
 
$sql = "
 
SELECT 
P1.siname, P1.imin, P1.siti, P1.sito, P1.sireason, P1.id, P1.date,
P2.siname, MAX(P2.id) AS latest_time
 
FROM $table_name AS P1
 
INNER JOIN $table_name AS P2
 
GROUP BY P2.siname AS P3
 
ON P1.id = P3.latest_time
 
WHERE P1.imin=0
 
";

Any help will be appreciated.

Thanx,
 
Hank Schassen, ACI
CAD Manager
Aria/Jackson Architects
Tel: 206.323.8800
Fax: 206.323.8518
www.araijackson.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




changing database location

2003-01-03 Thread aman raheja
Hi All
Right now I have all my MySQL database files getting stored in
/var/lib/mysql/
If I want to change that to another location, say, /home/mysql or something
else, how do I do it?
Thanks
Aman

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

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




Info: Using MySQL as Mutex

2003-01-03 Thread Michael T. Babcock
Just as an FYI to fellow developpers out there (feeling generous today):

How many times have you written a semaphore locking system for your 
programs and worried they weren't thread-safe, or wished you didn't have 
to?  Well, if you're feeling especially lazy (as I often do) and you 
have MySQL on hand, try using its locking features instead of writing 
your own (especially if your program already involves MySQL).  Connect 
to MySQL [this assumes you're using InnoDB/BDB], do a BEGIN and try to 
UPDATE a row in a locks table for your mutex (UPDATE Locks SET Holder = 
"me" WHERE Name = "ThreadMutex4") and do your work.  MySQL will block 
the UPDATE until the previous thread (if any) rolls back or commits its 
transaction.

Any thoughts / technical comments? (I just started doing this in a large 
internal log tracking project that does, in fact, use MySQL) :-)

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



Replication and the function now()

2003-01-03 Thread Remi Lanteigne
I would like to know if there is a way of telling mysql to transfer the
value of the function now() in it's replication, as it is now (from what I
see in the binlog file) mysql passes the now() to the slave instead of the
value, this causes a difference in my 2 databases.

Thank you in advance.

Rémi Lanteigne


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

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: Replication and the function now()

2003-01-03 Thread Fred van Engen
Remi,

n Fri, Jan 03, 2003 at 10:56:21AM -0500, Remi Lanteigne wrote:
> I would like to know if there is a way of telling mysql to transfer the
> value of the function now() in it's replication, as it is now (from what I
> see in the binlog file) mysql passes the now() to the slave instead of the
> value, this causes a difference in my 2 databases.
> 

In my 3.23.52 binlog I see this before each time related update:

SET TIMESTAMP=1039489014;

Each time with the current timestamp of course. I haven't checked
if it is actually used by the slave however.


Regards,

Fred.

-- 
Fred van Engen  XB Networks B.V.
email: [EMAIL PROTECTED]Televisieweg 2
tel: +31 36 5462400 1322 AC  Almere
fax: +31 36 5462424 The Netherlands

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

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: "What MySQL is"

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

Michael, et al --

...and then Michael T. Babcock said...
% 
% Suggestion page: "What MySQL is; layman style" (unless one exists I 
% haven't seen).

Good idea.  Maybe a "what it isn't" as well.

I'd like to suggest that this be part of the now-nascent FAQ, so I've
copied the mysql-faq list on this reply.


Thanks & 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+Fbd7Gb7uCXufRwARAkjEAKDk7Upr04qbX+6Qdh7I4O/7cjlC/gCgzvEF
obDh/xTsabL3JGPcSFg6OBU=
=gyKc
-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: Cannot download MySQL Connector/J from www.mysql.com

2003-01-03 Thread Richard Mayebo
Thomas,

Thanks - I got it now.

Regards,

Richard.


-Original Message-
From: Thomas Spahni [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 6:52 PM
To: Richard Mayebo
Cc: '[EMAIL PROTECTED]'
Subject: Re: Cannot download MySQL Connector/J from www.mysql.com


On Fri, 3 Jan 2003, Richard Mayebo wrote:

> I am using IE5 and Windows 2000. I am trying to download the Type 4 JDBC
> driver for MySQL for a MySQL/Java/Linux project from the
> link http://www.mysql.com/downloads/api-jdbc-stable.html.
>
> The download I get as a result is about 45KB. However, it is not
> recognised by tar or gzip utilities as a valid archive. Examining the file
> with a binary editor suggests that it is an html document, detailing links
> to your mirror sites.
>
> Please advise how I can get the download I require.
>
> Thanks in advance!
>

Richard,

click the site, pick your mirror and then download the requested archive.
You downloaded the html site giving you a choice of mirrors.

Regards,
Thomas


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

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




re: How to use HANDLER statement with primary key ?

2003-01-03 Thread Victoria Reznichenko
On Wednesday 01 January 2003 15:28, Jocelyn Fournier wrote:

> I'm trying to use to following HANDLER syntax :
>
> HANDLER tbl_name READ index_name=(value1);
>
> However I fail since I don't know what is 'index_name' for a PRIMARY KEY (I
> already tried PRIMARY, `PRIMARY KEY`, and the column name without success).
>
> Any idea ?

`PRIMARY` works fine for me:

mysql> handler a read `PRIMARY` = (3);
++---+
| id | companyid |
++---+
|  3 | 5 |
++---+
1 row in set (0.02 sec)


> BTW, are HANDLER statements cached by the query cache ?

No, only SELECTs are cached.


-- 
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: Is it a bug

2003-01-03 Thread Egor Egorov
On Tuesday 31 December 2002 10:21, Walter Procopio wrote:

> I have installed mysql max 4.0.4 beta on a Suse (ver. 8.0) linux server and
> I have created a database with this schema:

[skip]

>
> And I try to execute this query:
>
>
> SELECTecoras.rstda, ecotes.rstes, ecoras.rsart, ecoras.rsimm,
> ecorub.rsdes, ecoras.rstpg, ecoras.rsdat, ecoras.rsrub
> FROM   ecoras,  ecotxt
> LEFT JOIN ecotes ON ecoras.rstcd = ecotes.rstcd
> LEFT JOIN ecorub ON ecoras.rsnum = ecorub.rsnum and ecoras.rsrub =
> ecorub.rsrub
> WHEREecoras.rsori = ecotxt.rsori
> AND ecoras.rscod = ecotxt.rscod
> AND (rsdat >= '2002-12-01') and (rsdat <= '2002-12-23')
> AND (match(ecotxt.rstxt) against('JAVA' IN BOOLEAN MODE))
> ORDER BY ecoras.rspst, ecoras.rstda, ecotes.rstes, ecoras.rstpg,
> ecoras.rsart
>
>
> I have no data in my resultset, but data-base contains data which match
> conditions.
> If I excute the following query I have a valid resultset.
>
>
> SELECTecoras.rstda, ecotes.rstes, ecoras.rsart, ecoras.rsimm,
> ecorub.rsdes, ecoras.rstpg, ecoras.rsdat, ecoras.rsrub
> FROM   ecoras,  ecotxt
> LEFT JOIN ecotes ON ecoras.rstcd = ecotes.rstcd
> LEFT JOIN ecorub ON ecoras.rsnum = ecorub.rsnum and ecoras.rsrub =
> ecorub.rsrub
> WHEREecoras.rsnum = 0
> AND ecoras.rsori = ecotxt.rsori
> AND ecoras.rscod = ecotxt.rscod
> AND (rsdat >= '2002-12-01') and (rsdat <= '2002-12-23')
> AND (match(ecotxt.rstxt) against('JAVA' IN BOOLEAN MODE))
> ORDER BY ecoras.rspst, ecoras.rstda, ecotes.rstes, ecoras.rstpg,
> ecoras.rsart
>
>
> In this query the where-clause matches the primary key (index) of ecoras
> table:
>
>
> ecoras.rsnum = 0
> AND ecoras.rsori = ecotxt.rsori
> AND ecoras.rscod = ecotxt.rscod
>
>
> If I do not use an index, I will obtain slow performances, but I must have
> always a
> valid resultset like in the second query.
>
> Is it a bug or a join-condition has to match an index?

Could you test it with latest version of MySQL server (4.0.7)?
Could you provide some data for testing?




-- 
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: Cannot download MySQL Connector/J from www.mysql.com

2003-01-03 Thread Thomas Spahni
On Fri, 3 Jan 2003, Richard Mayebo wrote:

> I am using IE5 and Windows 2000. I am trying to download the Type 4 JDBC
> driver for MySQL for a MySQL/Java/Linux project from the
> link http://www.mysql.com/downloads/api-jdbc-stable.html.
>
> The download I get as a result is about 45KB. However, it is not
> recognised by tar or gzip utilities as a valid archive. Examining the file
> with a binary editor suggests that it is an html document, detailing links
> to your mirror sites.
>
> Please advise how I can get the download I require.
>
> Thanks in advance!
>

Richard,

click the site, pick your mirror and then download the requested archive.
You downloaded the html site giving you a choice of mirrors.

Regards,
Thomas



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

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




Question - SELECT

2003-01-03 Thread Terence Ng
How do I correct this SQL code:

2 tables there, and I want to add one conditon to item
"receive"
lcopen : id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date

SELECT
lcopen.bank, 
SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open,
#
SUM(lcreceive.amount_us) where lcreceive.due_date <
current_date AS receive,
#
# the above statement is not correct for the
# additional condition
#
FROM lcopen, lcreceive
AND lcopen.id=lcreceive.id
GROUP BY lcopen.bank;

Terence Ng


_
Lonely Christmas(³¯«³¨³)¡A­·ºå»P­·(Twins)¡AµL¶¡¹D(¹q¼v)...
¦ÜIn¤â¾÷¹aÁn ³­§A¹L¥V¤Ñ
http://ringtone.yahoo.com.hk

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

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




"What MySQL is"

2003-01-03 Thread Michael T. Babcock
Suggestion page: "What MySQL is; layman style" (unless one exists I 
haven't seen).

Something like:
"MySQL is a back-end database program.  It stores data for your programs 
and allows you to interface with that data using SQL commands (see 
reference manual).  MySQL has a command-line interface program (CLI) 
called 'mysql' [ed. note: source of confusion?] that allows commands to 
be typed in directly and executed immediately.  If you are only familiar 
with visual database tools like Access, Paradox, etc. then you may find 
MySQL daunting.  Consider downloading a visual front end program (see 
downloads / links page) as you learn SQL."

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



Re: MySQL Help Needed Please

2003-01-03 Thread Thomas Spahni
Anton,

check the .err and .log files in your data directory.
Then check permissions. My sock file looks like:

srwxrwxrwx1 mysqldaemon  0 Dez 30 19:12 mysql.sock

and finally check for your

socket= /tmp/mysql.sock

entries in /etc/my.cnf and ~/.my.cnf

Thomas Spahni

On Fri, 3 Jan 2003, Anton Zavrin wrote:

> Hi guys,
> I'm new here and need help.
> I'm installing MySQL on FreeBSD 4.7. I actually had/have MySQL installed
> but when I'm trying to run it says:
> error: 'Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)' Check that mysqld is running and that the
> socket: '/tmp/mysql.sock' exists!
>
> I checked /tmp/mysql.sock' and the file exists.
> But I don't see any process that would show me mysqld is running.
>
> Then I tried to re-install it from the ports and it says:
> You appear to already have a mysql database directory in /var/db/mysql.
>
> In order to preserve your existing data, you should:
> - dump all your databases
> - kill mysql if it is running
> - delete the /var/db/mysql directory
> - run 'make install'
> - start up mysql
> - re-create all of your database
> - re-load your data
>
> If you understand the consequences of this upgrade, please re-build this
> port with the environment variable OVERWRITE_DB defined.
> *** Error code 1
>
> Stop in /usr/ports/databases/mysql323-server.
>
> Please help, what should I do?
>
> Best Regards, Anton


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

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




optimizing big table

2003-01-03 Thread jf Leoni
hello,
i have a table with 29 million rows  (1,6 Go) with maritime distances inside
working on mysql 3.23.52-Max on a dual xeon 800Mhz  1Go mem

example :
los angeles  > rotterdam   7728 Nmvia panama and english channel
los angeles  > rotterdam   13456  Nm via cape horn and english channel

port_1  mediumint(7)
port_2  mediumint(7)
distance  smallint(5)
way_point1   tinyint(1)
way_point2   tinyint(1)
way_point3   tinyint(1)
way_point4   tinyint(1)
way_point5   tinyint(1)
.
--->
way_point29   tinyint(1)

I'm using 2 multiple column indexes

INDEX 1(port_1, port_2)
INDEX 2(port_2, port_1)

response time is not too bad but i wanted to know if someone have an idea 
to optimize  structure or indexes ?
does tinyint(1) better than enum for boolean value ?
something to do on mysql variables ?

thanks a lot and happy new year !!!

Jean-Fabrice Leoni
Paris France


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

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: user updates trace

2003-01-03 Thread Michael T. Babcock
Egor Egorov wrote:


... i mean ... in my database i have a lot of users
with different privileges.
what i need is to reach all the insert, update and
delete queries executed by one user.
is it possible?
   


Nope.
 


A good question might be whether the TODO includes auditing of this 
kind.  That is, adding the username to the comments in the binary update 
log (and other logs).

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



Cannot download MySQL Connector/J from www.mysql.com

2003-01-03 Thread Richard Mayebo
I am using IE5 and Windows 2000. I am trying to download the Type 4 JDBC
driver for MySQL for a MySQL/Java/Linux project from the
link http://www.mysql.com/downloads/api-jdbc-stable.html.

The download I get as a result is about 45KB. However, it is not
recognised by tar or gzip utilities as a valid archive. Examining the file
with a binary editor suggests that it is an html document, detailing links
to your mirror sites. 

Please advise how I can get the download I require. 

Thanks in advance!

Richard.



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

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




Question - SELECT

2003-01-03 Thread Terence Ng
How do I correct this SQL code:

I want to add one conditon to item
"receive"
lcopen : id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date

SELECT
lcopen.bank, 
SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open,
#
SUM(lcreceive.amount_us) where lcreceive.due_date <
current_date AS receive,
#
# the above statement is not correct for the
# additional condition
#
FROM lcopen, lcreceive
AND lcopen.id=lcreceive.id
GROUP BY lcopen.bank;

Terence Ng


_
Lonely Christmas(³¯«³¨³)¡A­·ºå»P­·(Twins)¡AµL¶¡¹D(¹q¼v)...
¦ÜIn¤â¾÷¹aÁn ³­§A¹L¥V¤Ñ
http://ringtone.yahoo.com.hk

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

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




inserting records into database with utf8 char-set

2003-01-03 Thread Dana Sharvit
Hello,
I am attempting to insert a string in utf-8 to a text field using DBI but
mysql does preserve the original char_et but rather changes it, does any one
have any idea why?
I am working with Mysql 3.23.36 DBI-1.30
Thanks
Dana

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

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




re: Help!

2003-01-03 Thread Victoria Reznichenko
On Friday 03 January 2003 13:18, Gman wrote:
> I am currently using Mysql version 1.4 for Windows 2000, and I cannot
> connect to my database via phpMyAdmin.
>
> I have run mysql and was able to type
> Use SAMDB<--my database and it worked.
>
> But when I type the following
> grant all to theedge2k@flatman identified by 'mysql password';
>
> It comes back and says the following
> ERROR 1064 you have an error in your SQL syntax near to
> theedge2k@flatman identified by the 'thepool';

Check the manual for GRANT syntax:
http://www.mysql.com/doc/en/GRANT.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: user updates trace

2003-01-03 Thread Egor Egorov
On Thursday 02 January 2003 10:13, Natale Babbo wrote:

> anyone knows how to get the history of updates of a
> user?
> ... i mean ... in my database i have a lot of users
> with different privileges.
> what i need is to reach all the insert, update and
> delete queries executed by one user.
> is it possible?

Nope.

> i check the bin logs but they seems not to trace the
> user that execute the query. is it true?





-- 
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: table relations

2003-01-03 Thread Egor Egorov
On Friday 03 January 2003 11:57, Nuno Lopes wrote:

> I have a question about table relations and I would like you to help me.
> I have two tables in one server. The first tables has the following fiels:
> music_id; title; artist_id; chords
> The second one: artist_id; artist_name; country
>
> How can I JOIN this tables?? (I'm working in PHP, if it's matters).
> I want to print all musics from a specific country (first table) using the
> artist in second table. Can you help me building the SQL statement, please?

I hope these sections of the MySQL manual will help you:
http://www.mysql.com/doc/en/Multiple_tables.html
http://www.mysql.com/doc/en/JOIN.html
http://www.mysql.com/doc/en/SELECT.html



-- 
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: strange behaviour

2003-01-03 Thread Ken Menzel
Hi Wash,

Please see ntoes on this page for explanations.
http://jeremy.zawodny.com/blog/archives/000203.html#000203

Next please upgrade to 3.23.54 as this does contain some fixes that
should help including a compile option for broken real path.

Here are my compile flags,  I don't recommend -O3 but it seems to be
OK for me so far.
--

rm config.cache
CC=gcc  CFLAGS="-O3 -DHAVE_BROKEN_REALPATH"  CXX=gcc  \
CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti -DHAVE_BR
OKEN_REALPATH" \
./configure
$DEBUG --enable-large-files --with-berkeley-db --with-innodb \
--enable-assembler
--
--

FreeBSD 5 is supposed to improve things but I am having some trouble
with my SCSI controller and FBSD5 seeing the drives.

Best of luck,
Ken
- Original Message -
From: "Odhiambo Washington" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 2:10 AM
Subject: strange behaviour


>
> I run mysql on FreeBSD and it's been giving me a lot of problems.
Sometimes
> the load shoots up and some applications cannot access mysql server
anymore.
> During such instances, when I run top, I get something like this:
>
>
> last pid: 57669;  load averages:  1.40,  1.52,  1.52
up 30+00:05:29
> 10:07:24
> 105 processes: 2 running, 101 sleeping, 1 stopped, 1 zombie
> CPU states: 10.1% user,  0.0% nice, 69.3% system,  0.2% interrupt,
20.4% idle
> Mem: 522M Active, 284M Inact, 146M Wired, 48M Cache, 112M Buf, 3916K
Free
> Swap: 1374M Total, 1208K Used, 1373M Free
>
>   PID USERNAME  PRI NICE  SIZERES STATE  C   TIME   WCPU
CPU COMMAND
> 12192 mysql  64   0   279M 13716K CPU0   1  93.1H 92.82%
92.82% mysqld
>
>
>
>
>
>
> I see mysqld taking so much processor time and then I run mytop and
I get:
>
> MySQL on localhost (3.23.41-log)
up 5+18:36:24
> [10:04:04]
>  Queries Total: 3,135,669  Avg/Sec: 6.28  Now/Sec: 9.00  Slow: 0
>  Threads Total: 23Active: 1 Cached: 7
>  Key Efficiency: 99.99%  Bytes in: 285,244,678  Bytes out:
181,425,048
>
>  Id  User  Host  DB   TimeCmd Query or State
>  --      --   --- --
>  399603  root localhosttest  0  Query show full
processlist
>  186085  wolvmail localhost virtualemai  6  Sleep
>  102684 wolrt2use localhost rt2 12  Sleep
>  399436  wolvmail localhost virtualemai 86  Sleep
>  104018 wolrt2use localhost rt2124  Sleep
>  103015 wolrt2use localhost rt2213  Sleep
>  103557 wolrt2use localhost rt2213  Sleep
>  109938 wolrt2use localhost rt2292  Sleep
>  102741 wolrt2use localhost rt2370  Sleep
>  103063 wolrt2use localhost rt2410  Sleep
>  102009 wolrt2use localhost rt2425  Sleep

>  102737 wolrt2use localhost rt2425  Sleep
>  103585 wolrt2use localhost rt2707  Sleep
>  330671 twig275us localhosttwig  55140  Sleep
>  340661 twig275us localhosttwig  55147  Sleep
>  340198 twig275us localhosttwig  55206  Sleep
>  179428 twig275us localhosttwig  55244  Sleep
>  179385 twig275us localhosttwig  55260  Sleep
>  349415 twig275us localhosttwig  55334  Sleep
>  179413 twig275us localhosttwig  55365  Sleep
>  326960 twig275us localhosttwig  55402  Sleep
>  330717 twig275us localhosttwig  55453  Sleep
>  340067 twig275us localhosttwig  0  Sleep
>   1 system us  none 498984 Connec connecting to
master
>
>
>
> My question is: Why connecting to master?
>
> Can someone explain this to me? I am lost for what could be causing
me
> so much grief. I am not an MySQL expert.
>
> Thanks
>
>
>
> -Wash
>
> --
> Odhiambo Washington   <[EMAIL PROTECTED]>  "The box said 'Requires
> Wananchi Online Ltd.  www.wananchi.com  Windows 95, NT, or
better,'
> Tel: +254 2 313985-9  +254 2 313922 so I installed FreeBSD."
> GSM: +254 72 743223   +254 733 744121   This sig is McQ!  :-)
>
>
> Take my word for it, the silliest woman can manage a clever man, but
it
> needs a very clever woman to manage a fool.
> -- Kipling
>
> 
-
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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-m

MySQL-3.23 and gcc-2.96

2003-01-03 Thread Peter Sänger
Hi,

on the website
http://www.mysql.com/downloads/mysql-3.23.html
there is hint to a problem with gcc-2.96.

Within the changelog of RedHat gcc-2.96-113.i386.rpm I found:
-
* Sat Jul 15 2000 Jakub Jelinek <[EMAIL PROTECTED]>
- Put Richard Henderson's mysql compilation fix instead to play safe
- Move libstdc++-compat stuff into compat-egcs package
* Fri Jul 14 2000 Jakub Jelinek <[EMAIL PROTECTED]>
- Zack Weinberg's cpp fixes
- Fix mysql miscompilation
-

Can anyone validate that this is to fix the described problem?


Regards

Peter Sänger

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

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 Help Needed Please

2003-01-03 Thread Anton Zavrin
Hi guys,
I'm new here and need help.
I'm installing MySQL on FreeBSD 4.7. I actually had/have MySQL installed
but when I'm trying to run it says:
error: 'Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (61)' Check that mysqld is running and that the
socket: '/tmp/mysql.sock' exists!
 
I checked /tmp/mysql.sock' and the file exists.
But I don't see any process that would show me mysqld is running.
 
Then I tried to re-install it from the ports and it says:
You appear to already have a mysql database directory in /var/db/mysql.
 
In order to preserve your existing data, you should:
- dump all your databases
- kill mysql if it is running
- delete the /var/db/mysql directory
- run 'make install'
- start up mysql
- re-create all of your database
- re-load your data
 
If you understand the consequences of this upgrade, please re-build this
port with the environment variable OVERWRITE_DB defined.
*** Error code 1
 
Stop in /usr/ports/databases/mysql323-server.
 
Please help, what should I do?
 
Best Regards, Anton
 
 



user's updates trace

2003-01-03 Thread Natale Babbo
#  S.O.S.  #

hi all,

anyone knows how to get the history of updates of a
user?
... i mean ... in my database i have a lot of users
with different privileges.
what i need is to reach all the insert, update and
delete queries executed by one user.
is it possible?

i check the bin logs but they seems not to trace the
user that execute the query. is it true?

thanks in advance.
natale babbo

P.S.: plase help me ... any tips are appreciated!!

__
Yahoo! Cellulari: scarica i loghi e le suonerie per le tue feste!
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




mysql_init

2003-01-03 Thread Slabber
I'm currently writing a shared library on Solaris.  When I add
mysql_init(&mysql) to the code and run the parent process, it bombs out.
Unfortunately I don't have the source for the parent process so it could be
quite hard to debug.  Is there any issues with using the C api with shared
libraries??

Cheers,

Si



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk


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

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: FAQ hosting site [FAQTS.COM]

2003-01-03 Thread indrek siitan
Hi,

> Can I strongly suggest there be a link from the MySQL documentation page
to:
> http://www.faqts.com/knowledge_base/index.phtml/fid/52
>
> It is the MySQL section of FAQTS.com which, IMHO, is the best online
> FAQ site.

Thanks for the pointer - I've added link to this to our documentation page
(http://www.mysql.com/documentation/index.html) now.


Rgds,
Indrek

--
MySQL Users Conference and Expo: http://www.mysql.com/events/uc2003/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Uuemõisa, Haapsalu, Estonia
   <___/   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: Different Table type between MASTER and SLAVE

2003-01-03 Thread Murali P



Yes, this shouldn't be a problem.

Master on InnoDB & Slaves on MyIsam. Only after a commit on the master does it
get replicated to the slave.

Regards
P.Murali



  Placed At :


"Heo, Jungsu" <[EMAIL PROTECTED]> on 01/03/2003 01:37:50 PM

To:   [EMAIL PROTECTED]
cc:(bcc: Murali P/Satyam)

Subject:  Different Table type between MASTER and SLAVE




Hello.

I'm build a system aka of Shopping mall.(I think most of queies will be SELECT)
For performance, MySQL will run on replication.

I need TRANSACTIONs to manages orders and payment.
So, Master's Table type is InnoDB.
But I think that InnoDB is slower than MyISAM.
(InnoDB's row level locking is very good. but, My system will query SELECT most
cases)

So, I decide that

Master's table uses InnoDB
Slave's table uses MyISAM.

This has any problem?
Any sugesstion will please me.

Thank you for advanced answer!


##
Heo, Jungsu Mr.

SimpleX Internet. http://www.simplexi.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 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php







-
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 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Source tar.gz files

2003-01-03 Thread Thomas Spahni
On Thu, 2 Jan 2003, Tyler wrote:

> Ok, I've got gunzip and tar, and every time I try (multiple versions) of
> your source .tar.gz file, I get:
> (when running 'tar -zxf mysql-3.23.54a.tar.gz')
> gzip: stdin: not in gzip format
>
> (when running 'gunzip mysql-3.23.54a.tar.gz')
> gunzip: mysql-3.23.54a.tar.gz: not in gzip format

Tyler,

possibly your browser did unzip the file during download.
Try:

me@box:> file mysql-3.23.54a.tar.gz

and look what it says.

me@box:> mv mysql-3.23.54a.tar.gz mysql-3.23.54a.tar
me@box:> tar -xf mysql-3.23.54a.tar

may work.

Thomas Spahni


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

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: Foreign Key problem? in MySQL 4.0.7

2003-01-03 Thread Heikki Tuuri
Haisam,

- Original Message -
From: ""Haisam K. Ido"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Friday, January 03, 2003 2:01 AM
Subject: Re: Foreign Key problem? in MySQL 4.0.7


> Heikki:
>
> Do you mean the PRIMARY KEY order?

>>   UNIQUE KEY keyword(id,groupname,gid),
>>   PRIMARY KEY (groupname, gid)


in both of the above indexes (= keys) 'gid' is the second column.

InnoDB has to be able to make the parent row check fast when you add a child
row. If you do not have 'gid' as the first column in an index, InnoDB would
need to do a table scan of the parent table when you add a child row. That
is why you must have the column as the first column in an index, in both the
parent and the child table.

Best regards,

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

sql query


> Heikki Tuuri wrote:
> > Haisam,
> >
> > - Original Message -
> > From: ""Haisam K. Ido"" <[EMAIL PROTECTED]>
> > Newsgroups: mailing.database.mysql
> > Sent: Wednesday, January 01, 2003 10:29 PM
> > Subject: Foreign Key problem? in MySQL 4.0.7
> >
> >
> >
> >>I was able to create the "gid" table with no problem under mysql 4.0.7
> >>
> >>CREATE TABLE gid (
> >>   id INT(11)  NOT NULL auto_increment,
> >>   groupname  VARCHAR(128) NOT NULL,
> >>   passwd VARCHAR(128) NULL,
> >>   gidINT(11)  NOT NULL,
> >>   username   VARCHAR(128) NULL,
> >>   inserted_byVARCHAR(128) NOT NULL default 'root',
> >>   epoch_inserted DATETIME NULL,
> >>   modified_byVARCHAR(128) NOT NULL default 'root',
> >>   epoch_modified DATETIME NULL,
> >>   UNIQUE KEY keyword(id,groupname,gid),
> >>   PRIMARY KEY (groupname, gid)
> >>) TYPE=INNODB;
> >>
> >>but when I attempt to create the "uid" table below I get the following
> >
> > foreign key
> >
> >>error.  What am I doing wrong?
> >
> >
> >
> > the referenced column gid must appear as the FIRST column in some index.
> > Above it appears as the second column.
> >
> >
> >
> >>ERROR 1005: Can't create table './vhadmindb/uid.frm' (errno: 150)
> >>
> >>CREATE TABLE uid (
> >>   id INT(11)  NOT NULL auto_increment,
> >>   username   VARCHAR(128) NOT NULL,
> >>   passwd VARCHAR(128) NOT NULL,
> >>   uidINT(11)  NOT NULL,
> >>   gidINT(11)  NOT NULL, INDEX gid_ind (gid), FOREIGN
KEY
> >
> > (gid)
> >
> >>REFERENCES gid(gid),
> >>   gecos  VARCHAR(128) NULL,
> >>   homedirVARCHAR(128) NOT NULL,
> >>   shell  VARCHAR(128) NOT NULL,
> >>   inserted_byVARCHAR(128) NOT NULL default 'root',
> >>   epoch_inserted DATETIME NULL,
> >>   modified_byVARCHAR(128) NOT NULL default 'root',
> >>   epoch_modified DATETIME NULL,
> >>   UNIQUE KEY keyword(id, username, uid),
> >>   PRIMARY KEY (username,uid)
> >>) TYPE=INNODB;
> >
> >
> > Best regards,
> >
> > Heikki Tuuri
> > Innobase Oy
> > ---
> > Order technical MySQL/InnoDB support at https://order.mysql.com/
> > See http://www.innodb.com for the online manual and latest news on
InnoDB
> >
> > 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
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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!

2003-01-03 Thread Gman
I am currently using Mysql version 1.4 for Windows 2000, and I cannot
connect to my database via phpMyAdmin.

I have run mysql and was able to type
Use SAMDB<--my database and it worked.

But when I type the following
grant all to theedge2k@flatman identified by 'mysql password';

It comes back and says the following
ERROR 1064 you have an error in your SQL syntax near to
theedge2k@flatman identified by the 'thepool';

My setup as follows
Box 1 - Apache/PHP installed
Box 2 - Sam 2 and MYSQL installed (Sam 2 dynamically creates web pages
from here  but the actual fileis created on Box 1 in htdocs
folder.
Box 3 - PHPMyAdmin installed and where I do all work from on my LAN.

Box 1 is never touched by hands (keyboard disabled to prevent me or any
from screwing it up. That is the same with my box 2 where Sam 2
installed (very cautious).

[mysqld]
basedir=D:/mysql
#bind-address=192.168.1.3
datadir=D:/mysql/data
#language=D:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=D:/mysql/bin/mysqld-nt.exe

Any ideas or help would be greatly appreciated

"Gman" Local Troublemaker Extraordinaire
Owner: The Edge Internet Radio Station
"The Internet Rock Station"

ICQ#:  136383819
Hotmail: [EMAIL PROTECTED]
Yahoo: [EMAIL PROTECTED]
Aim:   [EMAIL PROTECTED]

Dude! Right now you could
be getting your ass rocked 
on The Edge.

So what the hell are you waiting for?
Get Rocked on The Edge!
The Internet Rock Station!
Fear 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: Different Table type between MASTER and SLAVE

2003-01-03 Thread Murali P



Yes, this shouldn't be a problem.

Master on InnoDB & Slaves on MyIsam. Only after a commit on the master does it
get replicated to the slave.

Regards
P.Murali



  Placed At :


"Heo, Jungsu" <[EMAIL PROTECTED]> on 01/03/2003 01:37:50 PM

To:   [EMAIL PROTECTED]
cc:(bcc: Murali P/Satyam)

Subject:  Different Table type between MASTER and SLAVE




Hello.

I'm build a system aka of Shopping mall.(I think most of queies will be SELECT)
For performance, MySQL will run on replication.

I need TRANSACTIONs to manages orders and payment.
So, Master's Table type is InnoDB.
But I think that InnoDB is slower than MyISAM.
(InnoDB's row level locking is very good. but, My system will query SELECT most
cases)

So, I decide that

Master's table uses InnoDB
Slave's table uses MyISAM.

This has any problem?
Any sugesstion will please me.

Thank you for advanced answer!


##
Heo, Jungsu Mr.

SimpleX Internet. http://www.simplexi.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 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php







-
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 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Pattern Match on 3.23

2003-01-03 Thread Thomas Spahni
On Tue, 31 Dec 2002, Frank Peavy wrote:

> I asked the pattern match question, because I am using a hosting service
> that hosts MySQL 3.23. Since I have a need to search on terms less than 3
> characters long and I can not re-compile, I was looking for another
> solution. I thought that I might be able to use pattern matching as a
> substitute, but it sounds like performance might be an issue with large tables.
>
> If you have any other recommendations on how I could approach my problem, I
> would surely appreciate them.

Frank,

consider to maintain a separate indexed table with all words from your
texts together with a pointer to the row with the text containing the
word. This shifts some work to the client, but works well as long as you
avoid LIKE '%xyz'.

Thomas Spahni


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

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




built in commands are atomic, right?

2003-01-03 Thread Kathryn Cassidy
Hi there,

This is probably a rather foolish question, but I can't find a definitive
answer anywhere in the docs and I don't like assumptions...

Are all built in mysql commands atomic?  In particular, is replace
atomic.  In the docs it says that it deletes the entry if it exists
then inserts it, is that actually what it does (ie, is replace just
a macro for delete followed by insert)?

I'd imagine it is atomic, but I was wondering if anyone has a definitive
answer for me.

Thanks,
Kathryn.

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

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




Question - SELECT

2003-01-03 Thread Terence Ng
How do I correct this SQL code:

2 tables there, and I want to add one conditon to item
"receive"
lcopen : id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date

SELECT
lcopen.bank, 
SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open,
#
SUM(lcreceive.amount_us) where lcreceive.due_date <
current_date AS receive,
#
# the above statement is not correct for the
# additional condition
#
FROM lcopen, lcreceive
AND lcopen.id=lcreceive.id
GROUP BY lcopen.bank;

Terence Ng

_
Lonely Christmas(³¯«³¨³)¡A­·ºå»P­·(Twins)¡AµL¶¡¹D(¹q¼v)...
¦ÜIn¤â¾÷¹aÁn ³­§A¹L¥V¤Ñ
http://ringtone.yahoo.com.hk

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

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




libwrap ignores entry in hosts.allow

2003-01-03 Thread Delian Krustev
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I'm using mysql-3.23.51 compiled with libwrap support.
If hosts.{allow,deny} have similar to the following structure:

hosts.allow:
#start of hosts.allow
mysqld: ALL
#end of hosts.allow

hosts.deny:
#start of hosts.deny
ALL: ALL
#end of hosts.deny

I end with a rejected access. A message is logged to syslog
which says:
mysqld[4639]: refused connect from <>

I place <> instead of some binary data, which definetely doesn't look
like a host name or ip address(probably s.t. taken from the memory
where it expects to find the address but the area has not been initialized
yet)

mysqld also complains:
mysqld[4639]: warning: can't get client address: Socket operation on 
non-socket

strace shows it tries to do socket operations on /dev/null ?!

Anyway,
If I comment out "ALL: ALL" in hosts.deny access is granted.
The problem is, the "mysqld: ALL" in hosts.allow is ignored.

I'm using the default mysql package from slack 8.1 which comes
with libwrap support compiled in.

God bless You.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+FWEdg1ZnHrWwRYURAr/sAKCLOfoh9fJwKKpOdQzscWrDH4O2oQCfZvVl
RKdA3D+qjWnGN4uUTbPPPWE=
=C4uq
-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




table relations

2003-01-03 Thread Nuno Lopes
Hi everybody,

I have a question about table relations and I would like you to help me.
I have two tables in one server. The first tables has the following fiels:
music_id; title; artist_id; chords
The second one: artist_id; artist_name; country

How can I JOIN this tables?? (I'm working in PHP, if it's matters).
I want to print all musics from a specific country (first table) using the
artist in second table. Can you help me building the SQL statement, please?


Thanking in avance,
Nuno Lopes



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

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: Newbie: MySQL + Java + web?

2003-01-03 Thread Max Morawski
Brynley wrote:


Anyhow - basically it appears he writes some Java code that contains a 
MySQL query (which I'm still not sure how is done - but I think I can 
nut it out) and then "calls" that piece of Java code from within the 
browser (via HTML) - it is this part that has me bamboozled.

Seach for Java Server Pages (JSP) and Servlets. Google and java.sun.com 
will help.

Max



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

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



Different Table type between MASTER and SLAVE

2003-01-03 Thread Heo, Jungsu
Hello.

I'm build a system aka of Shopping mall.(I think most of queies will be SELECT)
For performance, MySQL will run on replication.

I need TRANSACTIONs to manages orders and payment.
So, Master's Table type is InnoDB.
But I think that InnoDB is slower than MyISAM.
(InnoDB's row level locking is very good. but, My system will query SELECT most
cases)

So, I decide that

Master's table uses InnoDB
Slave's table uses MyISAM.

This has any problem?
Any sugesstion will please me.

Thank you for advanced answer!


##
Heo, Jungsu Mr.

SimpleX Internet. http://www.simplexi.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 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php