Re: Record Lock?

2002-12-09 Thread Benjamin Pflugmann
Hi.

On Sun 2002-12-08 at 14:50:35 +0200, [EMAIL PROTECTED] wrote:
[...]
SELECT *
FROM your_table
WHERE some-condition-for-the-row-in-question
FOR UPDATE
[...]
 I would like to clarify that InnoDB holds locks till the current transaction
 COMMIT or ROLLBACK. Thus, in the AUTOCOMMIT=1 mode is makes no sense to use
 FOR UPDATE.

Thanks. I was not aware, that FOR UPDATE works this way.

Then I have another question: Why would one use FOR UPDATE with
BEGIN/COMMIT? I thought, in the default transaction seperatation level
for InnoDB, REPEATED READ, I am guaranteed that nobody changed the
rows anyway. Correct?

So the only advantage would be, that in a long transaction I have
already locked them early and cannot be rolled back later due to a
deadlock. (Well, and this behaviour has changed in recent 4.0, IIRC).

Does this mean, FOR UPDATE is mostly useful with lesser transaction
seperation levels?

TIA,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




RE: Quota Support

2002-12-09 Thread Dean Harding
You can place the actual database files inside your user's home
directory, and sym-link to them from the MySQL's data folder.  That way
they will contribute to the user's whole quota and you don't end up with
one quota for DB and another for everything else.

The drawback, of course, is that you have to limit it to one user per
database (but each user could have more than one database).

Dean Harding.

 -Original Message-
 From: Steven Adams [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 9 December 2002 4:07 pm
 To: [EMAIL PROTECTED]
 Subject: Quota Support
 
 Hey,
 I was wondering if its possible to implant a quota system
where i
 can give a user just say access to 2 databases which is allowed to
grow to
 30Mb bewteen the two of them..
 
 What i would really like is if its possible to make mysql use the disk
 quota
 limits.. So i can give the uses say 50MB WebSpace on my server which
will
 iclude his mysql db
 
 Thanks
 /Steve
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
 [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: Date field

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Sun 2002-12-08 at 16:03:22 -0500, [EMAIL PROTECTED] wrote:
 
 I am trying to store a date in the following format '08/12/2002' pr
 '08/12/2002' or any other format if I have to ...on SQLServer 7.

This is the mysql list. What has SQLServer 7 to do with MySQL?

 Basically I want to use
 
 TodaysDate = Date' Date is the system date function
  
 strSQL = SELECT * FROM CallBacks WHERE CallDate =  TodaysDate
 
 Is there any good way to follow please ??

Probably any RDBMS has a built-in date type. Declare CallDate to be of
that type. For MySQL that would be DATE. Then you can use something like

  SELECT * FROM CallBacks WHERE CallDate = CURDATE()

If you are really referring to a different RDBMS, CURDATE() may have a
different name.

HTH,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: Select * From table where name Like 'help'; Help

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 01:00:33 -0500, [EMAIL PROTECTED] wrote:
 I am doing this search from a website,

What does that mean? Which scripting language do you use? PHP? This is
more a question for your website environment than about MySQL.

 and from what I can tell there is no way to use a variable
 (i.e. $var) with REGEXP as the $ sign has a special meaning to
 REGEXP.

That shouldn't matter, because the real value $var is inserted before
the query is send to the MySQL server, where REGEXP of the query is
evaluated. If there is a problem, you need to be much more
specific. Quote the error message, show the relevant part of your code
and so on.

HTH,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: Question

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 08:48:51 +0700, [EMAIL PROTECTED] wrote:
 Hello, every body
 I have 2 database server. the second is a copy of the first. It's replication.
 But there is no connection line because it is not necesery to have an identical copy.
 Every day, i have to update the second using a self made program.

If I understand you correctly, only the first will get updates. In
this case simply use the built-in replication of MySQL. It will create
a log file on the master and when you go online, simply start the
slave process and it will catch up. You only have to find a way to see
when the slave is up to date and you can stop the slave and go
offline.

HTH,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: UNION

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 10:56:21 +0530, [EMAIL PROTECTED] wrote:
 MySQL 3.23.53
 
 I have a table T1 and want to do something like
 
 SELECT * FROM T1 WHERE A = 1 AND xxx...
 UNION
 SELECT * FROM T1 WHERE A = 2 AND yyy...
 
 Don't read to much in the WHERE clause, this is just for question
 purpose. Also I know that UNION is available in MySQL 4.x but need to
 have the REPLACEMENT of it in 3.23.x

If your example really reflects what you want, you can use

  SELECT * FROM T1 WHERE (A = 1 AND xxx) OR (A = 2 AND yyy)

but this _may_ be slow, because OR clause is not very optimized
yet. If speed is the reason you ask (I shouldn't have to guess, so
please be more specific next time), you can use a temporary table,
alternatively:

  CREATE TABLE result SELECT * FROM T1 WHERE A = 1 AND xxx...
  INSERT INTO result SELECT * FROM T1 WHERE A = 2 AND yyy...
  SELECT * FROM result

HTH,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




mysql and swap

2002-12-09 Thread Konstantin Yotov
Hello! :)

The problem is that after working 5-6 hours without
swapping Mysql begin to swap. If I switch off swap
with swapoff -a and then switch it on again after 5-6
horis withut swapping Mysql begin to swap again. Can
anybody give me some advice?
I'm using Apache with mod_perl enabled+mysql 
OS is Linux RedHat 7.3 kernel 2.4.18-3smp
2 CPU x 1GHz Intel 
1 GB RAM
SCSI Seagate HDD/with scsi controller which transfer
rate is 20MB/s !!! I still can persuade my boss to
change it/.

Thanks.
Bye

__
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




total idiot

2002-12-09 Thread Justin French
Okay,

Let's just say I made a stupid mistake, and deleted an entire table's
contents, rather than just one row.

And let's also assume that the CD burn which has the latest back-up of this
data has shit itself, and won't work.

I'm still waiting to hear from the ISP about their own back-up, but i'm
assuming the worst.


Does MySQL remember anything itself?  Does it have any back-up mechanisms?


Justin French

http://Indent.com.au
Web Development  
Graphic Design



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

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: total idiot

2002-12-09 Thread Simon Green
There is data in the logs. So you mite be able you use them to recreate the
data?
Simon

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: 09 December 2002 09:05
To: MySQL
Subject: total idiot


Okay,

Let's just say I made a stupid mistake, and deleted an entire table's
contents, rather than just one row.

And let's also assume that the CD burn which has the latest back-up of this
data has shit itself, and won't work.

I'm still waiting to hear from the ISP about their own back-up, but i'm
assuming the worst.


Does MySQL remember anything itself?  Does it have any back-up mechanisms?


Justin French

http://Indent.com.au
Web Development  
Graphic Design



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

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: total idiot

2002-12-09 Thread Justin French
Great idea, but everything I think I need was done with POST, and it appears
my host doesn't have the most detailed logs :)

I can't see anything I can use in the log file they've given me, but I'll
keep looking.


Thanks anyway!

Justin

on 09/12/02 8:11 PM, Simon Green ([EMAIL PROTECTED]) wrote:

 There is data in the logs. So you mite be able you use them to recreate the
 data?
 Simon
 
 -Original Message-
 From: Justin French [mailto:[EMAIL PROTECTED]]
 Sent: 09 December 2002 09:05
 To: MySQL
 Subject: total idiot
 
 
 Okay,
 
 Let's just say I made a stupid mistake, and deleted an entire table's
 contents, rather than just one row.
 
 And let's also assume that the CD burn which has the latest back-up of this
 data has shit itself, and won't work.
 
 I'm still waiting to hear from the ISP about their own back-up, but i'm
 assuming the worst.
 
 
 Does MySQL remember anything itself?  Does it have any back-up mechanisms?
 
 
 Justin French
 
 http://Indent.com.au
 Web Development 
 Graphic Design
 
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

Justin French

http://Indent.com.au
Web Development  
Graphic Design



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

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




Re: No Ä, Ö, Ü, etc.

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 07:54:46 +0100, [EMAIL PROTECTED] wrote:
 All 'ä', 'ö', 'ü', etc. are changing in ?,! 

Since MySQL simply stores what it is given, without interpreting
charsets, this means that the input method/device you use and the
output method/device disagree on the encoding.

So this not really a MySQL issue in the sense that you quite probably
have the same problem if you removed MySQL from the chain.

 What can I do against it?

Depends. You have given too few information as to make suggestions.

How do you input data. How do you display it. On which software / OS
runs the input resp. output part? And so on.

HTH,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: No Ä, Ö, Ü, etc.

2002-12-09 Thread Thomas Spahni
On Mon, 9 Dec 2002, Sollinger Rainer (dienstlich) wrote:

 All 'ä', 'ö', 'ü', etc. are changing in ?,!
  
 What can I do against it?

Rainer,

first of all: tell us about your setup. What is the output of:
prompt mysqladmin variables

Then give an example how you populate your db with data and how you
retrieve it.

BTW: MySQL works fine for me wich character set 'latin1_de'.

Thomas Spahni

 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: mysql and swap

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 00:57:37 -0800, [EMAIL PROTECTED] wrote:
 
 The problem is that after working 5-6 hours without
 swapping Mysql begin to swap.

How do you determine that? Is MySQL the only process on the server?

 If I switch off swap with swapoff -a and then switch it on again
 after 5-6 horis withut swapping Mysql begin to swap again. Can
 anybody give me some advice?

What does the command free print in this case? Do you still have
memory free or is swapping really needed.

If it is needed, you probably made some MySQL buffers bigger than
reasonable. Check your my.cnf.

 I'm using Apache with mod_perl enabled+mysql 

Do you have applied limits for max_connections (mysql) and MaxClients
(Apache?). mod_perl uses quite some memory per instance.

 OS is Linux RedHat 7.3 kernel 2.4.18-3smp
 2 CPU x 1GHz Intel 
 1 GB RAM
 SCSI Seagate HDD/with scsi controller which transfer
 rate is 20MB/s !!! I still can persuade my boss to
 change it/.

Disk usage is so much slower (magnitudes) there the only reasonable
solution is to get trim your server config to not cause swapping.

HTH,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: total idiot

2002-12-09 Thread Kristian Koehntopp
On Monday 09 December 2002 10:35, Justin French wrote:
 Great idea, but everything I think I need was done with POST, and it
 appears my host doesn't have the most detailed logs :)

I think you are messing up httpd-Logs and MySQL logs here. The question
was: Are there MySQL binlogs or ascii logs? If so, it would probably be
possible to extract the data in question from these database logs.

Kristian

-- 
Kristian Köhntopp, NetUSE AG, Dr.-Hell-Straße, D-24107 Kiel
Tel: +49 431 386 435 00, Fax: +49 431 386 435 99


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

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: total idiot

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 20:35:53 +1100, [EMAIL PROTECTED] wrote:
 Great idea, but everything I think I need was done with POST, and it
 appears my host doesn't have the most detailed logs :)
 
 I can't see anything I can use in the log file they've given me, but I'll
 keep looking.

I am sure he meant MySQL update logs. But it's questionable if your
provider has enabled them (they make everything a bit slower and need
a lot of space). If the update logs reach back far enough, one can
reconstruct a database with it, by re-running all queries.

There is still (some) data left in the tables, if no other changes
were made afterwards. But trying to recover the data is a cumbersome
way to go and you should only try it if the data was really important
(in that case, I would write MySQL AB support and ask them directly),

How much is left depends on the table handler type and if you used
MYISAM, it depends on the storage type (static vs. dynamic rows). If
you had any VARCHARs, it was dynamic and more data will be lost. If
you forgot the WHERE clause in the DELETE statement, the table file
will have been deleted and nothing is left.

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




No Ä, Ö, Ü, etc.

2002-12-09 Thread Sollinger Rainer (dienstlich)
Thanks for all the replays, here are the details:


The server is  Windows 2000 with SP3 and the client is Windows XP Prof. 
The Frontend is written under Java and is a special programm for us.

Here is my my.ini:
#This File was made using the WinMySQLAdmin 1.4 Tool
#04.12.2002 09:52:43

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=P:/mysql
bind-address=192.168.1.30
datadir=P:/mysql/data
language=P:/mysql/share/german
default-character-set=latin1_de
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=P:/mysql/bin/mysqld-nt.exe
user=
password=
QueryInterval=10

[Client]
character-sets-dir=P:/mysql/share/charsets
default-character-set=latin1_de


And my db.properties:
# Eintrag in der Clusterresource  java -server -Xmx128m -jar P:\resource\jar\joe.jar 
p:/cfg/cluster/ini/db.properties db


joe.autostart=db

# LOG4J Konfiguration
 
include.lcf=/cfg/include/logcfg/DB.lcf

 
# ENDE  LOG4J Konfiguration 
 
  xmlpath=/resource/xds;xml


include.mcast=/cfg/cluster/ini/mcast.properties

#onco.debug=0
#  onco.sleep=5

  db.prefix=/Service/db/my
  db.host=ELR1SRV
  db.definition=databases.xml
  db.connect.suffix=characterEncoding=iso-8859-1useUnicode=true

#  Polen:
#  db.connect.suffix=characterEncoding=iso-8859-2useUnicode=true
  
  joe.processname=Datenbank Server

I hope somebody can help us !!!




Here is the output of the command mysqladmin variables:
mysqladmin: ERROR: unknown variable 'default-character-set=latin1_de'




All 'ä', 'ö', 'ü', etc. are changing in ?,! 
 
What can I do against it?
 
Rainer

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




No Ä, Ö, Ü, etc. Now it works

2002-12-09 Thread Sollinger Rainer (dienstlich)
Thanks, for all the replays, now it´s ok.

The problem was in the db.properties, there was an insert like this:

db.connect.suffix=characterEncoding=iso-8859-2useUnicode=true 

it only works without the :  
db.connect.suffix=characterEncoding=iso-8859-2useUnicode=true

Rainer

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




SELECT rows from multiple tables and order all by last added

2002-12-09 Thread Angus Fraser
Hi, I've joined this list today - looking for a good forum to discuss my
difficulties with Mysql as they arise - I'm an SQL newbie.

I'd like to construct a single query that creates one list of the contents
of multiple tables (which all have a dateadded column) sorted so that
output rows from each table are listed in the order they were added to the
DB. Is this possible? I dont think it's a JOIN because the tables are not
related in any way?

Thanks for your help.

Angus Fraser


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

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




distinct and distinctrow

2002-12-09 Thread Petre Agenbag
sql,query

Hi List

Please can someone help me with this:

I need to filter duplicate entries from my result query, but there's a
twist...

The table has something like this:

id  namekey
1   name1   key1
2   name2   key2
3   name3   key3
4   name1   key1
5   name 1  key1
6   name2   key2


Now I want to search the table for all unique name/key combinations.

I tried 
select DISTINCTROW name,key from table order by name;

but, it returns
name1   key1
name2   key2
name3   key3
name 1  key1

Where name 1 key1 was obviously a typo, yet, I would ideally want to
filter or flag this through some kind of logic = ( there is already a
key1 associated with a name1, cannot associate key1 with another name!)

Firstly, my problem is with the query as I quoted it itself, ie, is that
the best way to prevent duplicates? I might also try this:

select DISTINCTROW MAX(id),name,key from table group by name;
but this will only ensure that only the LATEST key/name pair is listed
right?

Second, how do I translate my logic above into SQL? Or should I do it
in PHP?

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




help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal


Hello all,

I need to run query like (in mysql  ver.4):

select * from table1 as t1 where not exists (select NULL from table2 as
t2 where t1.field1 = t2.field1)

I know you can emulate an 'exists' subquery with a join. but I just
can't think of a way to emulate a 'not exists' without a subquery.
probably due to my limited sql experience. any hints?

thanks a lot
Murad

BTW: when do you think mysql 4.1 would be stable enough for robust use
(not necessarily mission critical).

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

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 backup without blocking?

2002-12-09 Thread Keith C. Ivey
On 7 Dec 2002, at 14:34, Jason Brooke wrote:

 I just connected to one of my masters, inserted a record into a table by
 referencing database.table in the insert query and the query is never
 written to the binary log, thus the slaves never replicate it.

Are you using binlog-do-db or binlog-ignore-db on the master (or 
replicate-do-db or replicate-ignore-db on the slave)?  Those are 
documented to work as you describe:

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

Maybe the difference is that Jeremy is replicating everything and 
you're replicating only some databases.

When you make your initial connection, are you specifying the same 
database that you specify in the USE statement for the other test?

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

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

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 on NOT EXISTS SQL query

2002-12-09 Thread Adolfo Bello
SELECT * FROM table1 t1 LEFT OUTER JOIN table2 t2 ON t1.field1=t2.field2
WHERE t2.field2 IS NULL

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal
 Sent: Monday, December 09, 2002 11:38 AM
 To: MySQL List
 Subject: help on NOT EXISTS SQL query
 
 
 
 
 Hello all,
 
 I need to run query like (in mysql  ver.4):
 
 select * from table1 as t1 where not exists (select NULL from 
 table2 as t2 where t1.field1 = t2.field1)
 
 I know you can emulate an 'exists' subquery with a join. but 
 I just can't think of a way to emulate a 'not exists' without 
 a subquery. probably due to my limited sql experience. any hints?
 
 thanks a lot
 Murad
 
 BTW: when do you think mysql 4.1 would be stable enough for 
 robust use (not necessarily mission critical).
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Compile error on HPUX

2002-12-09 Thread Zengfa Gao
Benjamin,

Thanks for you information, now I tried to use gcc
compile:
 CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure 

Configure has no problem. But When I run make, I
got:


gcc -O3 -DDBUG_OFF -DHAVE_BROKEN_PREAD
-DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS
-DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS
-DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -o hp_test2
hp_test2.o libheap.a ../mysys/libmysys.a
../dbug/libdbug.a ../strings/libmystrings.a -lpthread
-lcrypt -lnsl -lm -lpthread
Making all in sql
Making all in share
No suffix list.
../../extra/comp_err  czech/errmsg.sys
Usage: ../../extra/comp_err [-?] [-I] [-V] fromfile[s]
tofile
*** Error exit code 255

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1
--- Benjamin Pflugmann [EMAIL PROTECTED]
wrote:
 Hello.
 
 On Fri 2002-12-06 at 09:59:25 -0800, [EMAIL PROTECTED]
 wrote:
  Hi,
  
  I just send this email again. Does anyone care
 about
  HPUX build?
 
 You need to be more specific in the future. That
 will enhance the
 chance for someone seing the problem.
 
 I have never used HP-UX. That said, some comments.
 
  --- Zengfa Gao [EMAIL PROTECTED] wrote:
   Hi,
   
   I tried to compile mysql-3.23.49 on HPUX 11.11
   system.
 
 Please include complete info from mysqlbug.
 
   When I run:
   
   CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64
   ./configure
   
   Everything is fine, no errors.
   
   But when I run: make
   
   I got:
   
   cc: password.c, line 95: error 1000:
 Unexpected
   symbol: char_val.
 
 Which password.c? There are 3 in the source. Please
 include some of
 the make output next time.
 
 [...]
   Do anyone have some ideas?
 
 Presumed this is about sql/password.c, this seems to
 be about
 
   inline uint char_val(char X)
 
 The error you cited is typical, if the compiler does
 not know uint
 as type and therefore considered it a label and now
 bails out because
 there is another label following.
 
 That would mean, uint is not defined.
 include/globals.h defines it if
 the system does not provide it:
 
   #if defined(__EMX__) || !defined(HAVE_UINT)
   typedef unsigned int uint;
   typedef unsigned short ushort;
   #endif
 
 So it seems, configure set HAVE_UINT, but
 sys/types.h either does
 not set it or HAVE_SYS_TYPES_H is unset.
 
 No idea, why configure did not the right thing here,
 but it could be
 that it got confused from several runs. Be sure to
 try with a clean
 tarball again.
 
 HTH,
 
   Benjamin.
 
 -- 
 [EMAIL PROTECTED]
 

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


__
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




A log for mysqlimport.

2002-12-09 Thread MySQL
Hello everybody,

I played with mysqlimport because I must transfer a db from msql to mysql.
I have 1.600.000 records to transfer. Everything's perfect except when I
finished the import, I have Warning:16. All the records were transfered.
So, my question is: is there a log created by mysqlimport to see where do
these warnings come from? 
I looked for one, but failed to find it.

Thanks
Kenny


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

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




Re: Can't connect error 10061 - nothing but Mascon works remotely.

2002-12-09 Thread Listen Hinz
Dear Daevid,

 [root@daevid]# mysqladmin ping -h daevid.com -uroot -p
 [root@daevid]# mysqladmin ping -h 192.168.1.254 -uroot -p
 mysqld is alive

So this means a connection is possible, and it doesn't matter whether
you issue a host name or an ip number. Now you have two programs that
can access the MySQL server: Mascon and mysqladmin.

But as I see, you tried the ping from the local host (i.e. you connected
from the same machine where the MySQL server is running). What happens
if you try this from the Win XP box?

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


- Original Message -
From: Daevid Vincent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: 'Stefan Hinz, iConnect (Berlin)' [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 12:18 AM
Subject: RE: Can't connect error 10061 - nothing but Mascon works
remotely.



[root@daevid]# mysqladmin ping -h daevid.com -uroot -p
Enter password:
mysqld is alive

[root@daevid]# mysqladmin ping -h 192.168.1.254 -uroot -p
Enter password:
mysqld is alive


 -Original Message-
 From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, December 08, 2002 1:53 PM
 To: Daevid Vincent; [EMAIL PROTECTED]
 Cc: 'Karam Chand'
 Subject: Re: Can't connect error 10061 - nothing but Mascon
 works remotely.

  Can't connect to MySQL server on 'daevid.com'(10061)

 Try mysqladmin ping -h mysql_host_name. This is the most
 basic thing I can think of to connect to a MySQL server. It
 should report mysqld is alive.

 If even that doesn't work, try mysqladmin ping -h
 192.168.1.1 (or whatever your server host ip is). If that
 fails, too, mail your Mascon connection settings to the list,
 so someone more savvy than me may find out what's happening.

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


 - Original Message -
 From: Daevid Vincent [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: 'Karam Chand' [EMAIL PROTECTED]
 Sent: Sunday, December 08, 2002 9:37 PM
 Subject: RE: Can't connect error 10061 - nothing but Mascon
 works remotely.


  Error No. 2003
  Can't connect to MySQL server on 'daevid.com'(10061)
 
  This is the same error I get with all the other programs too...
 
  No SSH or SSL.
 
  I'm connecting from my WinXP box to my Linux server over my
 local LAN.
 
   -Original Message-
   From: Karam Chand [mailto:[EMAIL PROTECTED]]
   Sent: Friday, December 06, 2002 8:55 PM
   To: Daevid Vincent
   Subject: RE: Can't connect error 10061 - nothing but Mascon works
   remotely.
  
  
   Can you send me some details like:
  
   - The error msg. that SQLYog is reporting.
   - Are you using SSH or SSL?
   - Are you able to connect thru mysql.exe ( console
   client to mysql )
  
  
  
  
   --- Daevid Vincent [EMAIL PROTECTED] wrote:
Yes. I've done this all before, and I am aware of
the RH8 glibc issue,
but I thought that the current RPMS on the mysql
site fixed that. 'cept
it doesn't. I don't understand why mascon works but
other windows
clients don't work when everything else is the same.
   
 -Original Message-
 From: Karam Chand [mailto:[EMAIL PROTECTED]]
   
 Sent: Thursday, December 05, 2002 9:02 PM
 To: Daevid Vincent
 Subject: Re: Can't connect error 10061 - nothing
but Mascon
 works remotely.


 Are you trying to access Linux MySQL from a
Windows
 machine?

 If yes, you can try SQLYog at
http://www.webyog.com

 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
now.
http://mailplus.yahoo.com
   
  
  
   __
   Do you Yahoo!?
   Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
   http://mailplus.yahoo.com
  
 
 
 
 -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 



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

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



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

Re: FULLTEXT

2002-12-09 Thread Brent Baisley
I'm an ex-Lasso developer, using PHP now. More of a pricing issue than 
anything else.

1) Are you trying to combine 15 columns together into one full text 
index? It sounds like you are trying to setup freeform searching on 
structured data. If you really need to do this you might want to think 
about embedding data structure into your TEXT field. Make sure you use 
something that you can parse out easily for display. Then you would have 
one field that stores most of your data that can allow searching for a 
word anywhere or in a specific context.
For instance, if you store your data with labels you can search your 
full text index with those labels:
SELECT * FROM Contacts WHERE MATCH(data) AGAINST ('::fname::Steffan')
or without to find the text string anywhere
SELECT * FROM Contacts WHERE MATCH(data) AGAINST ('Steffan')

2) The default is to not index 3 or less letter words, which is already 
what you desire. But you can recompile to change it to what you want. 
I'm pretty in v4 you don't have to recompile MySQL, just rebuild you 
indexes.

3) I don't this would be desirable.

Perhaps if you described what you are trying to accomplish we could come 
up with an alternative way of going about it. Are you trying to 
replicate the way FileMaker handles indexes where all indexes are full 
text and you can have just about as many (255?) as you want? Don't 
forget about the HAVING option of a SQL query which doesn't use 
indexes, but is probably almost as fast as FileMaker for large text 
field searches.

On Sunday, December 8, 2002, at 06:43 PM, Steffan A. Cline wrote:

I am a member of the Lasso list and heard this would be a good 
place to
ask about a few things about MySQL.

1. In a few places I read about FULLTEXT searches. In one place I saw it
said 16 columns and in another 15. But, I am finding that when using 
15 I
get an error but then go down to 14 and all is well. One of these I am
searching is a TEXT field. Does this eat up 2 VARCHAR columns in the
FULLTEXT?

2. Is there a way in maybe a rebuild of the code to change from 4 or 
more
letters in the FULLTEXT search to 3 or more? I noticed on the FULLTEXT 
page
someone commented on this.

3. Almost the same as above but is there a way to increase the number of
columns for a FULLTEXT search?

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


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

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: Start up problem

2002-12-09 Thread Touch13
It's OK, MySQL start...

On Mon, 09 Dec 2002 10:48:47 -0600
gerald_clark [EMAIL PROTECTED] wrote:

 # su mysql
 $ mysqld
 
 What do you see now?
 
 
 Touch13 wrote:
 
 The data directory is well owned by mysql.
 In fact my problem is : 
 I cannot start mysql daemon in root user
 with change user in line command like this : 
  # safe_mysqld --user=mysql --log=/var/lib/mysql/mysql.log 
 
 touch13
 
 On Mon, 09 Dec 2002 09:28:30 -0600
 gerald_clark [EMAIL PROTECTED] wrote:
 
   
 
 If the data directory is not owned  by mysql, mysql will not be able
 to create a log file.
 Make  sure mysql's data directory, and every directory and file
 beneath it is owned my mysql.
 
 Touch13 wrote:
 
 
 
 
 
 

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

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 rows from multiple tables and order all by last added

2002-12-09 Thread Egor Egorov
On Monday 09 December 2002 13:23, Angus Fraser wrote:

 Hi, I've joined this list today - looking for a good forum to discuss my
 difficulties with Mysql as they arise - I'm an SQL newbie.

 I'd like to construct a single query that creates one list of the contents
 of multiple tables (which all have a dateadded column) sorted so that
 output rows from each table are listed in the order they were added to the
 DB. Is this possible?

You can use f.e. auto_increment column and do
SELECT .. ORDER BY auto_increment_column;

 I dont think it's a JOIN because the tables are not
 related in any way?

If I've got you right, UNION is what you need:
http://www.mysql.com/doc/en/UNION.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: autoextend on innoDB tables

2002-12-09 Thread Victoria Reznichenko
anders,
Friday, December 06, 2002, 1:14:04 PM, you wrote:

adnaxsds In an attempt to use innoDB tables I added this to my 'my.cnf':

adnaxsds innodb_data_home_dir =
adnaxsds innodb_data_file_path = /var/mysql/admin/ibdata1:100M:autoextend

adnaxsds mysqld claimed this was an syntax error if I removed 'autoextend' it works
adnaxsds but I really want the autoextend capability.

What version of MySQL do you use? autoextend is supported since
3.23.50 and 4.0.2



-- 
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: Select * From table where name Like 'help'; Help

2002-12-09 Thread Beauford.2003
I am using PHP on my website, but this is certainly a MySQL question.

 That shouldn't matter, because the real value $var is inserted before
 the query is send to the MySQL server, where REGEXP of the query is
 evaluated. If there is a problem, you need to be much more
 specific. Quote the error message, show the relevant part of your code
 and so on.

The real value of $var is not inserted before it is sent to the server.
REGEXP thinks that 'var' is part of the search pattern because $ is a
reserved operator for REGEXP. So what gets sent to the server is totally
different than what I want to be sent. There are no errors because the
syntax is correct, its just not correct for the search I want it to perform.
So the questions still remains, how do I get REGEXP to treat $var as a
variable and not part of its own syntax.

I have been looking at http://www.mysql.com/doc/en/Regexp.html, but it does
not cover this.

- Original Message -
From: Benjamin Pflugmann [EMAIL PROTECTED]
To: Beauford.2003 [EMAIL PROTECTED]
Cc: Robert Citek [EMAIL PROTECTED]; MySQL List
[EMAIL PROTECTED]
Sent: Monday, December 09, 2002 3:30 AM
Subject: Re: Select * From table where name Like 'help'; Help


 Hello.

 On Mon 2002-12-09 at 01:00:33 -0500, [EMAIL PROTECTED] wrote:
  I am doing this search from a website,

 What does that mean? Which scripting language do you use? PHP? This is
 more a question for your website environment than about MySQL.

  and from what I can tell there is no way to use a variable
  (i.e. $var) with REGEXP as the $ sign has a special meaning to
  REGEXP.

 That shouldn't matter, because the real value $var is inserted before
 the query is send to the MySQL server, where REGEXP of the query is
 evaluated. If there is a problem, you need to be much more
 specific. Quote the error message, show the relevant part of your code
 and so on.

 HTH,

 Benjamin.

 --
 [EMAIL PROTECTED]

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

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





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

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




backrev mysql while retaining data?

2002-12-09 Thread Ronald O . Christian

Due to some application compatibility issues, I may have to backrev
mysql-3.23.53a-1 to 3.23.52-3.  I have only a few weeks' experience
with mysql -- can I do this and retain the current tables and data
contained therein?


Ron
-
I do not love the bright sword for its sharpness, nor the arrow
for its swiftness, nor the warrior for his glory. I love only
that which they defend.
http://roc85.home.attbi.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




A log for mysqlimport.

2002-12-09 Thread Kekette
Hello everybody,

I played with mysqlimport because I must transfer a db from msql to mysql.
I have 1.600.000 records to transfer. Everything's perfect except when I
finished the import, I have Warning:16. All the records were transfered.
So, my question is: is there a log created by mysqlimport to see where do
these warnings come from?
I look for one, but failed to find it.

Thanks
Kenny

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

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




Re: Problem compiling mysql-3.23.53

2002-12-09 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 9 Dec 2002, Pierre wrote:

 I tried mysql-4.0.5a-beta, and same error...

Try to compile without --with-libwrap - seems like there is a buglet in
this part of the code - or do you desperately need TCP wrapper support?

Bye,
LenZ

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

iD8DBQE99OVmSVDhKrJykfIRAltwAJ47tlKimR5lmPpa1K07Zkd+xW1xsACeKbB7
HJhbGPT33foF6BvVyJO2n9M=
=Tgea
-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: Error compiling mysql 3.23.53

2002-12-09 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 9 Dec 2002, Pierre wrote:

 I try to compile mysql-3.23.53 on my GNU/Linux system with gcc-3.2 there
 was no problem with the configure, but for the make I got this :

 [...]
 Making all in isam
 gmake[2]: Entering directory `/tmp/mysql-3.23.53/isam'
 /bin/sh ../libtool --mode=link gcc -s  -O3 -DDBUG_OFF -O3 -march=i686
 -L/usr/local/BerkeleyDB.4.1/lib -lpthread -lgpm -rdynamic  -o isamchk
 isamchk.o sort.o libnisam.a ../mysys/libmysys.a
 ../dbug/libdbug.a ../strings/libmystrings.a -lpthread -lz -lcrypt -lnsl
 -lm  -lpthread gcc -s -O3 -DDBUG_OFF -O3 -march=i686
 -L/usr/local/BerkeleyDB.4.1/lib -lpthread -lgpm -rdynamic -o isamchk
 isamchk.o sort.o libnisam.a ../mysys/libmysys.a ../dbug/libdbug.a
 ../strings/libmystrings.a -lpthread -lz -lcrypt -lnsl -lm -lpthread
 ../mysys/libmysys.a(my_tempnam.o): In function `my_tempnam':
 my_tempnam.o(.text+0x51): the use of `tempnam' is dangerous, better use
 `mkstemp'
 ../mysys/libmysys.a(raid.o): In function `my_raid_create':
 raid.o(.text+0xa5): undefined reference to `operator new(unsigned)'
 raid.o(.text+0x132): undefined reference to `operator delete(void*)'
 ../mysys/libmysys.a(raid.o): In function `my_raid_open':
 raid.o(.text+0x185): undefined reference to `operator new(unsigned)'
 raid.o(.text+0x20f): undefined reference to `operator delete(void*)'
 ../mysys/libmysys.a(raid.o): In function `my_raid_close':
 raid.o(.text+0x7c1): undefined reference to `operator delete(void*)'
 collect2: ld returned 1 exit status
 gmake[2]: *** [isamchk] Error 1
 gmake[2]: Leaving directory `/tmp/mysql-3.23.53/isam'
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory `/tmp/mysql-3.23.53'
 gmake: *** [all-recursive-am] Error 2

The problem is, that the RAID functionality of MySQL has been implemented
in C++, which leads to these interesting errors, when linking object files
that include C++ code with some C compilers. There are three options you
should try (in the recommended order):

 o simply compile without --with-raid, if you don't need it
 o use CC=g++ when running configure
 o add CFLAGS=-DHAVE_MYSYS_NEW - this might also help to work around
   this problem.

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE99OhgSVDhKrJykfIRAqwbAJ93ax7DEQGoWPlohu1Zqct5JUCVtwCbBdqq
KBjLO89E6zAfbkzaT1NmoWc=
=+EgD
-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: Select * From table where name Like 'help'; Help

2002-12-09 Thread Beauford.2003
My mistake, I assumed the space was just for clarity and not really
meaningful, but since it is between the ' ' it makes sense that is. I tried
a few variations on this and think I have found what I need - where title
like binary '%$var%.  Notice the key word 'binary' which makes the world of
difference.

From the tests I have run this will find the occurrence of any word that
begins with a capital and then matches any remaining characters. So if I
search for One it will fine One Day, Day One, This One Day - however, if I
search for On it will also find On The Water and Your On Third.

The only thing I could do is to add a space after $var, but them partial
searches won't be found. i.e. searching for beaufor will not find beauford.

Until I can find a better way, one of these will suffice.

Thanks for your correction as I did miss the space thing.

Beauford


- Original Message -
From: Jocelyn Fournier [EMAIL PROTECTED]
To: Beauford.2003 [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 9:31 AM
Subject: Re: Select * From table where name Like 'help'; Help


 No it doesn't, since I introduce a space between % and one. So stone
will
 not be returned :)

 Regards,
   Jocelyn
 - Original Message -
 From: Beauford.2003 [EMAIL PROTECTED]
 To: Jocelyn Fournier [EMAIL PROTECTED]
 Sent: Monday, December 09, 2002 2:26 PM
 Subject: Re: Select * From table where name Like 'help'; Help


  That is what I am using, however, it is not as detailed as I need it to
 be.
  Like I said in my original question, I don't want to get 'stone' when I
  search for 'one', and using LIKE does exactly this.
 
  Thanks, Beauford
 
 
  - Original Message -
  From: Jocelyn Fournier [EMAIL PROTECTED]
  To: Beauford.2003 [EMAIL PROTECTED]; MySQL List
  [EMAIL PROTECTED]
  Sent: Sunday, December 08, 2002 7:57 PM
  Subject: Re: Select * From table where name Like 'help'; Help
 
 
   Hi,
  
   A dirty solution would be to search :
  
   field LIKE '% one %' or field LIKE 'one %' or field LIKE '% one'  or
   field='one';
  
   Regards,
 Jocelyn
  
   - Original Message -
   From: Beauford.2003 [EMAIL PROTECTED]
   To: MySQL List [EMAIL PROTECTED]
   Sent: Tuesday, December 10, 2002 12:50 AM
   Subject: Select * From table where name Like 'help'; Help
  
  
Hi,
   
Hey, did this list change their spam filters? Now every time I send
an
   email
it gets bounced unless the word MySQL  or Query is in the email.
 Anyway,
Please read below for a recent problem I am having.
   
 I want to be able to search on my database and be able to get the
following, but running into a few snags.
   
 If I search for the word - One - I want to see:
   
 Another One
One Day
One on One
Your The One
   
 But not:
   
 Fashioned
Stone
Everyone
   
 Also, and maybe part of the solution - is there a way for the
search
 to
   be
case sensitive.
   
 TIA
   
 Beauford
   
   
   
   
   
   
   
  
 -
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
   
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
   [EMAIL PROTECTED]
Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
   
   
   
   
  
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   To request this thread, e-mail [EMAIL PROTECTED]
   To unsubscribe, e-mail
  [EMAIL PROTECTED]
   Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  
  
 
 
 
 
 





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

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




Re: Question about SLAVE STOP

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 08:17:41 -0600, [EMAIL PROTECTED] wrote:
 I know that the slave will honor transactions but how does that effect the
 STOP SLAVE command?  Based on your note, I'm assuming (Oh, that nasty word!)
 that if the stop slave is issued in the middle of a transaction it will roll
 back.

Correct. The change of 3.23.52 was what was needed to make SLAVE STOP
honor (full) transactions.

 I'm also assuming that the pointer for the bin-log will now point to
 the begining of the transaction that was rolled back.

Unfortunately no. This what my last remark (in the other mail) was
about and what Heikki also pointed out in his mails. Since the
developers are now aware of the problem, I think we can look forward
for a early bugfix.

HTH,

Benjamin.


-- 
[EMAIL PROTECTED]

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

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




Re: Record Lock?

2002-12-09 Thread Heikki Tuuri
Benjamin,

- Original Message -
From: Benjamin Pflugmann [EMAIL PROTECTED]
To: Heikki Tuuri [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 9:58 AM
Subject: Re: Record Lock?


 Hi.

 On Sun 2002-12-08 at 14:50:35 +0200, [EMAIL PROTECTED] wrote:
 [...]
 SELECT *
 FROM your_table
 WHERE some-condition-for-the-row-in-question
 FOR UPDATE
 [...]
  I would like to clarify that InnoDB holds locks till the current
transaction
  COMMIT or ROLLBACK. Thus, in the AUTOCOMMIT=1 mode is makes no sense to
use
  FOR UPDATE.

 Thanks. I was not aware, that FOR UPDATE works this way.

 Then I have another question: Why would one use FOR UPDATE with
 BEGIN/COMMIT? I thought, in the default transaction seperatation level
 for InnoDB, REPEATED READ, I am guaranteed that nobody changed the
 rows anyway. Correct?

not correct.

A plain SELECT in InnoDB is a 'consistent read'. It does not set any locks
but reads a snapshot of the database. That is how under the default
REPEATABLE READ isolation level you always get the same result set back,
though other users have updated the table.

You must use FOR UPDATE or LOCK IN SHARE MODE to lock the index records the
SELECT touches. The exception is the isolation level SERIALIZABLE, where
InnoDB internally adds LOCK IN SHARE MODE to each plain SELECT.
...

 Benjamin.

 --
 [EMAIL PROTECTED]

sql query

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

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: Select * From table where name Like 'help'; Help

2002-12-09 Thread Beauford.2003
Andy,

I mentioned in my previous email that I am using PHP, and I have also tried
putting quotes around $var (many different ways) with no better results.
REGEXP just gives a syntax error when I do this.

Through the suggestion of another list user I have found a way that suits my
needs using the where name like binary '$var'. It's jury rigged, but works
the way I need it to work for the most part.

Thanks for your suggestions.

- Original Message -
From: Andy Bakun [EMAIL PROTECTED]
To: Beauford.2003 [EMAIL PROTECTED]
Cc: MySQL List [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 3:08 PM
Subject: Re: Select * From table where name Like 'help'; Help


 You still have not mentioned what language you are using to interface
 with MySQL.  If you are using PHP or Perl, then things like single and
 double quotes will make a difference here, and looking in the MySQL
 manual will not help you.  Check the string that contains the query, if
 it looks like this:

$q = 'select  from table where col regexp $var';

 change it to

$q = select  from table where col regexp '$var';

 The enclosing single quotes are keeping the value of $var from being
 interpolated into the string in the above example.  See the manual for
 your programming language for more information on variable
 interpolation.

 On Mon, 2002-12-09 at 08:22, Beauford.2003 wrote:
  I am using PHP on my website, but this is certainly a MySQL question.
 
   That shouldn't matter, because the real value $var is inserted before
   the query is send to the MySQL server, where REGEXP of the query is
   evaluated. If there is a problem, you need to be much more
   specific. Quote the error message, show the relevant part of your code
   and so on.
 
  The real value of $var is not inserted before it is sent to the server.
  REGEXP thinks that 'var' is part of the search pattern because $ is a
  reserved operator for REGEXP. So what gets sent to the server is totally
  different than what I want to be sent. There are no errors because the
  syntax is correct, its just not correct for the search I want it to
perform.
  So the questions still remains, how do I get REGEXP to treat $var as a
  variable and not part of its own syntax.
 
  I have been looking at http://www.mysql.com/doc/en/Regexp.html, but it
does
  not cover this.
 
  - Original Message -
  From: Benjamin Pflugmann [EMAIL PROTECTED]
  To: Beauford.2003 [EMAIL PROTECTED]
  Cc: Robert Citek [EMAIL PROTECTED]; MySQL List
  [EMAIL PROTECTED]
  Sent: Monday, December 09, 2002 3:30 AM
  Subject: Re: Select * From table where name Like 'help'; Help
 
 
   Hello.
  
   On Mon 2002-12-09 at 01:00:33 -0500, [EMAIL PROTECTED] wrote:
I am doing this search from a website,
  
   What does that mean? Which scripting language do you use? PHP? This is
   more a question for your website environment than about MySQL.
  
and from what I can tell there is no way to use a variable
(i.e. $var) with REGEXP as the $ sign has a special meaning to
REGEXP.
  
   That shouldn't matter, because the real value $var is inserted before
   the query is send to the MySQL server, where REGEXP of the query is
   evaluated. If there is a problem, you need to be much more
   specific. Quote the error message, show the relevant part of your code
   and so on.
  
   HTH,
  
   Benjamin.
  
   --
   [EMAIL PROTECTED]
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   To request this thread, e-mail [EMAIL PROTECTED]
   To unsubscribe, e-mail
  [EMAIL PROTECTED]
   Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  
  
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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




MySQL Command to List existing db's = ??

2002-12-09 Thread wstandley . ws
I have a Linux/Apache/MySQL box with a number of MySQL db's on it... all were created 
by someone else expermenting with MySQL...

I'm not sure of all the names of the db's on the system...

Is there a MySQL command to List the names of all the MySQL db's on the box?

The system is not on the net... it is local and to be used for off line development 
work.

thanks for any info - Will


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

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 on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal

Thanks Adolfo, 

this actually won't quite do the trick though. I should have been a bit
more specific. the query actually comes up in the context of
computational genomics. a similar, perhaps more familiar problem would
be something like this:

table

id customer purchase
1  c1   microwave
2  c1   car
3  c1   freezer
4  c2   car
5  c2   microwave
6  c3   car
7  c3   CD player

etc.

the idea is to pull out all the customers who have never purchased say a
freezer:

if you do

select customer from table where purchase != freezer

you'll get all the INSTANCES of customer purchasing something other than
a freezer. i.e. you'll get c1,c2,c3. although c1 did purchase a freezer.

my best guess of how to do this in SQL was

select distinct t1.customer from table as t1 where not exists (select
NULL from table as t2 where t1.customer = t2.customer and t2.purchase =
'freezer')

- does that look about right for the purpose I mentioned?

- now how do you do that without the subquery (especially considering
that the performance of the subquery will probably be horrible)

many thanks
Murad

Adolfo Bello wrote:
 
 SELECT * FROM table1 t1 LEFT OUTER JOIN table2 t2 ON t1.field1=t2.field2
 WHERE t2.field2 IS NULL
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal
  Sent: Monday, December 09, 2002 11:38 AM
  To: MySQL List
  Subject: help on NOT EXISTS SQL query
 
 
 
 
  Hello all,
 
  I need to run query like (in mysql  ver.4):
 
  select * from table1 as t1 where not exists (select NULL from
  table2 as t2 where t1.field1 = t2.field1)
 
  I know you can emulate an 'exists' subquery with a join. but
  I just can't think of a way to emulate a 'not exists' without
  a subquery. probably due to my limited sql experience. any hints?
 
  thanks a lot
  Murad
 
  BTW: when do you think mysql 4.1 would be stable enough for
  robust use (not necessarily mission critical).
 

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

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




segmentation fault with mysql_num_rows - C API in Apache module

2002-12-09 Thread James Northcott
I am writing an Apache module that has to perform some queries against a
MySQL database.  For the most part, it is working properly.  However, when I
get an empty result set for my query (that is, the select returns no rows) I
get a segmentation fault when trying to call mysql_num_rows.

Here is the relevant part of my code:


  if (mysql_query(mysql_handle, query) != 0) {
.bail out.
  }
result=mysql_store_result(mysql_handle);
if (result) {
  if (mysql_num_rows(result) == 1){
.process the row.
  }
}

The segfault occurs during the call to mysql_num_rows.

I have also tried using mysql_affected_rows(mysql_handle) instead; this call
also segfaults.

Finally, I have tried mysql_use_result like this:

result = mysql_use_result(mysql_handle);
if (result) {
  if (data = mysql_fetch_row(result)){
.process data.
  }
}

And, you guessed it, the call to mysql_fetch_row segfaults.

If I isolate the MySQL code in a small test program (not an Apache module)
it works great.  I'm guessing it has something to do with either Apache or
PHP, which I also have included as a DSO in Apache.  I noticed the warning
about using the bundled MySQL support with PHP, so I re-compiled PHP using
the same libmysqlclient as my module - no change.

It seems as if mysql_[store/use]_result is returning a bad pointer when
there is an empty result set, but only inside an Apache module.  If the
query returns rows, everything works fine - I can verify this by
inserting/deleting rows from the database and watching httpd either live or
die.  I'm using 3.23.32-log on Linux.  Any thoughts?



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

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




locking issues

2002-12-09 Thread Greg_Cope
Hi All,

I may be confused here but it would appear that when you issue a LOCK TABLES
tbl_name { READ|WRITE }; You cannot read from another unlocked table in the
same connection eg:

mysql  LOCK TABLES users read;
Query OK, 0 rows affected (0.00 sec)

mysql select * from Logger limit 1;
ERROR 1100: Table 'Logger' was not locked with LOCK TABLES

I've read section 6.7.2 of the Manual:
http://www.mysql.com/documentation/mysql/bychapter/index.html#LOCK_TABLES

This is on 3.23.43.

I assume this is expected behaviour?  Although at the moment it seems a
little odd that this thread cannot read from another (unlocked) table whilst
it has a lock.

Does anyone have a solution that I may be missing?  We are locking tables to
do a fake transaction so that we can update a number of tables without
interference from other threads.

Thanks for any replies.

Greg Cope
JITC



This message and any attachment has been virus checked by
Pfizer Corporate Information Technology, Sandwich.



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

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: distinct and distinctrow

2002-12-09 Thread Mertens Bram
On Mon, 2002-12-09 at 12:45, Petre Agenbag wrote:
 sql,query
[snip]
 I need to filter duplicate entries from my result query, but there's a
 twist...
[snip]
 Where name 1 key1 was obviously a typo, yet, I would ideally want to
 filter or flag this through some kind of logic = ( there is already a
 key1 associated with a name1, cannot associate key1 with another name!)

Perhaps you can first run a query that corrects the typos? That would
make maintaining the logic more easy...

e.g. first run a query that changes all 'name x' into the appropriate
'namex', then run another query that checks for duplicates.

If you combine these two in one function in PHP you don't even need to
call multiple queries.  That way you can add other queries for different
typos when the need arises...

And on a side-note; perhaps you can add some logic to the query that
updates the db so these kind of typos are prevented?

HTH
-- 
 #  Mertens Bram M8ram [EMAIL PROTECTED]   Linux User #249103  #
 #  Red Hat Linux 7.3  KDE 3.0.0-10  kernel 2.4.18-3  i686  128MB RAM  #
 #  12:17pm up 2:12, 1 user, load average: 0.20, 0.10, 0.13 #


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

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




Error: Can't lock file

2002-12-09 Thread Geetika Tewari

I am getting the following error while trying to do read-write queries on
MySQL.  Does anyone know what this error means?
The name of the script that generated this error is called
randomreadwrite.pl.

Can't lock file (errno: 12) at ./randomreadwrite.pl line 54.

Line 54 does the following:

 $sth-execute() or die $sth-errstr;





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

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: QUICK: What is the optimal way to store opening times ?

2002-12-09 Thread Michael T. Babcock
On Fri, Dec 06, 2002 at 05:54:53PM +0100, Alliax wrote:
 I have one question : if I go the RestTimes route, that is having a row per
 day and so 7 row per restaurants : can I, in one SQL request, know if THAT
 restaurant is open or close now ? I now there are NOW() function in SQL and
 probably many others, but I am not at ease to use them since I have pretty
 basic SQL skills.
 
This should be a personal work assignment for you, but try:

SELECT * FROM RestTimes WHERE RestID = ... AND OpenTime  now() 
and CloseTime  now();

FWIW, you'll have to do a calculation in there such that OpenTime is midnight 
today + seconds from day offset.  Its not difficult; find some calendaring 
code for examples.
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd. (Hosting, Security, Consultation, Database, etc)
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: How to backup without blocking?

2002-12-09 Thread Michael T. Babcock
On Sat, Dec 07, 2002 at 02:34:01PM +1000, Jason Brooke wrote:
 ...and then do the insert query it's written to the binary log fine, and of
 course picked up by the slaves. Similarly when using mysql via Php, if I
 don't use mysql_select_db() and instead, simply use mysql_query() and
 specify the database.table in the sql string passed to it, the query is
 never written to the binary log.
 
Are you using 'replicate-wild-do-table = DBName.%' ??
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd. (Hosting, Security, Consultation, SQL, etc)
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




[mysql] Lock status

2002-12-09 Thread Patricio Díaz G .
I'am working with MySQL 3.23.51-Max in a linux box and Visual Fox and Delphi
in a WinXP box, mostly using InnoDB tables.

Is there a way to know wich rows are lockedin a table? is there a function
that returns if a row is locked, or the rows locked in a table? It can be
done with a UDF?

My question is due that, as you know, the InnoDB tables makes loking at row
level and in the context of a transaction, so if someone has locked the row
that I'm tring to read or lock, my program freezes until the rows are
released.

I worked arround this situation setting the value of
innodb_lock_wait_timeout to 5, more or less, so my program doesn't freezes
and a warnig is raised, then I can assume that the row is locked, but
can't be sure that this is the real reason of the warnig.

Thanks in advance,
Patricio.



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

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




Buffer Pool Hit Rate calculation

2002-12-09 Thread Gopal Rao Guru Raghavendran
Hi, 

Greets! 

I am a beginner in MySQL DBA. I am having InnoDB installed MySQL version is
3.23.53. I am also getting the statistics through InnoDB monitor. In that i
am getting the Buffer pool hit rate as 1000 / 1000. I unable to understand
how it has been calculated? I am getting the hit rate as 100-
(writes/reads). Is that the correct way to calculate the hit ratio? 

Kindly help me by providing some more information. I am unable to get more
information in the manual as well as in the Internet. 

Thanks and Regards,

Guru


From 27 November 2002, all StarHub corporate email addresses have been
changed to [EMAIL PROTECTED]

This email is confidential and privileged.  If you are not the intended
recipient, you must not view, disseminate, use or copy this email. Kindly
notify the sender immediately, and delete this email from your system. Thank
you.

Please visit our website at www.starhub.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




OBDC and MySQL 4.0.5a

2002-12-09 Thread Salvatore Enrico Indiogine
Greetings:

I installed MySQL 4.0.5a using the RPMs downloaded from
http://www.mysql.com on RedHat 8.0.

I also installed unixODBC that comes with the RHL 8.0 CD.

When I try to install the MySQL odbc driver I get the unresolved
dependency:

libmysqlclient.so.10

I created a symlink from libmysqlclient.so.11 to 10 but it still does
not work.

I got it only to work by downgrading from MySQL 4 to 3.

Is there a way of having ODBC working with MySQL-4.0.5a?

Thanks in advance!

-- 
Enrico Indiogine
Systems Analyst
Information Systems
Eastern New Mexico University - Roswell
505-624-7493

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

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: OT Select * From table where name Like 'help'; Help

2002-12-09 Thread Michael T. Babcock
On Mon, Dec 09, 2002 at 09:22:09AM -0500, Beauford.2003 wrote:
 The real value of $var is not inserted before it is sent to the server.
 REGEXP thinks that 'var' is part of the search pattern because $ is a
 reserved operator for REGEXP. So what gets sent to the server is totally

Have you tried ...\$var... or $var ?

SQL
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd. (Hosting, Security, Consultation, Database, etc)
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 Command to List existing db's = ??

2002-12-09 Thread Roger Davis
If I understand right try..

SHOW DATABASES;

The mysql and test database are installed by default.

Hope this helps

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: MySQL Command to List existing db's = ??


I have a Linux/Apache/MySQL box with a number of MySQL db's on it... all
were created by someone else expermenting with MySQL...

I'm not sure of all the names of the db's on the system...

Is there a MySQL command to List the names of all the MySQL db's on the
box?

The system is not on the net... it is local and to be used for off line
development work.

thanks for any info - Will


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

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: Select * From table where name Like 'help'; Help

2002-12-09 Thread Beauford.2003

 This is most definitely a quoting issue with your PHP string.  If it is
 quoted correctly, the MySQL server will never see the string $var
 appearing after the keyword REGEXP, so if $ has meaning to a regular
 expression wouldn't matter (unless the value of $var contained a $).
 I've used REGEXP with (really complex) dynamicly built regular
 expressions stored in PHP variables a number of times and have never had
 a problem as you've described above.

MySQL is not seeing $var, but it is seeing var from what I can understand of
Regexp (the manual on this is not very good), $ means to match the end of a
string, so since I have $var, I am thinking that Regexp thinks that the end
of the string I want to search for ends with var. In any event, the actual
value of  $var never gets sent to MySQL, so the search will always fail.

Maybe I am misunderstanding the meaning of this, but since I really can't
make any sense out of the manual, I am guessing at what I think they mean.

Let me give you and example:

$var=One ($var is passed the string from a form on a webpage)

There are 3 entries in the database with the word One

One Day
Day One
That's the One

There are also other words that contain the word one, like stone and anyone.

I want to be able to run a search that will just show the first 3 by typing
in the word One ('one' would result in the string not found').

Beauford



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

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 * From table where name Like 'help'; Help

2002-12-09 Thread Andy Bakun
You still have not mentioned what language you are using to interface
with MySQL.  If you are using PHP or Perl, then things like single and
double quotes will make a difference here, and looking in the MySQL
manual will not help you.  Check the string that contains the query, if
it looks like this:

   $q = 'select  from table where col regexp $var';

change it to

   $q = select  from table where col regexp '$var';

The enclosing single quotes are keeping the value of $var from being
interpolated into the string in the above example.  See the manual for
your programming language for more information on variable
interpolation.

On Mon, 2002-12-09 at 08:22, Beauford.2003 wrote:
 I am using PHP on my website, but this is certainly a MySQL question.
 
  That shouldn't matter, because the real value $var is inserted before
  the query is send to the MySQL server, where REGEXP of the query is
  evaluated. If there is a problem, you need to be much more
  specific. Quote the error message, show the relevant part of your code
  and so on.
 
 The real value of $var is not inserted before it is sent to the server.
 REGEXP thinks that 'var' is part of the search pattern because $ is a
 reserved operator for REGEXP. So what gets sent to the server is totally
 different than what I want to be sent. There are no errors because the
 syntax is correct, its just not correct for the search I want it to perform.
 So the questions still remains, how do I get REGEXP to treat $var as a
 variable and not part of its own syntax.
 
 I have been looking at http://www.mysql.com/doc/en/Regexp.html, but it does
 not cover this.
 
 - Original Message -
 From: Benjamin Pflugmann [EMAIL PROTECTED]
 To: Beauford.2003 [EMAIL PROTECTED]
 Cc: Robert Citek [EMAIL PROTECTED]; MySQL List
 [EMAIL PROTECTED]
 Sent: Monday, December 09, 2002 3:30 AM
 Subject: Re: Select * From table where name Like 'help'; Help
 
 
  Hello.
 
  On Mon 2002-12-09 at 01:00:33 -0500, [EMAIL PROTECTED] wrote:
   I am doing this search from a website,
 
  What does that mean? Which scripting language do you use? PHP? This is
  more a question for your website environment than about MySQL.
 
   and from what I can tell there is no way to use a variable
   (i.e. $var) with REGEXP as the $ sign has a special meaning to
   REGEXP.
 
  That shouldn't matter, because the real value $var is inserted before
  the query is send to the MySQL server, where REGEXP of the query is
  evaluated. If there is a problem, you need to be much more
  specific. Quote the error message, show the relevant part of your code
  and so on.
 
  HTH,
 
  Benjamin.
 
  --
  [EMAIL PROTECTED]
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Select * From table where name Like 'help'; Help

2002-12-09 Thread Andy Bakun
On Mon, 2002-12-09 at 16:10, Beauford.2003 wrote:
 Andy,
 
 I mentioned in my previous email that I am using PHP, and I have also tried
 putting quotes around $var (many different ways) with no better results.
 REGEXP just gives a syntax error when I do this.

I'm sorry, I did miss the where you said you were using PHP. Just found
it.  But I was responding to:

   The real value of $var is not inserted before it is sent to the
   server.  REGEXP thinks that 'var' is part of the search pattern
   because $ is a reserved operator for REGEXP.

This is most definitely a quoting issue with your PHP string.  If it is
quoted correctly, the MySQL server will never see the string $var
appearing after the keyword REGEXP, so if $ has meaning to a regular
expression wouldn't matter (unless the value of $var contained a $). 
I've used REGEXP with (really complex) dynamicly built regular
expressions stored in PHP variables a number of times and have never had
a problem as you've described above.

 Through the suggestion of another list user I have found a way that suits my
 needs using the where name like binary '$var'. It's jury rigged, but works
 the way I need it to work for the most part.

Don't give up now!  A perfect solution can be found! :)

Andy


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

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




RE: Can't connect error 10061 - nothing but Mascon works remotely.

2002-12-09 Thread Daevid Vincent
  [root@daevid]# mysqladmin ping -h daevid.com -uroot -p 
 [root@daevid]# 
  mysqladmin ping -h 192.168.1.254 -uroot -p mysqld is alive
 
 But as I see, you tried the ping from the local host (i.e. 
 you connected from the same machine where the MySQL server is 
 running). What happens if you try this from the Win XP box?

I don't have mySQL installed on the XP box, so I can't run mysqladmin.


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

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




Multiple MySQL db's on one machine

2002-12-09 Thread tmb
I was told that if you had multiple MySQL db's on a
single machine... that actually it was really only one
db with tables for for db1, db2, db3... ???

This doesn't sound right.

I thought MySQL created a seperate directory for each
db  put each db's files in their respective folder...

true or not ?

thanks - tmb


__
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: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal

Hello Stefan,

thanks for the feedback. I think I probably misstated my problem. I just
emailed a more explicit example of the sort of thing I am trying to do.
for the sake of completeness I'll reproduce it here: 

table

id customer purchase
1  c1   microwave
2  c1   car
3  c1   freezer
4  c2   car
5  c2   microwave
6  c3   car
7  c3   CD player

the goal is to find all customers that have never bought a freezer.

am I correct in interpreting your suggestion, applied to this case, as
the query:

select customer from purchases where purchase != freezer is null

i tried and it returned zero rows. probably because purchase != freezer
is either true or false and neither value is null!

what am i missing?

Murad


Stefan Hinz, iConnect (Berlin) wrote:
 
 Dear Murad,
 
  I know you can emulate an 'exists' subquery with a join. but I just
  can't think of a way to emulate a 'not exists' without a subquery.
  probably due to my limited sql experience. any hints?
 
 You have probably tried something like SELECT ... WHERE condition IS NOT
 NULL. To emulate a not exists subselect, you would use SELECT ... WHERE
 condition IS NULL.
 
  BTW: when do you think mysql 4.1 would be stable enough for robust use
 
 As I hear, MySQL 4.1-alpha will be released very soon, probably in January.
 My guess for MySQL 4.1-gamma (the release declared as stable, meaning there
 are lots of installations in production environments that have proven
 stable) is August 2003. Any other guesses? Monty? ;-)


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

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




RE: RE: relational is relational is relational, but ...

2002-12-09 Thread Jon Frisby


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, December 09, 2002 6:00 PM
 To: Jon Frisby
 Subject: Re: RE: relational is relational is relational, but ... 
 
 
 Your message cannot be posted because it appears to be either spam or
 simply off topic to our filter. To bypass the filter you must include
 one of the following words in your message:
 
 sql,query
 
 If you just reply to this message, and include the entire 
 text of it in the
 reply, your reply will go through. However, you should
 first review the text of the message to make sure it has 
 something to do
 with MySQL. Just typing the word MySQL once will be 
 sufficient, for example.
 
 You have written the following:
 
   While this discipline [defining a primary key] might be useful in
   practice, we do not insist on it ..., because we regard the idea of
   making one candidate key somehow more equal than the others as a
   psychological issue merely.  Of course, we do not prohibit 
 it either.
 
 Point taken.
 
 With a guaranteed candidate key a PK isn't neccesary to serve the
 underlying goal (direct addressibility of every datum), but 
 its still a
 useful piece of information to implant in the schema for purposes of
 making code-generation tools easier to implement. :)
 
 -JF
 
 
 


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

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

2002-12-09 Thread Grant Cooper
I use freeBSD and like to use sockstat -4. It tells you the user, the
command that is used and the PID, Protocol local address and the foreign
address it is connected to.

- Original Message -
From: Brian P. Austin [EMAIL PROTECTED]
To: Mike At Spy [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, December 06, 2002 5:06 PM
Subject: RE: mysql port number


 show variables
 that will show you what you need.

 you can use a like statement, because there is a lot of stuff
 hope that helps

 brian

 -Original Message-
 From: Mike At Spy [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 06, 2002 9:51 AM
 To: [EMAIL PROTECTED]
 Subject: RE: mysql port number



 That, of course, isn't even getting into the point that you didn't answer
my
 question.  I asked how I could tell, not what the default port was!

 Thank you to the others that did.  :)

 -Mike



  -Original Message-
  From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 04, 2002 6:19 PM
  To: Mike At Spy
  Cc: [EMAIL PROTECTED]
  Subject: Re: mysql port number
 
 
  On Wed, Dec 04, 2002 at 12:04:52PM -0500, Mike At Spy wrote:
  
   How can I tell what port number mysql is running on?  I need it
  for a chat
   program.  :)
 
  3306
 
  A google search would have found the answer in no time.
  --
  Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
  [EMAIL PROTECTED]  |  http://jeremy.zawodny.com/
 
  MySQL 3.23.51: up 14 days, processed 434,170,735 queries (344/sec. avg)
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 



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

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


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

 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: backrev mysql while retaining data?

2002-12-09 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Ronald,

 Due to some application compatibility issues, I may have to backrev
 mysql-3.23.53a-1 to 3.23.52-3.  I have only a few weeks' experience
 with mysql -- can I do this and retain the current tables and data
 contained therein?

Backup your databases and tables first. I would suggest you use

 mysqldump -uusername -ppassword --all-databases --add-drop-table 
mysql_db.sql (you can use any name you want, and any other location)

for this. (In most cases, a mere file copy action of DATADIR (c:\mysql\data
or /var/lib/mysql) will do, but mysqldump makes sure your data are
compatible with all table handlers MySQL can use, etc.)

Uninstall MySQL 3.23.53a-1 (sure it's -1?). Install MySQL 3.23.52-3 (sure
it's -3?).

In case you copied DATADIR, make sure the server is not running, then copy
the DATADIR backup back to the appropriate location (DATADIR, see above),
overwriting the DATADIR data of the new installation. Start the server.

If you used the method I suggested, start the server first. The installation
procedure will have installed the default grant tables as well, which means,
you will have the default MySQL users set up (instead of the users you set
up with your old installation). Import your own backuped data as follows:

shell mysql -uroot  mysql_db.sql

This will install your old grant tables, too, overwriting the newly
installed mysql database.

Now, everything should be in the same state as it was before you downgraded.

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


- Original Message -
From: Ronald O. Christian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 7:32 PM
Subject: backrev mysql while retaining data?



Due to some application compatibility issues, I may have to backrev
mysql-3.23.53a-1 to 3.23.52-3.  I have only a few weeks' experience
with mysql -- can I do this and retain the current tables and data
contained therein?


Ron
-
I do not love the bright sword for its sharpness, nor the arrow
for its swiftness, nor the warrior for his glory. I love only
that which they defend.
http://roc85.home.attbi.com

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

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



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

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




Re: Can't connect error 10061 - nothing but Mascon works remotely.

2002-12-09 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Daevid,

 I don't have mySQL installed on the XP box, so I can't run mysqladmin.

I knew your answer to this before I pressed the send button ;-)

Do install MySQL on your Win XP box. The installation procedure will not
start the MySQL server, so there's nothing to worry about. If you leave the
defaults as is, this will install MySQL in C:\mysql.

Open a DOS box and cd to C:\mysql\bin. Here, you will find all the *.exe
files. Try mysqladmin ping again. If this doesn't work with host name and/or
ip address, there's probably some tricky network problem involved (for which
Mascon might have an even trickier solution, e.g. some registry entry).

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


- Original Message -
From: Daevid Vincent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: 'Listen Hinz' [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 9:09 PM
Subject: RE: Can't connect error 10061 - nothing but Mascon works remotely.


   [root@daevid]# mysqladmin ping -h daevid.com -uroot -p
  [root@daevid]#
   mysqladmin ping -h 192.168.1.254 -uroot -p mysqld is alive
 
  But as I see, you tried the ping from the local host (i.e.
  you connected from the same machine where the MySQL server is
  running). What happens if you try this from the Win XP box?

 I don't have mySQL installed on the XP box, so I can't run mysqladmin.



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

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 on NOT EXISTS SQL query

2002-12-09 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Murad,

 I know you can emulate an 'exists' subquery with a join. but I just
 can't think of a way to emulate a 'not exists' without a subquery.
 probably due to my limited sql experience. any hints?

You have probably tried something like SELECT ... WHERE condition IS NOT
NULL. To emulate a not exists subselect, you would use SELECT ... WHERE
condition IS NULL.

 BTW: when do you think mysql 4.1 would be stable enough for robust use

As I hear, MySQL 4.1-alpha will be released very soon, probably in January.
My guess for MySQL 4.1-gamma (the release declared as stable, meaning there
are lots of installations in production environments that have proven
stable) is August 2003. Any other guesses? Monty? ;-)

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


- Original Message -
From: Murad Nayal [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 4:37 PM
Subject: help on NOT EXISTS SQL query




 Hello all,

 I need to run query like (in mysql  ver.4):

 select * from table1 as t1 where not exists (select NULL from table2 as
 t2 where t1.field1 = t2.field1)

 I know you can emulate an 'exists' subquery with a join. but I just
 can't think of a way to emulate a 'not exists' without a subquery.
 probably due to my limited sql experience. any hints?

 thanks a lot
 Murad

 BTW: when do you think mysql 4.1 would be stable enough for robust use
 (not necessarily mission critical).

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

 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: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal


I think i found a way to do this: in case anybody is interested:

select customer from purchases group by customer having sum(case when
purchase = 'freezer' then 1 else 0 end) = 0;

I am finding that SQL is trickier (and more powerful) than I thought
originally!!

Murad Nayal wrote:
 
 Thanks Adolfo,
 
 this actually won't quite do the trick though. I should have been a bit
 more specific. the query actually comes up in the context of
 computational genomics. a similar, perhaps more familiar problem would
 be something like this:
 
 table
 
 id customer purchase
 1  c1   microwave
 2  c1   car
 3  c1   freezer
 4  c2   car
 5  c2   microwave
 6  c3   car
 7  c3   CD player
 
 etc.
 
 the idea is to pull out all the customers who have never purchased say a
 freezer:
 
 if you do
 
 select customer from table where purchase != freezer
 
 you'll get all the INSTANCES of customer purchasing something other than
 a freezer. i.e. you'll get c1,c2,c3. although c1 did purchase a freezer.
 
 my best guess of how to do this in SQL was
 
 select distinct t1.customer from table as t1 where not exists (select
 NULL from table as t2 where t1.customer = t2.customer and t2.purchase =
 'freezer')
 
 - does that look about right for the purpose I mentioned?
 
 - now how do you do that without the subquery (especially considering
 that the performance of the subquery will probably be horrible)
 
 many thanks
 Murad
 
 Adolfo Bello wrote:
 
  SELECT * FROM table1 t1 LEFT OUTER JOIN table2 t2 ON t1.field1=t2.field2
  WHERE t2.field2 IS NULL
 
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal
   Sent: Monday, December 09, 2002 11:38 AM
   To: MySQL List
   Subject: help on NOT EXISTS 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: distinct and distinctrow

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 13:45:42 +0200, [EMAIL PROTECTED] wrote:

 Please can someone help me with this:
 
 I need to filter duplicate entries from my result query, but there's a
 twist...
 
[...]
 Now I want to search the table for all unique name/key combinations.
 
 I tried 
 select DISTINCTROW name,key from table order by name;
 
 but, it returns
 name1 key1
 name2 key2
 name3 key3
 name 1key1
 
 Where name 1 key1 was obviously a typo, yet, I would ideally want to
 filter or flag this through some kind of logic = ( there is already a
 key1 associated with a name1, cannot associate key1 with another name!)

Well, I suggest you do that before you create the report by cleaning
up the database. It makes more sense to repair it once, instead every
time you query the database:

  SELECT key, COUNT(name) AS cnt FROM your_table GROUP BY key HAVING cnt  1

which will list all keys which have more than one name associated. Then use

  SELECT key, name FROM your_table
  WHERE key IN (key3, key5) GROUP BY key ORDER BY key

where you replace key3, key5 with the results from the first query.
This will list the alternatives. Decide which one is the right one
and update the false one accordingly:

  UPDATE your_table SET name = name1 WHERE key = key1;

where you insert the appropriate values for name1 and key1, of course.


 Firstly, my problem is with the query as I quoted it itself, ie, is that
 the best way to prevent duplicates?

The best way to prevent duplicates is to already prevent them on
insertion, which you would do with a UNIQUE key on (key,name).

For selects the one you cited above is fine.

 I might also try this:
 
 select DISTINCTROW MAX(id),name,key from table group by name;
 but this will only ensure that only the LATEST key/name pair is listed
 right?

No. That won't work. You will get MAX(id) and a random name and key
from the group. That is, in Standard SQL, you may not mix grouping
functions with columns that are not in the GROUP BY clause, while
MySQL allows it and just gives you random values (it presumes you are
sure that name,key will be same for all values in a group).

The correct query would use a sub-select which you work-around with
temporary tables in MySQL. See the tutorial section in the manual for
examples.

HTH,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: Select * From table where name Like 'help'; Help

2002-12-09 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-09 at 09:22:09 -0500, [EMAIL PROTECTED] wrote:
 I am using PHP on my website, but this is certainly a MySQL question.
 
  That shouldn't matter, because the real value $var is inserted before
  the query is send to the MySQL server, where REGEXP of the query is
  evaluated. If there is a problem, you need to be much more
  specific. Quote the error message, show the relevant part of your code
  and so on.
 
 The real value of $var is not inserted before it is sent to the server.

Why not? What is $var? You called it a variable, and there are no
variables of the form $var in MySQL, but only @var. So I presumed that
you mean a PHP variable by $var. If that is not the case, please be
more specific, as I already asked you. Else, this will become a
guessing game.

If it is the case, PHP will replace $var by its value and send the
modified query to MySQL, without the $ sign. If you have reason to
believe otherwise, please cite an example. But I am repeating myself.

[...]
 So the questions still remains, how do I get REGEXP to treat $var as a
 variable and not part of its own syntax.

In order to make $ non-special, you have to escape it by a
backslash. In order to get the backslash to the server, you have also
to escape the backslash. How often depends on your exact statement
(which kind of quotes you use, etc.)

 I have been looking at http://www.mysql.com/doc/en/Regexp.html, but
 it does not cover this.

You are right. This page fails to mention how to handle special
characters at all.

HTH,

Benjamin.


-- 
[EMAIL PROTECTED]

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

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




RE: Desc question

2002-12-09 Thread Anderson, Alan R
 From: Alex Behrens [mailto:[EMAIL PROTECTED]]
 ...How can I make it so only one form
 selection adds a DESC tag to the query, is this possible?
 
 I'm using this code:
 
 $fetch = mysql_query(SELECT * FROM players ORDER BY $var);
 
 select name='var' size='1' style='border-style: solid; border-color:
 #025689'
 option value='name'Name/option
 option value='position'Position/option
 option value='number'Number/option
 option value='grade_num'Grade/option
 
 I want only the Grade option to use the desc option with the 
 $fetch query.

If you want DESC to go along with grade_num, just put DESC with grade_num:

  option value='grade_num DESC'Grade/option

This seems obvious to me, so I must be missing something. :-)

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

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: locking issues

2002-12-09 Thread Paul DuBois
At 19:52 + 12/9/02, [EMAIL PROTECTED] wrote:

Hi All,

I may be confused here but it would appear that when you issue a LOCK TABLES
tbl_name { READ|WRITE }; You cannot read from another unlocked table in the
same connection eg:


You're supposed to lock all the tables that you'll need until you
issue the UNLOCK TABLES statement.  Not just some of them.



mysql  LOCK TABLES users read;
Query OK, 0 rows affected (0.00 sec)

mysql select * from Logger limit 1;
ERROR 1100: Table 'Logger' was not locked with LOCK TABLES

I've read section 6.7.2 of the Manual:
http://www.mysql.com/documentation/mysql/bychapter/index.html#LOCK_TABLES

This is on 3.23.43.

I assume this is expected behaviour?  Although at the moment it seems a
little odd that this thread cannot read from another (unlocked) table whilst
it has a lock.

Does anyone have a solution that I may be missing?  We are locking tables to
do a fake transaction so that we can update a number of tables without
interference from other threads.

Thanks for any replies.

Greg Cope
JITC



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

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




ADO Bulk Inserts

2002-12-09 Thread Michael She
Hi All,


Does MySQL allow for Bulk Inserts via ADO?

I can get a single insert statement to be inserted, but if I try t 
concatenate multiple inserts, I get a sytax error.

I tried putting a space between each statement, return charater, 
semi-colon, etc, but it doesn't work.

I'm doing the inserts through a ADODB.Connection.

Thanks.
--
Michael She  : [EMAIL PROTECTED]
Mobile   : (519) 589-7309
WWW Homepage : http://www.binaryio.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: Question about SLAVE STOP

2002-12-09 Thread Carl McNamee
I know that the slave will honor transactions but how does that effect the
STOP SLAVE command?  Based on your note, I'm assuming (Oh, that nasty word!)
that if the stop slave is issued in the middle of a transaction it will roll
back.  I'm also assuming that the pointer for the bin-log will now point to
the begining of the transaction that was rolled back.  If this is incorrect
please let me know.

Thanks!

Carl

-Original Message-
From: Benjamin Pflugmann [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 07, 2002 8:56 AM
To: '[EMAIL PROTECTED]'
Cc: Carl McNamee
Subject: Re: Question about SLAVE STOP


Hello.

On Sat 2002-12-07 at 14:26:00 +0100, [EMAIL PROTECTED] wrote:
 Hello.
 
 On Fri 2002-12-06 at 16:13:54 -0600, [EMAIL PROTECTED]
wrote:
  
  First off, we are using Innodb tables on version 3.23.53a-max.
  
  If the command STOP SLAVE is issued in the middle of the following type
of
  transaction:
  
  set autocommit = 0;
  update...;
  update...;
  update...;
  commit;
   
  does it roll back the current transaction or wait for it to complete?
[...]
 I decided to dig in the source a bit (v3.23.46).
[...]
 In short, it seems the slave thread effectively runs in auto-commit
 mode which is not what you want.
 
 I found a somewhat old post by Heikki (the InnoDB deveoper) which
 basically says the same:
 
   http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:79650

I just happened to see in the changelog, that this is out of date. As
of 3.23.52, it wraps BEGIN/COMMIT:

  D.3.3 Changes in release 3.23.52 (14 Aug 2002)

* Wrap BEGIN/COMMIT around transaction in the binary log. This
  makes replication honour transactions.

Sorry about that. Teaches me to not presume that there were no
important changes in the last few stable releases.

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: How to backup without blocking?

2002-12-09 Thread Michael T. Babcock
On Fri, Dec 06, 2002 at 08:36:32AM -0600, Cal Evans wrote:
 Run your database from a RAID 0. At some point during the night. Down one of
 the drives, mount it and copy the data.  Then unmount it bring it back
 on-line.  The RAID card should re-sync them without any down time.

FWIW, you mean RAID 1 ... RAID 0 is non-redundant; it stripes data across
disks to get better speed.  RAID 1 gives you two disk that are identical.

If you have Linux or NT with software RAID, you can easily set two partitions
on one drive to be mirrors of each other too, with the same effect.
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd. (Hosting, Security, Consultation, SQL, etc)
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




MySQL, OpenLDAP for Authentication

2002-12-09 Thread Steven Nakhla
I need to setup a Unix authentication scheme using
OpenLDAP with MySQL on the backend storing all of the
account data.  (Yes, I know that the folks behind
OpenLDAP don't recommend using SQL...We have our
reasons)  I've setup unixODBC so my LDAP server can at
least talk to my MySQL server.  Has anyone out there
done something similar?  Do you know how I can go
about storing the account information within the
database, etc.?  I'd really appreciate any insight you
can give.  Thanks!

Steve Nakhla

__
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




[mysql] Lock status

2002-12-09 Thread Patricio Díaz G .
I'am working with MySQL 3.23.51-Max in a linux box and Visual Fox and Delphi
in a WinXP box, mostly using InnoDB tables.

Is there a way to know wich rows are lockedin a table? is there a function
that returns if a row is locked, or the rows locked in a table? It can be
done with a UDF?

My question is due that, as you know, the InnoDB tables makes loking at row
level and in the context of a transaction, so if someone has locked the row
that I'm tring to read or lock, my program freezes until the rows are
released.

I worked arround this situation setting the value of
innodb_lock_wait_timeout to 5, more or less, so my program doesn't freezes
and a warnig is raised, then I can assume that the row is locked, but
can't be sure that this is the real reason of the warnig.

Thanks in advance,
Patricio.



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

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




porting stored procedures from sql server

2002-12-09 Thread Chandra Amarasingham
Hi,

Any advice on porting stored procedures from sql server.  I have looked 
at UDF's but can't figure out how to use the existing database 
connection to perform queries, also have not used C for a very long time.

Also had a brief look at myperl, but not well documented and still in beta.

Thanks
Chandra


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

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: Multiple MySQL db's on one machine

2002-12-09 Thread Paul DuBois
At 16:04 -0800 12/9/02, tmb wrote:

I was told that if you had multiple MySQL db's on a
single machine... that actually it was really only one
db with tables for for db1, db2, db3... ???

This doesn't sound right.


Ask the person that told you this for evidence to support the claim.



I thought MySQL created a seperate directory for each
db  put each db's files in their respective folder...


That's correct.

However, a small complication to my answer:
It may be that the person was thinking of the InnoDB tablespace.
The InnoDB storage handler manages all InnoDB tables within a single
tablespace, no matter which database they come from.  But even so,
each database has its own directory, and InnoDB tables do have a .frm
file in the appropriate database directory.



true or not ?

thanks - tmb



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

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: Installing MySQL on Jaguar?

2002-12-09 Thread Mat Rice
 Brian,
 
 This may be late, but you should check out Fink:
 
http://fink.sourceforge.net.
 
 A super easy way to get prepackaged UNIX software for OSX.
 
 I also highly recommend FinkCommander:
 
http://finkcommander.sourceforge.net/
 
 A great GUI front-end to Fink.
 
 
Right now I am running my SQL 3.2.53 and getting it installed (via
FinkCommander  Fink) involved picking it out of a list and pressing a
button.
 
 Hope this helps,
 
 Mat


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

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




How to get MySQL to list current db's ?

2002-12-09 Thread Will Standley
I have two sample MySQL db's running on a local Linux box w/Apache...

Once I enter mysql from the Linux command line...

Is there a way to ask MySQL to list the db's that are currently created?

Thanks,

Will


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

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: Start up problem

2002-12-09 Thread Touch13
The data directory is well owned by mysql.
In fact my problem is : 
I cannot start mysql daemon in root user
with change user in line command like this : 
# safe_mysqld --user=mysql --log=/var/lib/mysql/mysql.log 

touch13

On Mon, 09 Dec 2002 09:28:30 -0600
gerald_clark [EMAIL PROTECTED] wrote:

 If the data directory is not owned  by mysql, mysql will not be able
 to create a log file.
 Make  sure mysql's data directory, and every directory and file
 beneath it is owned my mysql.
 
 Touch13 wrote:
 
 On Fri, 6 Dec 2002 10:18:12 +0100
 David Bordas [EMAIL PROTECTED] wrote:
 
   
 
 Have a look to the mysql error log to see if you can find your
 problem
 
 ...
 
 
 This file should be in /usr/local/mysql/data
 
 
 
 I have no log file, the only file created is serveur name.err
 with the  
 
 number of the thread who crash.
 
 
 touch13
 
   
 
 This file IS the mysql error log.
 On one of mine i can see this for example :
 021128 10:48:21  mysqld ended
 
 021128 14:12:42  mysqld started
 /usr/local/mysql-3.23.53a/bin/mysqld: ready for connections
 
 So if mysql don't start, there'll normally be something there .
 
 David
 
 
 
 I repeat, i have no error log because mysql cannot start.
 i try this command under root: 
 safe_mysqld --user=mysql --log=/var/lib/mysql/mysql.log
 and this file is always empty...
 
 except if i cannot look in good file ;)
 
 touch13
   
 
 ---
 --Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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




Subselect workaround

2002-12-09 Thread Amittai Aviram
Scenario:  Databases to list names, titles, contact information, and other
professional stuff about faculty members, administrators, and staff in a
university department, used (among other things) as a backend to a series of
Web pages with listings.

I had had three tables:  faculty, administration, and staff, each with
columns relevant to each category.  But I was always bothered by the fact
that administrators are also faculty members, so I was duplicating
information in the databases, which is _bad_!  So now the the administration
table has, hard-coded (so to speak), the titles, administrative office
numbers, phone numbers, and other stuff that remains the same regardless of
who holds the position, and then an id column cross-referencing to the
faculty table for that individual member.  So now all columns are full with
the (relatively) invariant data, and the last column, id, is empty (NULL).
BTW, the first column, ordr, shows the order in which the administrators
should be listed, and is a primary key:

CREATE TABLE administrators (
  ordr TINYINT UNSIGNED NOT NULL PRIMARY KEY,
  title VARCHAR(64) NOT NULL,
  building ENUM(Main Building,Annex) NOT NULL DEFAULT 1,
  room TINYINT(3) UNSIGNED ZEROFILL NOT NULL,
  telephone VARCHAR(16) NOT NULL,
  id INT UNSIGNED NOT NULL,
  INDEX(id)
);

Here is what I would want to do:

INSERT INTO administrators (id) values
(SELECT id FROM faculty
WHERE lastName = Jones)
WHERE ordr = 1;

How can I do the equivalent of this in MySQL 3.23?  What about MySQL 4.0?

Thanks!

Amittai Aviram
[EMAIL PROTECTED]



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

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




Re: How to backup without blocking?

2002-12-09 Thread Jason Brooke
 Are you using 'replicate-wild-do-table = DBName.%' ??

Thanks for the reply.

That's a client-only option, we're not actually having any troubles with
clients ignoring anything in the binary log - the problem I'm describing is
that when a database is not first explictly selected, the master refuses to
write the query to the binary log.

Example 1:

$sql = insert into database.table values ('somevalue');
mysql_query($sql);

Query is not written to binary log, so slaves never pick it up.



Example 2:

$sql = insert into table values ('somevalue');
// or even insert into database.table values ('somevalue');
mysql_select_db(database);
mysql_query($sql);

Query is written to binary log fine, slaves pick it up as long as database
is 'selected'. I can duplicate this issue using the bundled (with mysql)
mysql client by using the '\u database' command, and also not using it, and
I see the same result.

In my original email regarding this I mentioned that if it's by design the
that's fine, from now on we just remember to select the database rather than
referring to it only in the sql string - but I figured it probably isn't by
design and might be worth being looked at.

Regards,
Jason




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

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 get MySQL to list current db's ?

2002-12-09 Thread Sherwin T. Ang
You can either use
mysqlshow databases;

or mysqlshow -uroot -p  in the command line.

Respectfully yours,

Sherwin T. Ang
Systems Administrator
Internet Manila

- Original Message -
From: Will Standley [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 12:35 AM
Subject: How to get MySQL to list current db's ?


 I have two sample MySQL db's running on a local Linux box w/Apache...

 Once I enter mysql from the Linux command line...

 Is there a way to ask MySQL to list the db's that are currently created?

 Thanks,

 Will


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

 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: Subselect workaround

2002-12-09 Thread Amittai Aviram
OOPS!  Please note correction below!

 Here is what I would want to do:
 
 INSERT INTO administrators (id) values
 (SELECT id FROM faculty
 WHERE lastName = Jones)
 WHERE ordr = 1;

Sorry!  I meant UPDATE, not INSERT!

UPDATE administrators SET id = 
(SELECT id FROM faculty
WHERE lastName = Jones)
WHERE ordr = 1;

Thanks!

Amittai Aviram
[EMAIL PROTECTED]
 

This is not spam!  See? --


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




Front end won't connect

2002-12-09 Thread DIetrich Speer
Question from a Linux and MySql newbie

I just installed RedHat 8.0 and MySQL. During installation there was no
prompt for any database server properties (hostname, user).

Now I downloaded MySQLCC and try to configure the connection to the server.
I assume the server is running, because I can start and stop it through the
services interface.

However, whatever info I put into the Client - it will always give me an
error 145 (User can't connect).

What am I doing wrong? I followed the instructions in the INstall file to
set up a new user and got an error also.

I guess that's what happens when a MSSQL guy, spoilt and unnerved by endless
wizzards, tries to learn Linux.

Dietrich



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

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 get MySQL to list current db's ?

2002-12-09 Thread Daniel Kiss
Hi,

At 11:35 2002.12.09._-0500, you wrote:

Is there a way to ask MySQL to list the db's that are currently created?


Yes: SHOW DATABASES

Good luck,
Daniel 


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

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: Start up problem

2002-12-09 Thread Sean Phillips
Try:
shell chown -R root /usr/local/mysql

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

shell chgrp -R mysql /usr/local/mysql

then:

shell /usr/local/mysql/bin/safe_mysqld --user=mysql 
or
shell /usr/local/mysql/bin/mysqld_safe --user=mysql 
if you are running MySQL 4.x.

Sean

- Original Message -
From: Touch13 [EMAIL PROTECTED]
To: gerald_clark [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, December 09, 2002 10:00 AM
Subject: Re: Start up problem


 The data directory is well owned by mysql.
 In fact my problem is :
 I cannot start mysql daemon in root user
 with change user in line command like this :
 # safe_mysqld --user=mysql --log=/var/lib/mysql/mysql.log

 touch13

 On Mon, 09 Dec 2002 09:28:30 -0600
 gerald_clark [EMAIL PROTECTED] wrote:

  If the data directory is not owned  by mysql, mysql will not be able
  to create a log file.
  Make  sure mysql's data directory, and every directory and file
  beneath it is owned my mysql.
 
  Touch13 wrote:
 
  On Fri, 6 Dec 2002 10:18:12 +0100
  David Bordas [EMAIL PROTECTED] wrote:
  
  
  
  Have a look to the mysql error log to see if you can find your
  problem
  
  ...
  
  
  This file should be in /usr/local/mysql/data
  
  
  
  I have no log file, the only file created is serveur name.err
  with the
  
  number of the thread who crash.
  
  
  touch13
  
  
  
  This file IS the mysql error log.
  On one of mine i can see this for example :
  021128 10:48:21  mysqld ended
  
  021128 14:12:42  mysqld started
  /usr/local/mysql-3.23.53a/bin/mysqld: ready for connections
  
  So if mysql don't start, there'll normally be something there .
  
  David
  
  
  
  I repeat, i have no error log because mysql cannot start.
  i try this command under root:
  safe_mysqld --user=mysql --log=/var/lib/mysql/mysql.log
  and this file is always empty...
  
  except if i cannot look in good file ;)
  
  touch13
  
  
  ---
  --Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]Trouble
  unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  
  
  
  
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try:
  http://lists.mysql.com/php/unsubscribe.php
  
  
  
  
 
 
 

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

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





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

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




Re: Front end won't connect

2002-12-09 Thread Michael She
Are you connecting locally or remotely?  By default, MySQL creates a 
Localhost Root account with no password.

You can try logging in with that account.  If you need to log in remotely, 
you'll need to change the permissions on the user table (add a % to the 
hosts section to allow for any ip addresses to connect).

At 11:46 PM 12/9/2002 -0600, DIetrich Speer wrote:
Question from a Linux and MySql newbie

I just installed RedHat 8.0 and MySQL. During installation there was no
prompt for any database server properties (hostname, user).

Now I downloaded MySQLCC and try to configure the connection to the server.
I assume the server is running, because I can start and stop it through the
services interface.

However, whatever info I put into the Client - it will always give me an
error 145 (User can't connect).





--
Michael She  : [EMAIL PROTECTED]
Mobile   : (519) 589-7309
WWW Homepage : http://www.binaryio.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: How to get MySQL to list current db's ?

2002-12-09 Thread Michael She
Hi,

SHOW DATABASES;


At 11:35 AM 12/9/2002 -0500, Will Standley wrote:

I have two sample MySQL db's running on a local Linux box w/Apache...

Once I enter mysql from the Linux command line...

Is there a way to ask MySQL to list the db's that are currently created?


--
Michael She  : [EMAIL PROTECTED]
Mobile   : (519) 589-7309
WWW Homepage : http://www.binaryio.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




MySQL-Installation on a Windows 2000 Cluster

2002-12-09 Thread Sollinger Rainer (dienstlich)
I must install MySQL on a Windows 2000 Cluster-Server. 
What´s the best way to do it?
How must the my.ini configured so that it works as fail over?
 
Thanks
 
Rainer

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: porting stored procedures from sql server

2002-12-09 Thread Michael She
If you use PHP, here is an idea:

http://www.ashleyit.com/blogs/brentashley/archives/000339.html


Also, someone wrote a UDF to interpret PHP in MySQL...I'm not sure if it'll 
work as a Stored Procedure system tho.

http://www.oreillynet.com/pub/wlg/2292

At 03:03 PM 12/10/2002 +1100, Chandra Amarasingham wrote:
Hi,

Any advice on porting stored procedures from sql server.  I have looked at 
UDF's but can't figure out how to use the existing database connection to 
perform queries, also have not used C for a very long time.

Also had a brief look at myperl, but not well documented and still in beta.

Thanks
Chandra

--
Michael She  : [EMAIL PROTECTED]
Mobile   : (519) 589-7309
WWW Homepage : http://www.binaryio.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: distinct and distinctrow

2002-12-09 Thread Rafal Jank
 The table has something like this:
 
 idnamekey
 1 name1   key1
 2 name2   key2
 3 name3   key3
 4 name1   key1
 5 name 1  key1
 6 name2   key2
 
 
 Now I want to search the table for all unique name/key combinations.

select name,key from table group by name,key;
 
 Second, how do I translate my logic above into SQL? Or should I do it
 in PHP?
You should do it inPHP

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

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

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