mysql 3.23.53 compile issue

2002-12-10 Thread Darren Beale
Hi there

I've an Sun Ultra Enterprise 2 desktop that is running a new (Patched)
build
of Solaris 9 with GCC3.2, GNU Binutils (latest) and a few packages like
GNU
Make, GNU sed, GNU tar from sunfreeware

PATH is /usr/sbin:/usr/bin:/usr/local/bin:/usr/ccs/bin:/usr/ucb
LD_LIBRARY_PATH is /usr/local/ssl/lib:/usr/local/lib
CFLAGS=-O3
CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti


When I try to compile mysql 3.23.53 with the line:
./configure --prefix=/usr/local/mysql --enable-assembler
--with-mysqld-ldfla
gs=-all-static

I get:

=8=
gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/usr/local/m
ysql\ -DDATADIR=\/usr/local/mysql/var\
-DSHAREDIR=\/usr/local/mysql/share/mysql\ -DHA
VE_CONFIG_H -I./../include -I./../regex
-I. -I../include -I.. -I. -O3 -DDBUG_OFF -O3 -felide-constructors
-fno-ex
ceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti
-DUSE_
MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -DHAVE_RWLOCK_T -c mysqld.cc
mysqld.cc: In function `void* handle_connections_sockets(void*)':
mysqld.cc:2410: invalid conversion from `size_socket*' to `socklen_t*'
mysqld.cc:2476: invalid conversion from `size_socket*' to `socklen_t*'
make[3]: *** [mysqld.o] Error 1
make[3]: Leaving directory `/usr/local/build/mysql-3.23.53/sql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/build/mysql-3.23.53/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/build/mysql-3.23.53'
make: *** [all-recursive-am] Error 2
=8=

any ideas? I've also tried with no extra ./configure options and get the
same results.

thanks

--
Darren Beale - Acksys Ltd
Office: 020 8530 1454
Fax: 07092 394822
Mobile: 07711 716197
http://www.acksys.co.uk



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

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




mysql-3.23.53 compile issue

2002-12-10 Thread Darren Beale
Hi there

I've an Sun Ultra Enterprise 2 desktop that is running a new (Patched) build
of Solaris 9 with GCC3.2, GNU Binutils (latest) and a few packages like GNU
Make, GNU sed, GNU tar from sunfreeware

PATH is /usr/sbin:/usr/bin:/usr/local/bin:/usr/ccs/bin:/usr/ucb
LD_LIBRARY_PATH is /usr/local/ssl/lib:/usr/local/lib
CFLAGS=-O3
CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti

When I try to compile mysql 3.23.53 with the line:
./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldfla
gs=-all-static

I get:
=8=
gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/usr/local/m
ysql\ -DDATADIR=\/usr/local/mysql/var\
-DSHAREDIR=\/usr/local/mysql/share/mysql\ -DHA
VE_CONFIG_H -I./../include -I./../regex
-I. -I../include -I.. -I. -O3 -DDBUG_OFF -O3 -felide-constructors -fno-ex
ceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_
MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -DHAVE_RWLOCK_T -c mysqld.cc
mysqld.cc: In function `void* handle_connections_sockets(void*)':
mysqld.cc:2410: invalid conversion from `size_socket*' to `socklen_t*'
mysqld.cc:2476: invalid conversion from `size_socket*' to `socklen_t*'
make[3]: *** [mysqld.o] Error 1
make[3]: Leaving directory `/usr/local/build/mysql-3.23.53/sql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/build/mysql-3.23.53/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/build/mysql-3.23.53'
make: *** [all-recursive-am] Error 2
=8=

any ideas? I've also tried with no extra ./configure options and get the
same results.
thanks

--
Darren Beale - Acksys Ltd
Office: 020 8530 1454
Fax: 07092 394822
Mobile: 07711 716197
http://www.acksys.co.uk



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

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




Re: Quota Support

2002-12-10 Thread Steven Adams

 So do u mean like this

 user home dir = /home/web/users/xxx

 then u symlink /home/web/users/xxx/mysql/database1 
 /usr/local/mysql/lib/database1

 chown -R xxx.xxx /home/web/users/xxx/mysql/database1

 Wouldent mysql get permissions errors like that?

 /Steve
 - Original Message -
 From: Dean Harding [EMAIL PROTECTED]
 To: 'Steven Adams' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, December 09, 2002 7:01 PM
 Subject: RE: Quota Support


  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




Execute Sql File through Java

2002-12-10 Thread Amit Lonkar
Hi all!!

I want to Execute an SQL file say c:/Exec.sql through
Java. Hence I need to execute the Mysql command
source c:/Exec.sql. I tried to run the command using
the executeQuery(String sql)function of the Statement
Interface, but it generates SQLException as Syntax
Error.
How do I do it?

Thanks
Amit Lonkar

__
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: autoextend on innoDB tables RESOLVED

2002-12-10 Thread anders . nygard

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

Ahaa, I am using 3.23.49 (came with rh7.3).
Close but no cigar :)

--
 ers


-
Anders Nygård



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

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-10 Thread Angus Fraser
Thankyou Egor

Sorting by the auto_increment_column does return rows in the order they were
added but I cant get it to do it for two tables.

UNION may work but I am running ver 3.23.53a  so UNION is not available is
there another way to do this in SQL or is it a job for the PHP code to sort
the results of two queries?

Thanks list for your patience.

Angus

- Original Message -
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 3:57 AM
Subject: re: SELECT rows from multiple tables and order all by last added


 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




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

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




mysqlbug

2002-12-10 Thread amit parikh


Hello,
i install binary version of the mysql .
i skipped first 2 stage while installing (that is creating user  group) and 
directly run binary script file.

when i run this command, i got following error.
mysql -u root mysql
ERROR 2002: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (111).
How to solve this error.

or how to unstall binary version . so that i can reinstall rpm version.


thanks

amit

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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

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



Select and Sort?

2002-12-10 Thread Tariq Murtaza
Hi All,

I am wondering how to do that.
Suppose we have data like this below

ID	Category
-
1	Software Engg	
2	Engg
62	Commerce
87	Ecommerce
45	physics
95	chemistry
6	biochemistry
7	math
5	Others

I want to achieve recordset like below (sorting category by Name and 
including 'Others' at the end),
I want to do that by single query ;), any idea???


ID	Category

6	biochemistry
62	Commerce
95	chemistry
2	Engg
87	Ecommerce
7	math
45	physics
1	Software Engg	
5	Others

Looking forward,
Tariq



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

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 and Sort?

2002-12-10 Thread Fred van Engen
On Tue, Dec 10, 2002 at 03:32:13PM +0500, Tariq Murtaza wrote:
 I want to achieve recordset like below (sorting category by Name and 
 including 'Others' at the end),
 I want to do that by single query ;), any idea???
 
 
 IDCategory
 
 6 biochemistry
 62Commerce
 95chemistry
 2 Engg
 87Ecommerce
 7 math
 45physics
 1 Software Engg   
 5 Others
 

Try something like this:

SELECT id, category from mytable order by concat(if(id=5,'B','A'),category);

Only problem is that it won't optimize, so use this on small tables only.


Regards,

Fred.

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

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

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




Re: Select and Sort?

2002-12-10 Thread Tariq Murtaza
Thanks for help.
here is another solution for that...

SELECT if (Category = 'others', '999', 0) as priority, ID, Category FROM 
TableName
ORDER BY priority, Category

Tariq

Fred van Engen wrote:
On Tue, Dec 10, 2002 at 03:32:13PM +0500, Tariq Murtaza wrote:


I want to achieve recordset like below (sorting category by Name and 
including 'Others' at the end),
I want to do that by single query ;), any idea???


ID	Category

6	biochemistry
62	Commerce
95	chemistry
2	Engg
87	Ecommerce
7	math
45	physics
1	Software Engg	
5	Others



Try something like this:

SELECT id, category from mytable order by concat(if(id=5,'B','A'),category);

Only problem is that it won't optimize, so use this on small tables only.


Regards,

Fred.






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

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 and Sort?

2002-12-10 Thread Fred van Engen
On Tue, Dec 10, 2002 at 04:12:22PM +0500, Tariq Murtaza wrote:
 Thanks for help.
 here is another solution for that...
 
 SELECT if (Category = 'others', '999', 0) as priority, ID, Category FROM 
 TableName
 ORDER BY priority, Category
 

That's right. It has the same problem regarding optimization and it
gives you another column in your result set (which you may or may not
want).

Regards,

Fred.


 Fred van Engen wrote:
 On Tue, Dec 10, 2002 at 03:32:13PM +0500, Tariq Murtaza wrote:
 
 I want to achieve recordset like below (sorting category by Name and 
 including 'Others' at the end),
 I want to do that by single query ;), any idea???
 
 
 ID  Category
 
 6   biochemistry
 62  Commerce
 95  chemistry
 2   Engg
 87  Ecommerce
 7   math
 45  physics
 1   Software Engg   
 5   Others
 
 
 
 Try something like this:
 
 SELECT id, category from mytable order by 
 concat(if(id=5,'B','A'),category);
 
 Only problem is that it won't optimize, so use this on small tables only.
 
 
 Regards,
 
 Fred.
 
 
 
 

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

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

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




RE: Can't connect error 10061 - nothing but Mascon works remotely - SOLVED (sorta)

2002-12-10 Thread Daevid Vincent
Well, I still don't know what was causing the problem exactly, but there
was something in WindowsXP Pro that was killing my connection. I
discovered this by borrowing a notebook computer and putting it on the
same network (running WinXP Home) and sure enough, EVERYTHING worked
(well, I had to use the IP address rather than the name for some reason
-- I think that has to do with the router). 

So I just started uninstalling things on my main XPP box and rebooted.
Lo and behold, it connects! Not to mention that a lot of other internet
programs that I've been wanting to use work now too. I figured they just
didn't work b/c I had a router and the internal LAN and stuff. ;-)

I still have no idea why Mascon worked the whole time however.

 -Original Message-
 From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, December 09, 2002 1:38 PM
 To: Daevid Vincent; [EMAIL PROTECTED]
 Subject: Re: Can't connect error 10061 - nothing but Mascon 
 works remotely.
 
 
 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




InnoDB crash?

2002-12-10 Thread Ervin Gerke
Got this one after a power failure.

My system is Redhat 7.3, kernel 2.4.18-18.7.x, MySQL-4.0.5a-beta-Max.
Let me know if you need any more information.

err.log reads:

021210 14:00:41  InnoDB: Started
/usr/sbin/mysqld-max: ready for connections
021210 14:00:43  InnoDB: Assertion failure in thread 7176 in file
page0page.c line 450
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this
binary
or one of the libraries it was linked against is corrupt, improperly
built,
or misconfigured. This error can also be caused by malfunctioning
hardware.
We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail.

key_buffer_size=16773120
read_buffer_size=131072

Number of processes running now: 1
mysqld-max process hanging, pid 4201 - killed
021210 14:00:43  mysqld restarted


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

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




RE: InnoDB crash?

2002-12-10 Thread Simon Green
Have you looked if there is a problem with page0page.c ?
Simon

-Original Message-
From: Ervin Gerke [mailto:[EMAIL PROTECTED]]
Sent: 10 December 2002 12:07
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: InnoDB crash?


Got this one after a power failure.

My system is Redhat 7.3, kernel 2.4.18-18.7.x, MySQL-4.0.5a-beta-Max.
Let me know if you need any more information.

err.log reads:

021210 14:00:41  InnoDB: Started
/usr/sbin/mysqld-max: ready for connections
021210 14:00:43  InnoDB: Assertion failure in thread 7176 in file
page0page.c line 450
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this
binary
or one of the libraries it was linked against is corrupt, improperly
built,
or misconfigured. This error can also be caused by malfunctioning
hardware.
We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail.

key_buffer_size=16773120
read_buffer_size=131072

Number of processes running now: 1
mysqld-max process hanging, pid 4201 - killed
021210 14:00:43  mysqld restarted


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

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




Update Query problem

2002-12-10 Thread Amit Lonkar
Hi All!!

I am writing a .sql file. I want to execute this file
at runtime. 

One of the queries is :-
update lotjobtemp set duedate =  (select duedate from
importparameters);

This query generates an error as 
ERROR 1064: You have an error in your SQL syntax near
'select duedate from impor
tparameters' at line 1.

I guess this is because subselects fail in mysql. Can
any one tell me how to overcome this problem.

Regards
Amit Lonkar
 

__
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




Where does MySQL store db files?

2002-12-10 Thread tmb
1 - On a Linux/Apache box,

when you create a MySQL db with tables, etc,

Where does MySQL store the files associated with the
db?

2 - On subsiquent db's, does MySQL store those files
in the same directory or each db in a seperate folder?

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




How to see # of rec's in all tables

2002-12-10 Thread tmb
2 questions...

My tutorial db has a number of tables in it... some
with data... some with no records.

1 - How can I ask MySQL to tell me the number of
records in my tables?
..a) all at once? Meaning one command to list...
  tbl_1 6 records
  tbl_2 3 records
  tbl_3 0 records
  etc
..b) one table at a time? Meaning one command per tbl

2 - How can I dump the contens of _all_ tables to the
screen or to a text file?

thanks for all the help - 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: How to get MySQL to list current db's ?

2002-12-10 Thread Brian P. Austin
show databases.

-Original Message-
From: Will Standley [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:36 AM
To: MySQL List
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: A log for mysqlimport.

2002-12-10 Thread Victoria Reznichenko
On Monday 09 December 2002 16:26, Kekette wrote:

 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.

Currently MySQL doesn't store warnings. In 4.1 you can see warnings from the 
last command using SHOW WARNINGS.


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

2002-12-10 Thread Egor Egorov
On Tuesday 10 December 2002 07:48, Amittai Aviram wrote:

 Sorry!  I meant UPDATE, not INSERT!

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

You can use multi-tables updates from 4.0.2 
In earlier versions use programming languages.



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

2002-12-10 Thread Victoria Reznichenko
On Tuesday 10 December 2002 12:02, amit parikh wrote:

 i install binary version of the mysql .
 i skipped first 2 stage while installing (that is creating user  group)
 and directly run binary script file.

 when i run this command, i got following error.

 mysql -u root mysql
 ERROR 2002: Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (111).

 How to solve this error.

Is MySQL server running?

Check it with
ps ax | grep mysqld


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

2002-12-10 Thread Egor Egorov
On Tuesday 10 December 2002 11:32, Angus Fraser wrote:

 Thankyou Egor

 Sorting by the auto_increment_column does return rows in the order they
 were added but I cant get it to do it for two tables.

DATETIME or TIMESTAMP column contains the time row was inserted.

 UNION may work but I am running ver 3.23.53a  so UNION is not available is
 there another way to do this in SQL or is it a job for the PHP code to sort
 the results of two queries?

Use temporary tables.



-- 
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: Re: How to backup without blocking?

2002-12-10 Thread Egor Egorov
On Tuesday 10 December 2002 07:44, Jason Brooke wrote:

 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.

Thanks for bug report, but this bug is already known.



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

2002-12-10 Thread Robert Citek

At 05:10 PM 12/9/2002 -0500, Beauford.2003 wrote:
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.

Below is an example of using PHP and MySQL with a REGEXP condition.  It's a
variation on an example from Chapter 4 of Web Database Applications with
PHP  MySQL by Hugh E. Williams and David Lane, O'Reilly, 1st Ed., 2002.

Regards,
- Robert

-

html
  head
titlePHP and MySQL with Regexp/title
  /head

  body
pre
?php
  $connection = mysql_connect(host,username,password);
  mysql_select_db(database_name, $connection);
  $var=[[::]]One[[::]];
  $sql=select 'Any One' regexp \ . $var . \;
  echo $sql . \n;
  $result = mysql_query($sql, $connection);
  while( $row = mysql_fetch_row($result)) {
echo |;
for ($i=0; $imysql_num_fields($result); $i++)
  echo   . $row[$i] .  | ;
echo \n;
  }
  mysql_close($connection);
?
/pre
  /body
html



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

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




Re: Where does MySQL store db files?

2002-12-10 Thread Robert Citek

At 05:35 AM 12/10/2002 -0800, tmb wrote:
1 - On a Linux/Apache box,
when you create a MySQL db with tables, etc,
Where does MySQL store the files associated with the
db?

If the database is named foobar, then usually in /var/lib/mysql/foobar

2 - On subsiquent db's, does MySQL store those files
in the same directory or each db in a seperate folder?

New folder, for example /var/lib/mysql/new_db

Regards,
- Robert


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

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: ADO Bulk Inserts

2002-12-10 Thread Fernando Grijalba
Are the inserts to the same table or different tables and columns?

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 9, 2002 14:56
To: MySQL List
Subject: ADO Bulk Inserts


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



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

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




backing up

2002-12-10 Thread Ray
is there a way to remotely grab the databases (ie mysqldump) and have it 
place everything in a different file for every database? or has anyone 
written a script to do something like this?

dbserver having databases mysql, db1, db2
and creating backup files
mysql.sql
db1.sql
db2.sql

and at different times, databases can be added and removed from the servers, 
and it would be nice to have those backed up as well. (ie later in the week 
db3 is added and the nightly backup starts making a db3.sql file without 
having to edit the backup script)

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




Import Errors

2002-12-10 Thread Leonard Miller
I am having a terrible time getting a text file imported.
I've been working on this for about a week and finally have
given up.

Hi,
I am trying to get a file called mactable.txt imported into a table,
OUI, 
which resides in a database called MACTABLE.

Here are the commands that I am using with the results of the
commands.
And the first and last few lines of the mactable.txt file.  I have
removed all 
unnecessary characters.  The only thing in this file is numbers and
letters. 0-9 and A-Z.
Nothing else.  But I still get 6942 warnings, which is twice as many
records in the file.
The manufacture info does not import into the file, only the OUI data.

RedHat 8
Dell Poweredge 350
Pentium III 850 
512 RAM

Thanks in advance.
Leonard


mysql use mactable
Database changed

mysql CREATE TABLE oui (oui CHAR(9), manufacturer VARCHAR(30));
Query OK, 0 rows affected (0.00 sec)

mysql LOAD DATA LOCAL INFILE mactable.txt INTO TABLE oui;
Query OK, 3471 rows affected (0.02 sec)
Records: 3471  Deleted: 0  Skipped: 0  Warnings: 6942

--
08 00 2B DIGITAL EQUIPMENT CORPORATION
08 00 2C BRITTON LEE INC
08 00 2D LAN TEC INC
00 00 00 XEROX CORPORATION
00 00 01 XEROX CORPORATION
00 00 02 XEROX CORPORATION
00 00 03 XEROX CORPORATION
00 00 04 XEROX CORPORATION
00 00 05 XEROX CORPORATION
00 00 06 XEROX CORPORATION
00 00 07 XEROX CORPORATION
00 00 08 XEROX CORPORATION
00 00 09 XEROX CORPORATION
00 00 0A OMRON TATEISI ELECTRONICS CO
00 00 0B MATRIX CORPORATION
.
.
.
08 00 8D XYVISION INC
08 00 8E TANDEM COMPUTERS
08 00 8F CHIPCOM CORPORATION
08 00 90 SONOMA SYSTEMS
08 BB CC AK NORD EDV VERTRIEBSGES MBH
10 00 5A IBM CORPORATION
10 00 E8 NATIONAL SEMICONDUCTOR
80 00 10 ATT BELL LABORATORIES
AA 00 00 DIGITAL EQUIPMENT CORPORATION
AA 00 01 DIGITAL EQUIPMENT CORPORATION
AA 00 02 DIGITAL EQUIPMENT CORPORATION
AA 00 03 DIGITAL EQUIPMENT CORPORATION
AA 00 04 DIGITAL EQUIPMENT CORPORATION

---

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

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




warning database is running out of disk space

2002-12-10 Thread Daniel Ziener
Hi ng!

1. Can i create a database or table and restrict the size of the 
database (table)?

2. Can mysql generate a warning when the size of the database almost 
reaches the maximum size i previously defined?

3. Can mysql generate a warning when the partion on which the database 
is stored runs out of space?

Thanks

Daniel Ziener


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

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-10 Thread Michael T. Babcock
On Sun, Dec 08, 2002 at 12:06:53PM -0800, Richard Reina wrote:


How do I switch from MYISAM to InnoDB?  Are there any negative 
implication in swithing?
 


ALTER table TYPE=InnoDB;

It will take twice as much disk space or thereabouts and not support
full text queries.


SQL

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



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

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




Re: Multiple MySQL db's on one machine

2002-12-10 Thread Michael T. Babcock
Paul DuBois wrote:


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.



I made this very statement (on this list), FYI, and it was directly 
regarding InnoDB tables as part of a thread about difficulties of using 
InnoDB and disk quotas together.  I don't know if I'm the person, but 
if I am ... :)

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd. (SQL)
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



mysqlhotcopy??

2002-12-10 Thread ed

I am trying to find the best way to backup my 4.7GB database and have unfortunately 
found out the hard way that mysqldump is grossly inefficient. Since 4 web sites rely 
on 
the data, shutting it down to copy it is not a good option either. Has anyone used 
mysqlhotcopy? The perl doc says it is still in beta, which makes me a little nervous. 

Thanks in advance!
-- 
Ed Pauley II
Bloodstock Research Information Services
Phone:  (859) 223- ext. 297
E-mail: [EMAIL PROTECTED]
Web:http://www.brisnet.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




Replication: What if I need to restore a server from backup ?

2002-12-10 Thread Andreas

Hi,

I'm planning to use two-way replication for two MySQL-hosts that can't 
see each other most of the time. There will be a synchronisation 
everyday via ISDN.
Box A is master  slave of box B and v.v.

As long as nothing goes wrong that's fine.

I'll have daily mysqldumps of the db content, so there is a backup of 
the data.

What if I need to restore a server from backup ?
Lets say box A crashes or - what's more realistic - I screw all up
badly. Then I'll play back the latest dump and box A is up and running
again but the replication log is out of sync to to slave, I suppose.

How can I sync them without losing the updates that happened on box B ?


OK, I know that's probaply a hard one but perhaps someone ran into this
before.


... Andreas



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

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



mysqlhotcopy

2002-12-10 Thread ed

I am trying to find the best way to backup my 4.7GB database and have unfortunately 
found out the hard way that mysqldump is grossly inefficient. Since 4 web sites rely 
on 
the data, shutting it down to copy it is not a good option either. Has anyone used 
mysqlhotcopy? The perl doc says it is still in beta, which makes me a little nervous. 

Thanks in advance!

-- 
Ed Pauley II
Bloodstock Research Information Services
Phone:  (859) 223- ext. 297
E-mail: [EMAIL PROTECTED]
Web:http://www.brisnet.com



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

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




load data LOCAL infile to upload to a remote database

2002-12-10 Thread Rich Lott
Hi.

I have a MySQL database running on a remote web server.
I have a text data file sitting on my PC here.

I want to get the data from the text file to the database and am having 
difficulties! I log onto the database and I'd like to issue

LOAD DATA LOCAL INFILE c:/thedata.txt INTO TABLE thetable

..and be done with it, but I get an error 13: can't find file (or can't get 
stat of file) message.

can anyone help? The manual pages on mysql.com didn't help me.

cheers.

rich



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

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: mysqlhotcopy??

2002-12-10 Thread Peter T. Abplanalp
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

* On Tue, Dec 10, 2002 at 11:04:01AM -0500, [EMAIL PROTECTED] wrote:
 
 I am trying to find the best way to backup my 4.7GB
 database and have unfortunately found out the hard way
 that mysqldump is grossly inefficient. Since 4 web sites
 rely on the data, shutting it down to copy it is not a
 good option either. Has anyone used mysqlhotcopy? The perl
 doc says it is still in beta, which makes me a little
 nervous. 

have you thought about lvm?

http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html

- -- 
Peter Abplanalp
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE99hcZggA8sH0iRXQRAjFiAJ4tCyxvTYppnhf6Eyw0TwyyGwYtrwCbBNG9
R6A3wtPfCBOF/nf1Z2NzETo=
=tefX
-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: backing up

2002-12-10 Thread Tommy F. Eriksen
Hi,

 is there a way to remotely grab the databases (ie mysqldump) 
 and have it 
 place everything in a different file for every database? or 
 has anyone 
 written a script to do something like this?

There's propably a more refined way to do this, but this simple hack
should do the trick.
(Substitute HOST, USER and PASS with values matching your site):
--start backup.sh--
#!/bin/sh
for i in `echo show databases|mysql -s -hHOST -uUSER -pPASS`
do
mysqldump -hHOST -uUSER -pPASS --opt $i  $i.sql
done
--end backup.sh--
-- 
Med venlig hilsen / Kind regards,
Tommy Eriksen 
Systemadministrator, ModuleWEB.NET
http://www.modulweb.dk/ - [EMAIL PROTECTED]
+45 70 22 33 04 - +45 70 22 33 08 (direct)

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

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: Update Query problem

2002-12-10 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Amit,

 update lotjobtemp set duedate =  (select duedate from
 importparameters);

In MySQL, you need 2 queries for this:

SELECT @var:=duedate FROM importparameters;
UPDATE lotjobtemp SET duedate = @var;

Most probably, you will want to use a WHERE clause for both statments.

To make this transaction safe, you can use InnoDB tables. Issue BEGIN
before the SELECT statement and COMMIT after the UPDATE statement.

HTH!
--
  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: Amit Lonkar [EMAIL PROTECTED]
To: mysql [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 1:34 PM
Subject: Update Query problem


 Hi All!!

 I am writing a .sql file. I want to execute this file
 at runtime.

 One of the queries is :-
 update lotjobtemp set duedate =  (select duedate from
 importparameters);

 This query generates an error as
 ERROR 1064: You have an error in your SQL syntax near
 'select duedate from impor
 tparameters' at line 1.

 I guess this is because subselects fail in mysql. Can
 any one tell me how to overcome this problem.

 Regards
 Amit Lonkar


 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com

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

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



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

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




Re: InnoDB crash?

2002-12-10 Thread Heikki Tuuri
Ervin,

the assertion in page0page.c line 450 means InnoDB could not move index
records from a page to another page though it always checks that there
should be enough space. I have not seen this assertion fail before.

Did mysqld print a srack trace to the .err log? Can you send me the whole
error log?

Please run CHECK TABLE on your tables and report what it says. If there is
corruption, CHECK TABLE also prints diagnostics to the .err log.

InnoDB should recover from a power failure without problems. The bug might
also be that fsync() in your computer does not do what it should, and the
data pages were not in reality flushed to disk. Do you use RAID, NFS, or
anything exotic?

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB

sql query


- Original Message -
From: Ervin Gerke
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 2:00 PM
Subject: InnoDB crash?


Got this one after a power failure.
My system is Redhat 7.3, kernel 2.4.18-18.7.x, MySQL-4.0.5a-beta-Max. Let me
know if you need any more information.


err.log reads:


021210 14:00:41  InnoDB: Started
/usr/sbin/mysqld-max: ready for connections
021210 14:00:43  InnoDB: Assertion failure in thread 7176 in file
page0page.c line 450
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail.

key_buffer_size=16773120
read_buffer_size=131072

Number of processes running now: 1
mysqld-max process hanging, pid 4201 - killed
021210 14:00:43  mysqld restarted





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

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




BDB and mysql problem

2002-12-10 Thread Dennis Allison

Using the sql:

alter table foo add index dex( keycol1, keycol2, keycol3 );

causes a Error 1030 with the annotation table handler error 12.  The particular table
involved has about 15 entries, contains 10 or so varchar() fields with a record
size of O(500) bytes.  The table is declared to be a BDB table.

If I dump the table with mysqldump, modify the declaration to include the index,
and then attept to reload, all goes well for a while, then everything dies with 
multiple Error 2002 reports.

If I use the normal default table type (ISAM), I can load the respcified version
of the table with the indexes without problem.

I found no documentation on the reported errors and their potential cause.  I did find
find one posting the cited these errors and suggested setting SQL_BIG_TABLES, but it
had no apparent impact.



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

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: ADO Bulk Inserts

2002-12-10 Thread Michael She
Same table, but it shouldn't matter right?

I'm getting a SQL syntax error once I start combining my statements 
together.  If I submit the statements separately they're OK.



At 09:59 AM 12/10/2002 -0500, Fernando Grijalba wrote:
Are the inserts to the same table or different tables and columns?

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 9, 2002 14:56
To: MySQL List
Subject: ADO Bulk Inserts


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



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

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

--
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-10 Thread Heikki Tuuri
Carl,

- Original Message -
From: Carl McNamee [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, December 10, 2002 6:36 AM
Subject: RE: Question about SLAVE STOP


 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.

I think replication rolls back the current transaction at SLAVE STOP, and
resumes at SLAVE START from the MIDDLE of the transaction. Thus, this is a
bug in replication. It should not execute a half transaction.

The MySQL AB replication developer promised to fix this bug along with
another: it may be that issuing SLAVE STOP after SET INSERT_ID=..., but
before the corresponding INSERT also breaks replication, even if you are not
using transactions.

The fix he must implement: do not allow the slave to stop if there is a
BEGIN open, or a pending SET INSERT_ID=..., or a similar statement.

The bug still remains in the case where the slave crashes. InnoDB should
communicate after recovery to the slave thread up to which master binlog
position it was able to recover. The slave thread should restart replication
for InnoDB tables from that position, which often is not the same as the
position the slave thread now reads from the master.info file. The DBA can
set the correct position manually, because InnoDB prints that master binlog
position after it recovers. But there no automatic way yet to pass it to the
slave thread. The replication developer of MySQL AB has to study what is
involved in this. Maybe the slave has to delete the relay log file and do a
fresh start.

 Thanks!

 Carl

Thank you for noticing this bug!

Heikki
Innobase Oy

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, sort, and spam filters!

2002-12-10 Thread Michael T. Babcock
Harald Fuchs wrote:


ORDER BY name = Others, name;



As a more generic alternative, consider adding a smallint 'extrasort' 
column (default 0), then you simply assign extrasort -1 (or more) to 
force things near the top and 1 (or more) to artificially put things at 
the bottom (depending on sort order).

ALTER TABLE mytable ADD extrasort tinyint not null default 0;
UPDATE mytable SET extrasort = 1 WHERE name = Others;
SELECT id, name FROM mytable ORDER BY extrasort, name;

This is very generic and can be used on any table where you want to 
force certain objects to the top of a sort list easily (and, more 
importantly, is changable without changing your queries).

rantAs for spam filters, evidently the above does not contain SQL or QUERY.
It does, however, contain ALTER TABLE, QUERIES and SMALLINT, none
of which would occur outside a SQL related list with any frequency.  Please
update the stupid spam filter to include these terms, at a minimum, even
if they aren't advertised in the your message must contain ...  clause./rant

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



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

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



Re: Multiple MySQL db's on one machine

2002-12-10 Thread Jan Steinman
From: Paul DuBois [EMAIL PROTECTED]

At 16:04 -0800 12/9/02, tmb wrote:

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:

Another small complication: the individual DB directories all need to be in the same 
parent directory. However, they can be symlinks to other, unrelated locations.

- SQL SQL SQL SOL -
-- 
: Jan Steinman -- nature Transography(TM): http://www.Bytesmiths.com
: Bytesmiths -- artists' services: http://www.Bytesmiths.com/Services
: Buy My Step Van! http://www.Bytesmiths.com/van

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

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: ADO Bulk Inserts

2002-12-10 Thread Fernando Grijalba
Have you try this:

dbConn.Execute(INSERT INTO tblname(fld1, fld2) VALUES(val1,
val2),(val1,val2),(val1,vla2);)

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 10, 2002 12:08
To: Fernando Grijalba
Cc: MySQL Help
Subject: RE: ADO Bulk Inserts


Same table, but it shouldn't matter right?

I'm getting a SQL syntax error once I start combining my statements
together.  If I submit the statements separately they're OK.



At 09:59 AM 12/10/2002 -0500, Fernando Grijalba wrote:
Are the inserts to the same table or different tables and columns?

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 9, 2002 14:56
To: MySQL List
Subject: ADO Bulk Inserts


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



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

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

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



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

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




safe_mysqld will not start correctly

2002-12-10 Thread Matt Allen

Could someone please tell me how to fix this problem:

021210 12:50:49  mysqld started
021210 12:50:52  InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 2785410520
InnoDB: Doing recovery: scanned up to log sequence number 0 2785410520
InnoDB: Assertion failure in thread 1 in file ../include/buf0buf.ic line 265
021210 12:50:49  mysqld started
021210 12:50:52  InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 2785410520
InnoDB: Doing recovery: scanned up to log sequence number 0 2785410520
InnoDB: Assertion failure in thread 1 in file ../include/buf0buf.ic line 265
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
mysqld got signal 11;

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

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

021210 12:50:52  mysqld ended




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


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

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



Unexpected ending

2002-12-10 Thread Lefevre, Steven
Hey folks -

Linux newbie here.

I have RH 8.0 installed on a machine. I did an RPM installation of MySQL
3.23 (or whatever the current 3 series is).

When I try to start the safe daemon, I get this:

[root@server ]# /usr/bin/safe_mysqld
Starting mysqld daemon with databases from /var/lib/mysql
021210 13:26:51  mysqld ended

[root@server ]#

What's the deal?


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

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: Unexpected ending

2002-12-10 Thread Lefevre, Steven
Before I get 1000 RTFMs,


I found on google references to an error file. I did a search (after
rebuilding the 'locate' database) and found no error file! :(

Also, no results returned on the mysql mailing list archive.

- Original Message -
From: Lefevre, Steven [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 1:28 PM
Subject: Unexpected ending


 Hey folks -

 Linux newbie here.

 I have RH 8.0 installed on a machine. I did an RPM installation of MySQL
 3.23 (or whatever the current 3 series is).

 When I try to start the safe daemon, I get this:

 [root@server ]# /usr/bin/safe_mysqld
 Starting mysqld daemon with databases from /var/lib/mysql
 021210 13:26:51  mysqld ended

 [root@server ]#

 What's the deal?


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

 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




Com_select not increment when used QUERY_CACHE and if query exists in cache.

2002-12-10 Thread sitnikov
Description:
Com_select not increment when used QUERY_CACHE and if query exists in cache
How-To-Repeat:
1. enable QUERY_CACHE
2. Run 2 equal SELECT statment

Originator:Andrew Sitnikov
Organization:
 Infonet Ltd. 
Severity:  non-critical
Category:  mysql
Class: sw-bug
Release:   mysql-4.0.5a-beta-standard (Official MySQL-standard binary)
Server: /usr/local/mysql/bin/mysqladmin  Ver 8.38 Distrib 4.0.5a-beta, for pc-linux 
on i686
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  4.0.5a-beta-standard-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 1 day 8 min 0 sec

Threads: 1  Questions: 1230149  Slow queries: 5  Opens: 2553  Flush tables: 1  Open 
tables: 512  Queries per second avg: 14.159
Environment:

System: Linux gap 2.4.20-grsec #1 SMP Fri Dec 6 23:17:05 EET 2002 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
Compilation info: CC='gcc'  CFLAGS='-O2 -mcpu=pentiumpro'  CXX='gcc'  CXXFLAGS='-O2 
-mcpu=pentiumpro -felide-constructors'  LDFLAGS=''  ASFLAGS=''
LIBC: 
-rwxr-xr-x1 root root  1384072 Oct  1 19:10 /lib/libc.so.6
-rw-r--r--1 root root 25215016 Oct  1 18:56 /usr/lib/libc.a
-rw-r--r--1 root root  178 Oct  1 18:56 /usr/lib/libc.so
Configure command: ./configure '--prefix=/usr/local/mysql' '--with-comment=Official 
MySQL-standard binary' '--with-extra-charsets=complex' 
'--with-server-suffix=-standard' '--enable-thread-safe-client' '--enable-local-infile' 
'--enable-assembler' '--disable-shared' '--with-client-ldflags=-all-static' 
'--with-mysqld-ldflags=-all-static' '--with-innodb' 'CFLAGS=-O2 -mcpu=pentiumpro' 
'CXXFLAGS=-O2 -mcpu=pentiumpro -felide-constructors' 'CXX=gcc'


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

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: Unexpected ending

2002-12-10 Thread Brian Reichert
On Tue, Dec 10, 2002 at 01:28:13PM -0500, Lefevre, Steven wrote:
 Hey folks -
 
 Linux newbie here.
 
 I have RH 8.0 installed on a machine. I did an RPM installation of MySQL
 3.23 (or whatever the current 3 series is).
 
 When I try to start the safe daemon, I get this:
 
 [root@server ]# /usr/bin/safe_mysqld
 Starting mysqld daemon with databases from /var/lib/mysql
 021210 13:26:51  mysqld ended

'safe_mysqld' blows, it hides information.  Try running mysqld more
directly.

Step 1: edit safe_mysqld to make it tell you what it's trying to
do.  Edit the very first line to look like this:

  #!/bin/sh -x

Step 2: re-run safe_mysqld, it will now dump out each command as
it runs it.  The last thing you see will be the full invokation of
mysqld, with all the arguments and all of that.

Step 3: run that actual invocation of mysqld, with all of it's
arguments, without redirecting the output anywhere.  This is, to
say, avoid this at the end:

   $err_log 21

Now, when mysqld pukes at you, you'll actually see error messages.

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA Intel architecture: the left-hand path

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

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

2002-12-10 Thread Grant Cooper
Why is mysqldump grossly inefficient. I thought this was the standard to
backing up a mysql database. I use dump / restore to back up my hard drive.
Would this be a better option to do a separate dump on the mysql database?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:14 AM
To: [EMAIL PROTECTED]
Subject: mysqlhotcopy



I am trying to find the best way to backup my 4.7GB database and have
unfortunately
found out the hard way that mysqldump is grossly inefficient. Since 4 web
sites rely on
the data, shutting it down to copy it is not a good option either. Has
anyone used
mysqlhotcopy? The perl doc says it is still in beta, which makes me a little
nervous.

Thanks in advance!

--
Ed Pauley II
Bloodstock Research Information Services
Phone:  (859) 223- ext. 297
E-mail: [EMAIL PROTECTED]
Web:http://www.brisnet.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: ADO Bulk Inserts

2002-12-10 Thread Michael She
Hi,


That is how I currently submit my statements, but can't I go:

Hi, that is how I execute my current statements.

But can't I submit multiple statements like:

INSERT INTO tblname(fld1) VALUES(val1);INSERT INTO tblname(fld1) 
VALUES(val1);?

If I submit multiple statements I get a SQL error.



At 12:55 PM 12/10/2002 -0500, Fernando Grijalba wrote:
Have you try this:

dbConn.Execute(INSERT INTO tblname(fld1, fld2) VALUES(val1,
val2),(val1,val2),(val1,vla2);)

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 10, 2002 12:08
To: Fernando Grijalba
Cc: MySQL Help
Subject: RE: ADO Bulk Inserts


Same table, but it shouldn't matter right?

I'm getting a SQL syntax error once I start combining my statements
together.  If I submit the statements separately they're OK.



At 09:59 AM 12/10/2002 -0500, Fernando Grijalba wrote:
Are the inserts to the same table or different tables and columns?

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 9, 2002 14:56
To: MySQL List
Subject: ADO Bulk Inserts


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



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

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

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



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

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

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




Bug in GROUP BY/CASE/MAX?

2002-12-10 Thread 'Bob Diss'
Bug in GROUP BY/CASE/MAX?

I'm seeing a strange result when I group rows and using CASE and
MAX() to select the column I'm interested in (typical pivot-table
operation).  Here's my sample case:

mysql -- create table
mysql create table t (row int not null,
   col int not null,
   val varchar(255) not null);

mysql -- populate with test records
mysql insert into t values (1,1,'orange');
mysql insert into t values (1,2,'large');
mysql insert into t values (2,1,'yellow');
mysql insert into t values (2,2,'medium');
mysql insert into t values (3,1,'green');
mysql insert into t values (3,2,'small');

mysql -- group by row, extract values where col=1
mysql select max(case when col = 1 then val else null end) as color
   from t group by row;

MySQL shows the result set as:

++
| color  |
++
| orange |
| NULL   |
| NULL   |
++
3 rows in set (0.00 sec)

I would have expected MySQL to group the records into
three sets according to row:
  (1,1,'orange')
  (1,2,'large')

  (2,1,'yellow')
  (2,2,'medium')

  (3,1,'green')
  (3,2,'small')

then, for each set, apply the case expression:
  (1,1,'orange')  becomes   'orange'
  (1,2,'large')   becomes   NULL

  (2,1,'yellow')  becomes   'yellow'
  (2,2,'medium')  becomes   NULL

  (3,1,'green')   becomes   'green'
  (3,2,'small')   becomes   NULL

then, apply the max() aggregate:
  max('orange',NULL)   becomes  'orange'
  max('yellow',NULL)   becomes  'yellow'
  max('green',NULL)becomes  'green'

So, I'm expecting to see a result set of three colors. This query
works as I expect in MS-SQLServer 7.0.  Why doesn't it work the same
way in MySQL?

I'm running the RPMS from MySQL.com for MySQL-max 3.23.52
on RedHat 7.3.

tia,

Bob Diss, [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




Legal query?

2002-12-10 Thread James E Hicks III
Is this query legal?

select distinct purchase_orders.header.vendor_number as number,
vendor_master.address.sequence_name as name from purchase_orders.header,
vendor_master.address where purchase_orders.header.branch = 10


With these DB's

# Database : `purchase_orders`
# 
CREATE TABLE header (
  branch mediumint(5) unsigned NOT NULL default '0',
  vendor_number mediumint(7) unsigned NOT NULL default '0'
) TYPE=MyISAM;
# 

# Database : `vendor_master`
# 
CREATE TABLE address (
  vendor_number mediumint(6) unsigned NOT NULL default '0',
  sequence_name varchar(30) NOT NULL default ''
) TYPE=MyISAM;
# 



query query query query query query query sql sql sql sql sql sql sql sql 

James


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

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




Re: InnoDB crash?

2002-12-10 Thread Heikki Tuuri
Ervin,

- Original Message -
From: Ervin Gerke [EMAIL PROTECTED]
To: 'Heikki Tuuri' [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 8:53 PM
Subject: RE: InnoDB crash?


 Heikki,

 That's all mysqld reported in err log. In fact I wasn't able to do a
 check table since mysqld died (SIGSEGV) on me right after logging that
 message in .err log. In fact I don't run anything funny on the hardware
 side. No RAIDs or anything.


I am copying this to [EMAIL PROTECTED], so that other users can follow
the discussion.

Looks like InnoDB asserts when it does the background purge immediately
after a startup.

You should set

set-variable=innodb_force_recovery=2

in my.cnf. If that does not help, try a value 4.

Then run CHECK TABLE on your tables. You may have serious corruption. You
may have to dump all tables and recreate the whole InnoDB tablespace. In
mild cases it is enough to dump + DROP + CREATE + reimport one or a few
tables.

The log sequence number you have is 288 GB. You have done of processing with
the database.

Regards,

Heikki
Innobase Oy


sql query

 Well here goes when I try to start mysqld without innodb_force_recovery
 and that message appears repeatedly (I'm using the rc.d script):

 --
 /usr/bin/mysqld_safe: line 311:  7413 Segmentation fault
 $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION
 --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking
 $err_log 21
 --

 The whole .err log reads (repeatedly again):

 --
 Number of processes running now: 1
 mysqld-max process hanging, pid 7451 - killed
 021210 13:35:35  mysqld restarted
 021210 13:35:35  InnoDB: Database was not shut down normally.
 InnoDB: Starting recovery from log files...
 InnoDB: Starting log scan based on checkpoint at
 InnoDB: log sequence number 72 4284476337
 InnoDB: Doing recovery: scanned up to log sequence number 72 4284476337
 021210 13:35:36  InnoDB: Flushing modified pages from the buffer pool...
 021210 13:35:36  InnoDB: Started
 /usr/sbin/mysqld-max: ready for connections
 021210 13:35:37  InnoDB: Assertion failure in thread 7176 in file
 page0page.c line 450
 InnoDB: We intentionally generate a memory trap.
 InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
 mysqld got signal 11;
 This could be because you hit a bug. It is also possible that this
 binary
 or one of the libraries it was linked against is corrupt, improperly
 built,
 or misconfigured. This error can also be caused by malfunctioning
 hardware.
 We will try our best to scrape up some info that will hopefully help
 diagnose
 the problem, but since we have already crashed, something is definitely
 wrong
 and this may fail.

 key_buffer_size=268431360
 read_buffer_size=1044480

 Number of processes running now: 1
 mysqld-max process hanging, pid 7481 - killed
 021210 13:35:37  mysqld restarted
 021210 13:35:37  InnoDB: Database was not shut down normally.
 InnoDB: Starting recovery from log files...
 InnoDB: Starting log scan based on checkpoint at
 InnoDB: log sequence number 72 4284476337
 InnoDB: Doing recovery: scanned up to log sequence number 72 4284476337
 021210 13:35:38  InnoDB: Flushing modified pages from the buffer pool...
 021210 13:35:38  InnoDB: Started
 /usr/sbin/mysqld-max: ready for connections
 021210 13:35:39  InnoDB: Assertion failure in thread 7176 in file
 page0page.c line 450
 InnoDB: We intentionally generate a memory trap.
 InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
 mysqld got signal 11;
 This could be because you hit a bug. It is also possible that this
 binary
 or one of the libraries it was linked against is corrupt, improperly
 built,
 or misconfigured. This error can also be caused by malfunctioning
 hardware.
 We will try our best to scrape up some info that will hopefully help
 diagnose
 the problem, but since we have already crashed, something is definitely
 wrong
 and this may fail.

 key_buffer_size=268431360
 read_buffer_size=1044480
 ..
 --

 Should I let InnoDB to be fully recovered and then run checks on my
 tables?






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

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: Unexpected ending

2002-12-10 Thread Michael T. Babcock
Brian Reichert wrote:


Step 3: run that actual invocation of mysqld, with all of it's
arguments, without redirecting the output anywhere.  This is, to
say, avoid this at the end:

  $err_log 21
 


As an aside to that, I invoke mysqld directly as well, but from 
supervise's run script.  See http://cr.yp.to/daemontools.html for 
information on how to install  setup daemontools and supervise.  It 
ends up auto-restarting mysqld if it dies for some reason and logs all 
the output to a size-rotated logfile (instead of daily).  It also makes 
cleaning the environment properly first.much simpler (and safer).

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



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

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



Re: Legal query?

2002-12-10 Thread gerald_clark
This is a Cartesian product, not a join.
You may have intended to join on vendor_number,
but they are not the same number of digits.

James E Hicks III wrote:


Is this query legal?

select distinct purchase_orders.header.vendor_number as number,
vendor_master.address.sequence_name as name from purchase_orders.header,
vendor_master.address where purchase_orders.header.branch = 10


With these DB's

# Database : `purchase_orders`
# 
CREATE TABLE header (
 branch mediumint(5) unsigned NOT NULL default '0',
 vendor_number mediumint(7) unsigned NOT NULL default '0'
) TYPE=MyISAM;
# 

# Database : `vendor_master`
# 
CREATE TABLE address (
 vendor_number mediumint(6) unsigned NOT NULL default '0',
 sequence_name varchar(30) NOT NULL default ''
) TYPE=MyISAM;
# 



query query query query query query query sql sql sql sql sql sql sql sql 

James

 




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

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




Building Web Pages

2002-12-10 Thread Grant Cooper
Does anyone know of a package that computer novices can use to build simple
web pages. Even if they know nothing of HTML?

I'm using mysql and I figure there might be something out there all ready
built. This is for a small college that teachers can use to put on there
stuff.


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

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: ADO Bulk Inserts

2002-12-10 Thread Fernando Grijalba
Why do you have to do it that way?

Could you do it in a loop?

Do Until rst.EOF
dbConn.Execute(INSERT STATMENT);
Loop

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 10, 2002 13:55
To: Fernando Grijalba
Cc: MySQL Help
Subject: RE: ADO Bulk Inserts


Hi,


That is how I currently submit my statements, but can't I go:

Hi, that is how I execute my current statements.

But can't I submit multiple statements like:

INSERT INTO tblname(fld1) VALUES(val1);INSERT INTO tblname(fld1)
VALUES(val1);?

If I submit multiple statements I get a SQL error.



At 12:55 PM 12/10/2002 -0500, Fernando Grijalba wrote:
Have you try this:

dbConn.Execute(INSERT INTO tblname(fld1, fld2) VALUES(val1,
val2),(val1,val2),(val1,vla2);)

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 10, 2002 12:08
To: Fernando Grijalba
Cc: MySQL Help
Subject: RE: ADO Bulk Inserts


Same table, but it shouldn't matter right?

I'm getting a SQL syntax error once I start combining my statements
together.  If I submit the statements separately they're OK.



At 09:59 AM 12/10/2002 -0500, Fernando Grijalba wrote:
 Are the inserts to the same table or different tables and columns?
 
 JFernando
 ** sql **
 
 -Original Message-
 From: Michael She [mailto:[EMAIL PROTECTED]]
 Sent: December 9, 2002 14:56
 To: MySQL List
 Subject: ADO Bulk Inserts
 
 
 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
 
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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



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

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

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



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

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




Problem getting mysqld to run

2002-12-10 Thread Francis Hwang
I'm trying to setup mysqld on our new server, and I'm having trouble getting
mysqld to run. I use:

 safe_mysqld 

and these lines are entered into /var/log/mysqld.log:

021210 14:47:11  mysqld started
021210 14:47:11  Can't start server : Bind on unix socket: Permission denied
021210 14:47:11  Do you already have another mysqld server running on
socket: /var/lib/mysql/mysql.sock ?
021210 14:47:11  Aborting

021210 14:47:12  /usr/libexec/mysqld: Shutdown Complete

021210 14:47:12  mysqld ended

... as it suggests in the manual, I tried telnetting to the host, and I used
ps to check, and there doesn't appear to be another mysqld running. Any
ideas?

Thanks,

+ + +

Francis Hwang
Director of Technology
Rhizome
212-989-2363



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

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 DELPHI(Kylix) charset translation

2002-12-10 Thread Ing . Milo Vymazal
Hi,

I have problem with charset (MySQL + Delphi).
--
SET CHARACTER SET cp1250_latin2;
SELECT * FROM en1 WHERE en1 LIKE 'worm';
--
This query works right in PHP and command line (Linux, Windows),
but in Delphi7 (Kylix3) line SET CHARACTER SET cp1250_latin2; does'nt
work.
It's No error notify, but it returned text in ISO-8859-2.


Here is my code in Delphi (dbExpress) ...
--
//1 possibilty
SQLConnection1.Execute('SET CHARACTER SET latin2_cp1250',nil,nil);
//2 possibility
//SQLDataSet1.CommandText := 'SET CHARACTER SET latin2_cp1250';
//SQLDataSet1.ExecSQL(TRUE);
sql := 'select * from  where en1 +' like ''' + Edit1.Text + ''' order by ' +
RadioGroup1.Items[RadioGroup1.ItemIndex];
SQLDataSet1.CommandText := sql;
SQLDataSet1.Open;
---

Pleasse, how can I change charset for MySQL data in Delphi?

Thanks

Milos Vymazal
http://garten.cz


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

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




Re: Building Web Pages

2002-12-10 Thread Dennis Allison
 Does anyone know of a package that computer novices can use to build simple
 web pages. Even if they know nothing of HTML?
 
 I'm using mysql and I figure there might be something out there all ready
 built. This is for a small college that teachers can use to put on there
 stuff.
 

typo/grammar:  there should be their

IMHO anyone who is serious about building web pages must learn and use HTML.
It's a bit like expecting people to use mysql but requiring them to not use
sql.

The database intereface to mysql can be handled easily by most of the 
cgi environments.

You may want to look at Zope, Zope/CMF, and Zope/Plone.  They have a bunch
of pre-built components that can be adapted.

Another approach is to use PHP which embeds dynamic code into HTML.

There are lots of GUI-based generators out there.  I personally don't find 
them useful.

The Python HTMLgen pakage has some nice features that make it fairly easy
for a HTML fluent person to build complex sites.   For example, it would be 
my choice to build a collection of Faculty biography pages.



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

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: Unexpected ending

2002-12-10 Thread ed
 
I saw the same behaviour when the mysql database did not exist in the 
directory listed  by Starting mysqld daemon with databases from 
/var/lib/mysql. If the RPM installation  put the db somewhere 
besides /var/lib/mysql you may need to edit the /etc/my.cnf file  
to specify the correct location of the mysql database directory. 



On 10 Dec 2002 at 13:40, Lefevre, Steven wrote:

 Before I get 1000 RTFMs,
 
 
 I found on google references to an error file. I did a search (after
 rebuilding the 'locate' database) and found no error file! :(
 
 Also, no results returned on the mysql mailing list archive.
 
 - Original Message -
 From: Lefevre, Steven [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, December 10, 2002 1:28 PM
 Subject: Unexpected ending
 
 
  Hey folks -
 
  Linux newbie here.
 
  I have RH 8.0 installed on a machine. I did an RPM installation of MySQL
  3.23 (or whatever the current 3 series is).
 
  When I try to start the safe daemon, I get this:
 
  [root@server ]# /usr/bin/safe_mysqld
  Starting mysqld daemon with databases from /var/lib/mysql
  021210 13:26:51  mysqld ended
 
  [root@server ]#
 
  What's the deal?
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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
 

-- 
Ed Pauley II
Bloodstock Research Information Services
Phone:  (859) 223- ext. 297
E-mail: [EMAIL PROTECTED]
Web:http://www.brisnet.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: ADO Bulk Inserts

2002-12-10 Thread Michael She
Apparently, aren't bulk inserts faster?


I'm currently looping my insert statements, but from what I read, a single 
bulk insert should be faster?


Can anyone confirm this?


At 02:49 PM 12/10/2002 -0500, Fernando Grijalba wrote:
Why do you have to do it that way?

Could you do it in a loop?

Do Until rst.EOF
dbConn.Execute(INSERT STATMENT);
Loop

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 10, 2002 13:55
To: Fernando Grijalba
Cc: MySQL Help
Subject: RE: ADO Bulk Inserts


Hi,


That is how I currently submit my statements, but can't I go:

Hi, that is how I execute my current statements.

But can't I submit multiple statements like:

INSERT INTO tblname(fld1) VALUES(val1);INSERT INTO tblname(fld1)
VALUES(val1);?

If I submit multiple statements I get a SQL error.



At 12:55 PM 12/10/2002 -0500, Fernando Grijalba wrote:
Have you try this:

dbConn.Execute(INSERT INTO tblname(fld1, fld2) VALUES(val1,
val2),(val1,val2),(val1,vla2);)

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 10, 2002 12:08
To: Fernando Grijalba
Cc: MySQL Help
Subject: RE: ADO Bulk Inserts


Same table, but it shouldn't matter right?

I'm getting a SQL syntax error once I start combining my statements
together.  If I submit the statements separately they're OK.



At 09:59 AM 12/10/2002 -0500, Fernando Grijalba wrote:
 Are the inserts to the same table or different tables and columns?
 
 JFernando
 ** sql **
 
 -Original Message-
 From: Michael She [mailto:[EMAIL PROTECTED]]
 Sent: December 9, 2002 14:56
 To: MySQL List
 Subject: ADO Bulk Inserts
 
 
 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
 
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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



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

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

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



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

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

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

Re: Building Web Pages

2002-12-10 Thread Michael She
Macromedia Dreamweaver or Microsoft Frontpage would be the best 
choice.  However, they are both expensive.

Macromedia Dreamweaver MX has some database tools built into allow you to 
build simple data driven webpages.



At 11:38 AM 12/10/2002 -0800, Grant Cooper wrote:
Does anyone know of a package that computer novices can use to build simple
web pages. Even if they know nothing of HTML?

I'm using mysql and I figure there might be something out there all ready
built. This is for a small college that teachers can use to put on there
stuff.


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




download problems for MySQL 3.23.53a HP-UX

2002-12-10 Thread Jonathan Stockley
Hi,
I have two problems.

1. The link for downloading MySQL 3.23.53a HP-UX 11.11 is incorrect, it 
points to the 10.20 download.

2. The download says MySQL 3.23.53a HP-UX 11.11 but I need support for HP-UX 
11.00 with the 11.11 port work on 11.00 or am I out of luck?

Cheers,
Jo

Oh yeah, 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: Quota Support

2002-12-10 Thread Dean Harding
Why would you need to chown it?  Your user's won't need to touch the
file at all, so it should be happy being owned by mysql...

I don't know, maybe it won't work... I'm not much of a Unix person -
I've never touched unix since I left university :)

Dean.

 -Original Message-
 From: Steven Adams [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 10 December 2002 7:42 pm
 To: [EMAIL PROTECTED]
 Subject: Re: Quota Support
 
 
  So do u mean like this
 
  user home dir = /home/web/users/xxx
 
  then u symlink /home/web/users/xxx/mysql/database1 
  /usr/local/mysql/lib/database1
 
  chown -R xxx.xxx /home/web/users/xxx/mysql/database1
 
  Wouldent mysql get permissions errors like that?
 
  /Steve
  - Original Message -
  From: Dean Harding [EMAIL PROTECTED]
  To: 'Steven Adams' [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Monday, December 09, 2002 7:01 PM
  Subject: RE: Quota Support
 
 
   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 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: Building Web Pages

2002-12-10 Thread Joe Oaks
NuSphere, or Macromedia Dreamweaver MX.

NuSphere comes with mysql, php, apache, and a few other goodies, this
is a PHP IDE, no GUI to it but very powerful, and it works on both Linux
and Windows.

Everyone should know what Dreamweaver is, but the new MX has extensions
for php too :)

Joe

-Original Message-
From: Grant Cooper [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 11:39 AM
To: MySQL mailing list
Subject: Building Web Pages


Does anyone know of a package that computer novices can use to build simple
web pages. Even if they know nothing of HTML?

I'm using mysql and I figure there might be something out there all ready
built. This is for a small college that teachers can use to put on there
stuff.


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

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: Where does MySQL store db files?

2002-12-10 Thread Francisco
Hi,

You can check that if the server is running by
executing this:

Show variables like datadir%

from mysql.


Bye,
--- Robert Citek [EMAIL PROTECTED] wrote:
 
 At 05:35 AM 12/10/2002 -0800, tmb wrote:
 1 - On a Linux/Apache box,
 when you create a MySQL db with tables, etc,
 Where does MySQL store the files associated with
 the
 db?
 
 If the database is named foobar, then usually in
 /var/lib/mysql/foobar
 
 2 - On subsiquent db's, does MySQL store those
 files
 in the same directory or each db in a seperate
 folder?
 
 New folder, for example /var/lib/mysql/new_db
 
 Regards,
 - Robert
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 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




RE: Select and Sort?

2002-12-10 Thread Adolfo Bello
SELECT ... WHERE Category  'others'
UNION
SELECT ... WHERE Category='others'

 -Original Message-
 From: Tariq Murtaza [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, December 10, 2002 7:12 AM
 To: Fred van Engen
 Cc: [EMAIL PROTECTED]
 Subject: Re: Select and Sort?
 
 
 Thanks for help.
 here is another solution for that...
 
 SELECT if (Category = 'others', '999', 0) as priority, ID, 
 Category FROM 
 TableName
 ORDER BY priority, Category
 
 Tariq
 
 Fred van Engen wrote:
  On Tue, Dec 10, 2002 at 03:32:13PM +0500, Tariq Murtaza wrote:
  
 I want to achieve recordset like below (sorting category by Name and
 including 'Others' at the end),
 I want to do that by single query ;), any idea???
 
 
 ID  Category
 
 6   biochemistry
 62  Commerce
 95  chemistry
 2   Engg
 87  Ecommerce
 7   math
 45  physics
 1   Software Engg   
 5   Others
 
  
  
  Try something like this:
  
  SELECT id, category from mytable order by 
  concat(if(id=5,'B','A'),category);
  
  Only problem is that it won't optimize, so use this on small tables 
  only.
  
  
  Regards,
  
  Fred.
  
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Where does MySQL store db files?

2002-12-10 Thread Adolfo Bello
 1 - On a Linux/Apache box,
 
 when you create a MySQL db with tables, etc,
 
 Where does MySQL store the files associated with the
 db?

Generally, /var/lib/mysql. Check your my.cnf

 
 2 - On subsiquent db's, does MySQL store those files
 in the same directory or each db in a seperate folder?

Depends on table type. For MyISAM you will have a subdirectory for each
database. For InnoDB a common file (usually, ibdata in /var/lib/mysql)
plus a subdirectory where the *.frm are stored.
 
 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






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

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: Bug in GROUP BY/CASE/MAX?

2002-12-10 Thread 'Bob Diss'
RE: Bug in GROUP BY/CASE/MAX?

More info -- it seems that if I change the 'NULL' to ''
(i.e. the empty string) in the CASE statements, I get the
result I'm looking for.  That is, the query:

mysql select max(case when col = 1 then val else '' end) as color
   from t group by row;

returns the three rows 'orange', 'yellow', and 'green'.

Why is that?  Is something broken when MySQL calculates the
aggregate for a column that contains a NULL value?  Is there a doc
to explain how an aggregate function should work in the presence
of NULL?

Bob Diss, [EMAIL PROTECTED]

===

Date: Tue, 10 Dec 02 13:57:00 EST
From: 'Bob Diss' [EMAIL PROTECTED]
To: 'MySQL List' [EMAIL PROTECTED]

Bug in GROUP BY/CASE/MAX?

I'm seeing a strange result when I group rows and using CASE and
MAX() to select the column I'm interested in (typical pivot-table
operation).  Here's my sample case:

mysql -- create table
mysql create table t (row int not null,
   col int not null,
   val varchar(255) not null);

mysql -- populate with test records
mysql insert into t values (1,1,'orange');
mysql insert into t values (1,2,'large');
mysql insert into t values (2,1,'yellow');
mysql insert into t values (2,2,'medium');
mysql insert into t values (3,1,'green');
mysql insert into t values (3,2,'small');

mysql -- group by row, extract values where col=1
mysql select max(case when col = 1 then val else null end) as color
   from t group by row;

MySQL shows the result set as:

++
| color  |
++
| orange |
| NULL   |
| NULL   |
++
3 rows in set (0.00 sec)

I would have expected MySQL to group the records into
three sets according to row:
  (1,1,'orange')
  (1,2,'large')

  (2,1,'yellow')
  (2,2,'medium')

  (3,1,'green')
  (3,2,'small')

then, for each set, apply the case expression:
  (1,1,'orange')  becomes   'orange'
  (1,2,'large')   becomes   NULL

  (2,1,'yellow')  becomes   'yellow'
  (2,2,'medium')  becomes   NULL

  (3,1,'green')   becomes   'green'
  (3,2,'small')   becomes   NULL

then, apply the max() aggregate:
  max('orange',NULL)   becomes  'orange'
  max('yellow',NULL)   becomes  'yellow'
  max('green',NULL)becomes  'green'

So, I'm expecting to see a result set of three colors. This query
works as I expect in MS-SQLServer 7.0.  Why doesn't it work the same
way in MySQL?

I'm running the RPMS from MySQL.com for MySQL-max 3.23.52
on RedHat 7.3.

tia,

Bob Diss, [EMAIL PROTECTED]

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

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


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

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




Re: Bug in GROUP BY/CASE/MAX?

2002-12-10 Thread gerald_clark
What is the MAX of a known and an unknown value?
It would be unknown or NULL

'Bob Diss' wrote:


RE: Bug in GROUP BY/CASE/MAX?

More info -- it seems that if I change the 'NULL' to ''
(i.e. the empty string) in the CASE statements, I get the
result I'm looking for.  That is, the query:

mysql select max(case when col = 1 then val else '' end) as color
  from t group by row;

returns the three rows 'orange', 'yellow', and 'green'.

Why is that?  Is something broken when MySQL calculates the
aggregate for a column that contains a NULL value?  Is there a doc
to explain how an aggregate function should work in the presence
of NULL?

Bob Diss, [EMAIL PROTECTED]

===

 

Date: Tue, 10 Dec 02 13:57:00 EST
From: 'Bob Diss' [EMAIL PROTECTED]
To: 'MySQL List' [EMAIL PROTECTED]

Bug in GROUP BY/CASE/MAX?

I'm seeing a strange result when I group rows and using CASE and
MAX() to select the column I'm interested in (typical pivot-table
operation).  Here's my sample case:

mysql -- create table
mysql create table t (row int not null,
 col int not null,
 val varchar(255) not null);

mysql -- populate with test records
mysql insert into t values (1,1,'orange');
mysql insert into t values (1,2,'large');
mysql insert into t values (2,1,'yellow');
mysql insert into t values (2,2,'medium');
mysql insert into t values (3,1,'green');
mysql insert into t values (3,2,'small');

mysql -- group by row, extract values where col=1
mysql select max(case when col = 1 then val else null end) as color
 from t group by row;

MySQL shows the result set as:

++
| color  |
++
| orange |
| NULL   |
| NULL   |
++
3 rows in set (0.00 sec)

I would have expected MySQL to group the records into
three sets according to row:
(1,1,'orange')
(1,2,'large')

(2,1,'yellow')
(2,2,'medium')

(3,1,'green')
(3,2,'small')

then, for each set, apply the case expression:
(1,1,'orange')  becomes   'orange'
(1,2,'large')   becomes   NULL

(2,1,'yellow')  becomes   'yellow'
(2,2,'medium')  becomes   NULL

(3,1,'green')   becomes   'green'
(3,2,'small')   becomes   NULL

then, apply the max() aggregate:
max('orange',NULL)   becomes  'orange'
max('yellow',NULL)   becomes  'yellow'
max('green',NULL)becomes  'green'

So, I'm expecting to see a result set of three colors. This query
works as I expect in MS-SQLServer 7.0.  Why doesn't it work the same
way in MySQL?

I'm running the RPMS from MySQL.com for MySQL-max 3.23.52
on RedHat 7.3.

tia,

Bob Diss, [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




Perl vs. PHP with MySQL - performance?

2002-12-10 Thread Angel Flow
Hi,

Would like to ask people's thoughts on whether Perl or
PHP has higher performance with MySQL. I've heard
rumours that DBI is slower than the PHP MySQL driver.
What's your experience? Does anyone know of any
benchmark data comparing mod_perl and mod_php working
with mySQL? Thank you very much.

Andy
 

__
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: Bug in GROUP BY/CASE/MAX?

2002-12-10 Thread Dan Nelson
In the last episode (Dec 10), 'Bob Diss' said:
 RE: Bug in GROUP BY/CASE/MAX?
 
 More info -- it seems that if I change the 'NULL' to ''
 (i.e. the empty string) in the CASE statements, I get the
 result I'm looking for.  That is, the query:
 
 mysql select max(case when col = 1 then val else '' end) as color
from t group by row;
 
 returns the three rows 'orange', 'yellow', and 'green'.
 
 Why is that?  Is something broken when MySQL calculates the
 aggregate for a column that contains a NULL value?  Is there a doc
 to explain how an aggregate function should work in the presence
 of NULL?

That looks like a bug to me.  The equivalent syntax does work, though:

select max(if(col=1,val,NULL)) as color from t group by row;

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




Can I get the matching expression from REGEXP

2002-12-10 Thread Mike Bosschaert
Hi,
In one of my tables I have a column which contains a combination of a string 
(characters only), a space and a 1 or 2 letter combination. The string has no 
fixed lenght. Like:

   abcd ef
   bcdefgh i
   etc

Now I want to remove the 1 or 2 letter combination from this column into 
another column. I can select the rows with 

WHERE colX REGEXP . .{1,2}$

This wil return the first two rows only. But I cannot figure out how to get 
the query to return the matching result (being ef and i).

Any help appreciated

Mike



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

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: Bug in GROUP BY/CASE/MAX?

2002-12-10 Thread 'Bob Diss'
RE: Bug in GROUP BY/CASE/MAX?

Well, according to my reading/understanding of SQL ANSI'92,
MAX/MIN/SUM/AVG are supposed to eliminate the NULLs from the
set before doing the appropriate calculation...


Bob Diss, [EMAIL PROTECTED]

===

Date: Tue, 10 Dec 2002 15:45:03 -0600
From: gerald_clark [EMAIL PROTECTED]
To: 'Bob Diss' [EMAIL PROTECTED]

What is the MAX of a known and an unknown value?
It would be unknown or NULL

'Bob Diss' wrote:

RE: Bug in GROUP BY/CASE/MAX?

More info -- it seems that if I change the 'NULL' to ''
(i.e. the empty string) in the CASE statements, I get the
result I'm looking for.  That is, the query:

mysql select max(case when col = 1 then val else '' end) as color
   from t group by row;

returns the three rows 'orange', 'yellow', and 'green'.

Why is that?  Is something broken when MySQL calculates the
aggregate for a column that contains a NULL value?  Is there a doc
to explain how an aggregate function should work in the presence
of NULL?

Bob Diss, [EMAIL PROTECTED]

===



Date: Tue, 10 Dec 02 13:57:00 EST
From: 'Bob Diss' [EMAIL PROTECTED]
To: 'MySQL List' [EMAIL PROTECTED]

Bug in GROUP BY/CASE/MAX?

I'm seeing a strange result when I group rows and using CASE and
MAX() to select the column I'm interested in (typical pivot-table
operation).  Here's my sample case:

mysql -- create table
mysql create table t (row int not null,
  col int not null,
  val varchar(255) not null);

mysql -- populate with test records
mysql insert into t values (1,1,'orange');
mysql insert into t values (1,2,'large');
mysql insert into t values (2,1,'yellow');
mysql insert into t values (2,2,'medium');
mysql insert into t values (3,1,'green');
mysql insert into t values (3,2,'small');

mysql -- group by row, extract values where col=1
mysql select max(case when col = 1 then val else null end) as color
  from t group by row;

MySQL shows the result set as:

++
| color  |
++
| orange |
| NULL   |
| NULL   |
++
3 rows in set (0.00 sec)

I would have expected MySQL to group the records into
three sets according to row:
 (1,1,'orange')
 (1,2,'large')

 (2,1,'yellow')
 (2,2,'medium')

 (3,1,'green')
 (3,2,'small')

then, for each set, apply the case expression:
 (1,1,'orange')  becomes   'orange'
 (1,2,'large')   becomes   NULL

 (2,1,'yellow')  becomes   'yellow'
 (2,2,'medium')  becomes   NULL

 (3,1,'green')   becomes   'green'
 (3,2,'small')   becomes   NULL

then, apply the max() aggregate:
 max('orange',NULL)   becomes  'orange'
 max('yellow',NULL)   becomes  'yellow'
 max('green',NULL)becomes  'green'

So, I'm expecting to see a result set of three colors. This query
works as I expect in MS-SQLServer 7.0.  Why doesn't it work the same
way in MySQL?

I'm running the RPMS from MySQL.com for MySQL-max 3.23.52
on RedHat 7.3.

tia,

Bob Diss, [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 mysql-unsubscribe-gerald_clark=suppliersystems.com-
@lists.mysql.com
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




User Install Bug (Was: mysqlbug)

2002-12-10 Thread Jan Steinman
From: amit parikh [EMAIL PROTECTED]

i install binary version of the mysql .
i skipped first 2 stage while installing (that is creating user  group) and directly 
run binary script file.

when i run this command, i got following error.
mysql -u root mysql
ERROR 2002: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (111).
How to solve this error.

Uhm, re-install without skipping any steps?

-- 
: Jan Steinman -- nature Transography(TM): http://www.Bytesmiths.com
: Bytesmiths -- artists' services: http://www.Bytesmiths.com/Services
: Buy My Step Van! http://www.Bytesmiths.com/van

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

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 I get the matching expression from REGEXP

2002-12-10 Thread Andy Bakun
Look up SUBSTRING_INDEX in the mysql manual.

select SUBSTRING_INDEX(colX,' ',-1) from table

is what I think you want.  This will return everything after the first
space found.  May want to stick an if(...) construct in there for where
you don't want the rows without the spaces (see below).

Then something like:

update table set colY = SUBSTRING_INDEX(colX,' ',-1);

To satisfy your condition of the first two rows only (in your example):

select if(substring_index(colX, ' ', -1)) = colX,
NULL, 
substring_index(colX, ' ', -1)) as colY
from xx1 having colY is not NULL;

and for the update:

update table set colY = substring_index(colX, ' ', -1)
  where substring_index(colX, ' ', -1))  colX;

Andy.

On Tue, 2002-12-10 at 17:40, Mike Bosschaert wrote:
 Hi,
 In one of my tables I have a column which contains a combination of a string 
 (characters only), a space and a 1 or 2 letter combination. The string has no 
 fixed lenght. Like:
 
abcd ef
bcdefgh i
etc
 
 Now I want to remove the 1 or 2 letter combination from this column into 
 another column. I can select the rows with 
 
 WHERE colX REGEXP . .{1,2}$
 
 This wil return the first two rows only. But I cannot figure out how to get 
 the query to return the matching result (being ef and i).
 
 Any help appreciated



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

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




Re: safe_mysqld will not start correctly

2002-12-10 Thread Heikki Tuuri
Matt,

- Original Message -
From: Matt Allen [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, December 10, 2002 8:10 PM
Subject: safe_mysqld will not start correctly



 Could someone please tell me how to fix this problem:

what happened before this? Did mysqld crash? Or did you move ibdata or
ib_logfiles?

What MySQL version is this? I guess this is on Linux?

The assertion below means there is a garbage pointer in the log file.

Look at http://www.innodb.com/ibman.html#Forcing_recovery. You have to put

set-variable=innodb_force_recovery=6

to the [mysqld] section of your my.cnf and start mysqld. Then dump your
tables, recreate the whole InnoDB tablespace, and import the tables again.

Please upgrade to MySQL-Max-3.23.53a because it is the stablest version so
far.

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB

sql query


 021210 12:50:49  mysqld started
 021210 12:50:52  InnoDB: Database was not shut down normally.
 InnoDB: Starting recovery from log files...
 InnoDB: Starting log scan based on checkpoint at
 InnoDB: log sequence number 0 2785410520
 InnoDB: Doing recovery: scanned up to log sequence number 0 2785410520
 InnoDB: Assertion failure in thread 1 in file ../include/buf0buf.ic line
265
 021210 12:50:49  mysqld started
 021210 12:50:52  InnoDB: Database was not shut down normally.
 InnoDB: Starting recovery from log files...
 InnoDB: Starting log scan based on checkpoint at
 InnoDB: log sequence number 0 2785410520
 InnoDB: Doing recovery: scanned up to log sequence number 0 2785410520
 InnoDB: Assertion failure in thread 1 in file ../include/buf0buf.ic line
265
 InnoDB: We intentionally generate a memory trap.
 InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
 mysqld got signal 11;

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

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

 021210 12:50:52  mysqld ended




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


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

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




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

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




LOAD DATA LOCAL INFILE mysqld-nt.exe --local-infile=1 does not work for win32

2002-12-10 Thread Phuc Nguyen
Hi,

When trying to use 'LOAD DATA LOCAL INFILE' with Apache2.0.43 (running a
module) and MySQL 3.23.53, it returns the error the command is not
supported. This is because the function is disable for security issue, but
when I tried to start mysql with 'c:\mysql\bin\mysqld-nt --local-infile=1'
it still does not work.

In my scriptI have the following line:

$resultImport = mysql_db_query($sql_db,LOAD DATA LOCAL INFILE '$myfilename'
INTO TABLE $mytablename FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY
'' LINES TERMINATED BY '\r\n') or die (mysql_error());

When run I get this error:
The used command is not allowed with this MySQL version.

If I run mysql from mysql client command prompt, I get application error
pop-up dialog with the following message:
mysqld-nt.exe-Application Error
The instruction at 0x0044dcd0 referenced memory at 0x000. The memory
could not be read.

In the command prompt I have the following message:
mysql load data infile import.txt into table testdb.t1;
ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id:3
Current database: *** NONE ***

ERROR 2013: Lost connection to MySQL server during query

Does anyone have any idea on how to enable LOAD DATA LOCAL INFILE globally
with MySQL
3.23.53 and Apache 2.0.43 (running as module)? If I use Apache 1.3.27, I do
not have this problem.

The link http://www.mysql.com/doc/en/LOAD_DATA_LOCAL.html is not very
helpful; Does not provide information to enable Load Data Local Infile
globally for win32.

Could someone please help.

Thanks.




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

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




configure and make work, but 'make test' fails miserably

2002-12-10 Thread benoit
Description:

I configure with the line shown at the bottom. There are no erros. I make, with the 
following command:
make -s -j 2
There are no erros. Some warnings, but docs say those are to be expected.

However, when I run 'make test' I get the following:

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

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

Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Stack range sanity check OK, backtrace follows:
0x808d9dc
0x814ddf3
0x815ee47
0x8095c72
0x80983bd
0x809055d
Stack trace seems successful - bottom reached
Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow 
instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do 
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd-query at 0x8294ec8 =  CREATE TABLE db (   Host char(60) DEFAULT '' NOT NULL,   Db 
char(64) DEFAULT '' NOT NULL,   User char(16) DEFAULT '' NOT NULL,   Select_priv 
enum('N','Y') DEFAULT 'N' NOT NULL,   Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,  
 Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,   Delete_priv enum('N','Y') DEFAULT 
'N' NOT NULL,   Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,   Drop_priv 
enum('N','Y') DEFAULT 'N' NOT NULL,   Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,   
References_priv enum('N','Y') DEFAULT 'N' NOT NULL,   Index_priv enum('N','Y') DEFAULT 
'N' NOT NULL,   Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL, PRIMARY KEY Host 
(Host,Db,User), KEY User (User) ) comment='Database privileges'
thd-thread_id=1

Successfully dumped variables, if you ran with --log, take a look at the
details of what thread 1 did to cause the crash.  In some cases of really
bad corruption, the values shown above may be invalid

The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains
information that should help you find out what is causing the crash
Error:  Could not install master test DBs
make: *** [test] Error 1
=== end insertion

Resolving the stack trace, I get the following:

=== begin insertion
0x808d9dc _Z15handle_segfaulti + 460
0x814ddf3 __pthread_sighandler + 115
0x815ee47 __strtol_internal + 1447
0x8095c72 _Z17add_field_to_listPc16enum_field_typesS_S_jP4ItemS_P10st_typelib + 354
0x80983bd _Z7yyparsev + 3373
0x809055d _Z16handle_bootstrapPv + 669
=== end insertion

So it looks like the threads is the problem--I did not make any of the modifications 
to the thread library mentioned in the INSTALL-SOURCE document, as they seemed to be 
necessary only for very high-availability servers (also, things in the upgraded glibc 
didn't match EXACTLY the things in the doc file). I did upgrade linuxthreads as part 
of the glibc upgrade (with the linuxthreads add-on corresponding to the glibc 
package). Also, after upgrading glibc, I re-compiled gcc, and then re-compiled the 
kernel against the new glibc. All compilations against these new glibc, gcc, and 
kernel versions have worked ok up till now. Thanks for any input!

Benoit Flippen
Beach Associates


How-To-Repeat:
Unknown
Fix:
Unknown

Submitter-Id:  submitter ID
Originator:Benoit Flippen
Organization:  Beach Associates
MySQL support: none
Synopsis:  configure and make work, but 'make test' fails miserably
Severity:  critical
Priority:  low
Category:  mysql
Class: sw-bug
Release:   mysql-3.23.53 (Source distribution)

Environment:
Originally a Red hat 7.1 box; kernel, glibc, gcc, make, binutils, autoconf, automake, 
bison all upgraded (had gcc 2.96).
Dual PentiumIII 733 processors
512MB RAM
1GB swap

System: Linux stilgar.beachassociates.com 2.4.19 #2 SMP Mon Dec 9 18:38:24 EST 2002 
i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
Configured with: ../gcc-3.2.1/configure --prefix=/usr

cannot start server after replacing data directory files

2002-12-10 Thread clea_rees
Description:
followed instructions in manual to remove existing files in data directory and 
replace. on doing so, get errors when i try to start using sudo safe_mysqld 
--user=mysql . error log reads:
---
021210 17:05:07  mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
021210 17:05:08  /usr/local/mysql/bin/mysqld: Can't find file: './mysql/host.frm' 
(errno: 13)
021210 17:05:08  mysqld ended
---
reason for trying to regenerate files: hostname in mac os x gives strange results - 
so mysql used a temporary dhcp identifier, because i wasn't aware of this peculiarity. 
obviously this caused problems. after giving sudo hostname 127.0.0.1, i tried to 
regenerate the files and restart the server. then the errors. 
more generally, should one configure hostname to 127.0.0.1 in the /etc/hostconfig file?

How-To-Repeat:
just as described above and in the relevant section of the manual.
Fix:


Submitter-Id:  submitter ID
Originator:
Organization:
 
MySQL support: [none X| licence | email support | extended email support ]
Synopsis:  cannot start server after replacing data directory files
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.53-entropy.ch (http://www.entropy.ch/software/macosx/mysql/)

Environment:

System: Darwin 127.0.0.1 6.2 Darwin Kernel Version 6.2: Tue Nov  5 22:00:03 PST 2002; 
root:xnu/xnu-344.12.2.obj~1/RELEASE_PPC  Power Macintosh powerpc
Mac OS X: 10.2; perl 5.8.0

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


lrwxr-xr-x  1 root  wheel  15 Dec  2 17:03 /usr/lib/libc.dylib - libSystem.dylib
Configure command: ./configure --prefix=/usr/local/mysql 
--localstatedir=/usr/local/mysql/data --libdir=/usr/local/mysql/lib 
--includedir=/usr/local/mysql/include --with-named-z-libs=/usr/local/libz.a 
--with-innodb --with-server-suffix=-entropy.ch 
--with-comment=http://www.entropy.ch/software/macosx/mysql/ --with-mysqld-user=mysql 
--enable-assembler 'CFLAGS=-DHAVE_BROKEN_REALPATH -lncurses' 
'CFLAGS=-DHAVE_BROKEN_REALPATH -lncurses'


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

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




Bug report: Embedded MySQL version 4.05a

2002-12-10 Thread Matt Solnit
===
Bug report -- MySQL v4.05a, binary distribution
===

--
Machine specs:
--
Compaq Presario desktop
Windows XP Professional SP1
.NET Framework SP2


Problem description:

The security features of MySQL do not seem to work with Embedded MySQL.
Instead, every user is given full permissions.

-
Setup script:
-
USE mysql
DELETE FROM user WHERE user='';
DELETE FROM user WHERE user='root' AND host!='localhost';

USE test
CREATE TABLE mytable (a int);
GRANT SELECT ON mytable TO joe@localhost;
GRANT USAGE ON mytable TO jay@localhost;

FLUSH PRIVILEGES;

--
Observed behavior:
--
Running the mysql.exe client, anonymous users cannot connect to the
database, user 'joe' has read-only access to the table test.mytable, and
user 'jay' as no privileges.

Running the mysql-server.exe host, all users have full privileges.

Additionally, the GRANT statement in mysql-server.exe returns error 1047
(Unknown command).

---
Possible cause:
---
The function acl_init() which loads the ACL's for each user on startup,
includes a parameter, dont_read_acl_tables, that can be set to true to
skip this step.  The purpose of this parameter according to the comments
is to support the --skip-grant command-line option.  However, the
mysql_server_init() function hard-codes this parameter value to 1, so
the ACL's never get loaded and every access succeeds.

---
My contact information:
---
Matt Solnit [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




Fw: Bug report Null Set Returned in versions greater than 4.0.1-alpha

2002-12-10 Thread Christopher M. Keslin
Hello,

The following sql query works very well in version 4.0.1-alpha-nt.  However
it returns a null set with the data provided in aBetterLimo.sql in all later
versions (the last one tried was 4.0.5-beta.  I hope that this is enough
information.  If you would like anymore please feel free to contact me.

I have tested it under the following systems...

Windows 2000 Server
Windows XP Professional
Windows .NET 2003 Beta

I am accessing the information using

MyODBC 2.50.39
ODBC.NET
.NET Framework

an example can be found at
http://vpn.in.keslininc.com/aBetterLimoService/srs.asmx

choose getBilling
use the dates

start 11/11/2001
end 11/11/2005
billed true

The only thing I have to do to make it work is revert back to Mysql
4.0.1-alpha-nt

My attempt to attach a mysqldump file failed for this list.  Therefore if
anyone is going to test this bug and would like a copy of the data from
mysqldump that generates the data for this query please feel free to e-mail
me.

--Chris Keslin

SELECT reservation.rsrvID as ReservationID, reservationType.display as
ReservationType, customer.userName as CustomerID, paymentType.display as
PaymentType, address.phone as Phone, address.street as Street, address.city
as City, address.state as State, address.zip as Zip, payment.pymtID as
PaymentID, payment.discount as Discount, payment.rate as Rate,
payment.gratuity as Gratuity, (1 - payment.discount) * (payment.rate +
payment.gratuity) as Total, payment.billingDate as BillingDate,
payment.billed as Billed, payment.nameOnCard as NameOnCard,
payment.acctNumber as AccountNumber, payment.cardExpiration as
CardExpiration, payment.miscNumber1 as Misc1, payment.miscNumber2 as Misc2,
payment.miscNumber3 as Misc3, payment.miscNumber4 as Misc4,
payment.lastModTime as LastModTime, payment.lastModBy as LastModBy FROM
reservation, customer, payment, paymentType, address, reservationType WHERE
reservation.pymtID = payment.pymtID AND reservation.custID = customer.custID
AND reservation.rtypID = reservationType.rtypID AND payment.addrID =
address.addrID AND payment.ptypID = paymentType.ptypID AND
payment.billingDate = 20011101 AND payment.billingDate = 20051101 ORDER BY
payment.billingDate DESC

===
Christopher M. Keslin, Senior IT Consultant
Keslin Engineering, Inc.
6212 W. Monee-Manhattan Road
Monee, IL  60449
P. (708) 235-1150
F. (708) 235-1148


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

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




Does mysql support foreign key on delete cascade and on update cascade?

2002-12-10 Thread Jing Dai
I am just working on mySQL and create two tables, defined licenseID is
the primary key in license_info, and foreign key in license_data.
But I tested it didn't work the way as like in Oracle delete cascade or
update cascade.
Did I do something incorrect?

mysql create table samDB.license_info (
- licenseID integer(5) auto_increment primary key,
- vendorName VARCHAR(30) NOT NULL,
- featureName VARCHAR(30) NOT NULL);
Query OK, 0 rows affected (0.01 sec)




mysql create table samDB.license_data(
- licenseID integer(5) NOT NULL REFERENCES samDB.license_info
(licenseID) match full on delete cascade on update cascade,
- logDate DATE NOT NULL,
- totalLic integer(5) NOT NULL,
- issuedLic integer(5) NOT NULL,
- queuedLic integer(5) NOT NULL,
- deniedLic integer(5) NOT NULL,
- comment VARCHAR(100));
Query OK, 0 rows affected (0.01 sec)



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

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: Possible date bug

2002-12-10 Thread Bruce MacDonald
John,

 Am I mistaken or does 2002-02-31 translate into February 31, 2002? 

I see it now -- right there on Page 646 of the MySQL Manual:

| Note that MySQL does no checking whether the date is correct. 
| If you store an incorrect date, such as '1998-2-31', 
| the wrong date will be stored. If the date cannot be converted 
| to any reasonable value, a 0 is stored in the DATE field. 
| This is mainly a speed issue and we think it is up to the 
| application to check the dates, and not the server.

Bruce MacDonald
Minnesota Public Radio


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

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 I get the matching expression from REGEXP

2002-12-10 Thread Robert Citek

Hello Mike,

The short answer: use Perl, Python, Ruby, etc.

You are pressing the boundaries between a query language (SQL) and a
programming/scripting language (Perl, Python, Ruby, etc.).  Scripting
languages as these already have those capabilities and can easily connect
to MySQL an many other database.  That is, if you create a solution with a
scripting language you will also create a more portable solution.

Regards,
- Robert

-

At 12:40 AM 12/11/2002 +0100, Mike Bosschaert wrote:
Now I want to remove the 1 or 2 letter combination from this column into 
another column. I can select the rows with 

WHERE colX REGEXP . .{1,2}$

This wil return the first two rows only. But I cannot figure out how to get 
the query to return the matching result (being ef and i).


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

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




REGEXP email address query

2002-12-10 Thread Richard Baskett
I would like to search an email address field for all values that do not
have a '@' in them.  How would I go about doing this?

So far this query is what I have:

SELECT * FROM `table_name` WHERE Email REGEXP ^[@];

But I am doing something wrong, because it's just not working :)

Thanks!

Rick

Dost thou love life? Then do not squander time; for that's the stuff life
is made of. - Ben Franklin


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

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




Re: Building Web Pages

2002-12-10 Thread Daniel Marsden
 Date: Tue, 10 Dec 2002 11:38:40 -0800
 From: Grant Cooper [EMAIL PROTECTED]
 Subject: Building Web Pages
 To: MySQL mailing list [EMAIL PROTECTED]
 Message-id: 
000a01c2a083$bfe3c310$040a0a0a@donatev49iknkl
 MIME-version: 1.0
 Content-type: text/plain; charset=iso-8859-1
 Content-transfer-encoding: QUOTED-PRINTABLE
 
 Does anyone know of a package that computer novices can use to 
build =
 simple
 web pages. Even if they know nothing of HTML?
 
 I'm using mysql and I figure there might be something out there all 
r=
 eady
 built. This is for a small college that teachers can use to put on th=
 ere
 stuff.
 
Hi Grant, 

I am starting to use a Web Editor called R.A.D. Editor from 
www.telerik.com - the latest version includes a spell checker, has an 
interface similar to MS Word, and you can generate the content from 
a DB like MySql - I have a beta copy of the latest version - I think it will 
be released sometime this Month.

I will be using it to allow some of our Lecturers/tutors to edit some 
content on our course web pages, without them having to open MS 
Frontpage on their desktop.

The only drawback it has is that the editor will only edit content 
through an IE 5.5 or higher browser - however the content it edits is 
cross-browser compatible.

Other more expensive options are using MS Frontpage or the new 
Program by Macromedia called Collaborate.

hope this helps!


Dan Marsden
Web Developer 
Teaching and Learning Services
Lincoln University
+64 3 325-3838 ext 8911



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

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: REGEXP email address query

2002-12-10 Thread Robert Citek

Hello Richard,

At 05:06 PM 12/10/2002 -0800, Richard Baskett wrote:
SELECT * FROM `table_name` WHERE Email REGEXP ^[@];
But I am doing something wrong, because it's just not working :)

You are searching for an Email field that begins with an @.

Some alternatives:
  SELECT * FROM `table_name` WHERE Email not REGEXP @
  SELECT * FROM `table_name` WHERE Email not like %@%

For a more detailed discussion, I recommend the book Mastering Regular
Expressions, 2nd Edition:
  http://www.oreilly.com/catalog/regex2

Regards,
- Robert
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: REGEXP emal address query

2002-12-10 Thread Richard Baskett
Ok finally found the answer after many hours of searching :)  Here is the
MySQL query that works great!

SELECT * FROM table_name
WHERE Email NOT 
REGEXP ^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}

Thanks to all that replied!

Rick

Keep away from people who belittle your ambitions. Small people always do
that, but the really great, make you feel that you too can become great. -
Mark Twain


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

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 crash and burn...

2002-12-10 Thread David Petersen

I'm developing a site using MySQL and JSP (with Resin).

Everything seems to be jolly the first few times I load a page, but then MySQL just 
crashes.

My system is:
- Hardware: Celeron 500, 128MB RAM
- Mandrake 9.0 vanilla
- Resin 2.1.5 (installed as per resin documentation, configured with Apache)

My connection to the database is through Resin's connection pool. I close the 
connection in a finally {} block each time I use one. Not sure if this has anything to 
do with it, but anyhow Resin shouldn't be able to crash MySQL, should it?

Any pointers to things I might have done wrong  any help otherwise will be greatly 
appreciated.

I'm pretty sure I'm not on this mailing list, so replies that are also addressed to my 
personal e-mail address will be even further appreciated =)


-- David


Following is the stack trace, err file and log file. The PicData and ThumbData are 
both BLOB fields.

(If you'd like to help but need more information, a dump of the database, of the JSP 
site, whatever, don't hesitate to write and I'll send it asap!..)


This is the resolved stack trace:
===

0x808e31c _Z15handle_segfaulti + 460
0x814e538 pthread_sighandler + 120
0x807a966 _ZN10Field_blob8val_realEv + 54
0x8049f4f _ZN10Item_field3valEv + 63
0x8063bed _ZN16Item_func_isnull18fix_length_and_decEv + 77
0x805371d _ZN9Item_func10fix_fieldsEP3THDP13st_table_list + 221
0x80536b8 _ZN9Item_func10fix_fieldsEP3THDP13st_table_list + 120
0x805ff8b _ZN9Item_cond10fix_fieldsEP3THDP13st_table_list + 283
0x80a69e9 _Z11setup_condsP3THDP13st_table_listPP4Item + 1593
0x80aa6a9 
_Z12mysql_selectP3THDP13st_table_listR4ListI4ItemEPS4_P8st_orderS9_S7_S9_jP13select_result
 + 281
0x80926f6 _Z21mysql_execute_commandv + 726
0x8091710 _Z10do_commandP3THD + 1440
0x8090b6b _Z21handle_one_connectionPv + 843







This is the MySQL .err file (edited):
=

021209 22:18:28  mysqld started
/usr/sbin/mysqld: ready for connections
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
= (text removed) ==

key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=5
max_connections=100
threads_connected=6
It is possible that mysqld could use up to 
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 225791 K
bytes of memory
= (text removed) ==
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Stack range sanity check OK, backtrace follows:
0x808e31c
0x814e538
0x807a966
0x8049f4f
0x8063bed
0x805371d
0x80536b8
0x805ff8b
0x80a69e9
0x80aa6a9
0x80926f6
0x8091710
0x8090b6b
Stack trace seems successful - bottom reached
= (text removed) ==
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd-query at 0x8280b30 = SELECT ThumbData FROM pictures WHERE Id='9' AND (NOT 
(ThumbData IS NULL))
thd-thread_id=4

Successfully dumped variables, if you ran with --log, take a look at the
details of what thread 4 did to cause the crash.  In some cases of really
bad corruption, the values shown above may be invalid

= (text removed) ==

Number of processes running now: 0
021209 22:22:35  mysqld restarted
/usr/sbin/mysqld: ready for connections
mysqld got signal 11;
= (text removed) ==

key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=0
max_connections=100
threads_connected=1

= (text removed) ==

Stack range sanity check OK, backtrace follows:
0x808e31c
0x814e538
0x807a966
0x8049f4f
0x8063bed
0x805371d
0x80536b8
0x805ff8b
0x80a69e9
0x80aa6a9
0x80926f6
0x8091710
0x8090b6b
Stack trace seems successful - bottom reached
= (text removed) ==

thd-query at 0x827aaf8 = SELECT ThumbData FROM pictures WHERE Id='8' AND (NOT 
(ThumbData IS NULL))
thd-thread_id=1

details of what thread 1 did to cause the crash.  In some cases of really
= (text removed) ==

Number of processes running now: 0
021209 22:32:39  mysqld restarted
/usr/sbin/mysqld: ready for connections
mysqld got signal 11;
= (text removed) ==

key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=8
max_connections=100
threads_connected=9

= (text removed) ==

Stack range sanity check OK, backtrace follows:
0x808e31c
0x814e538
0x807a966
0x8049f4f
0x8063bed
0x805371d
0x80536b8
0x805ff8b
0x80a69e9
0x80aa6a9
0x80926f6
0x8091710
0x8090b6b
Stack trace seems successful - bottom reached
= (text removed) ==
thd-query at 0x82b4220 = SELECT ThumbData FROM pictures WHERE Id='8' AND (NOT 
(ThumbData IS NULL))
thd-thread_id=12

details of what thread 12 did to cause the crash.  In some cases of really
= (text removed) ==

==(END OF ERR FILE)==








This is the MySQL log file in its entirety, my apologies for the spam if it's not 
necessary:
===


[MySQL] Lock status

2002-12-10 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




Re: Unexpected ending

2002-12-10 Thread Richard KHOO Guan Chen

Try starting mysqld with /etc/rc.d/init.d/mysqld.
And if you want to start it at boot, link to /etc/rc/d/rc3.d(or 
rc5.d)/S98mysqld or something like that. RedHat has a program to write the 
link for you, but I cannot remember what that is, sorry


Regards
Richard KHOO Guan Chen



On Tue, 10 Dec 2002, Lefevre, Steven wrote:

 Hey folks -
 
 Linux newbie here.
 
 I have RH 8.0 installed on a machine. I did an RPM installation of MySQL
 3.23 (or whatever the current 3 series is).
 
 When I try to start the safe daemon, I get this:
 
 [root@server ]# /usr/bin/safe_mysqld
 Starting mysqld daemon with databases from /var/lib/mysql
 021210 13:26:51  mysqld ended
 
 [root@server ]#
 
 What's the deal?
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: take one database offline

2002-12-10 Thread Stephen Brownlow
Egor Egorov [EMAIL PROTECTED] wrote on December 05, 2002:
 
 What do you mean disable database?

Ask the MySQL server to Flush it, then not access its tables until further
notice.

 You can't turn off the database..

Can this please be written? It offers big benefits for little effort.

 You can make backup of the database and then drop the database..
 Why do you want to do it?

We have a similar need.
We have a client with 16 branches.
Each branch runs the same software, using the same server.
Each branch has its own database.
When maintenance is necessary, it would be far better to be able to:
1. turn off one database,
2. use myisamchk, Unix or other applications to adjust it in any way,
3. turn it back on.
That way, the other 15 branches can continue normal operations while the
maintenance occurs on the one.

Thanks,
Stephen



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

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




RE: REGEXP email address query

2002-12-10 Thread JamesD
Hello,

BTW the ^ symbol means search at the very beginning of the string

or maybe SELECT * FROM `table_name` WHERE Email REGEXP (^[a-z0-9]+)\@(.*)

this puts the name in $1 and the domain in $2, if you are running
the select from a perl script -
:-)

Jim

-Original Message-
From: Robert Citek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 5:44 PM
To: MySQL
Subject: Re: REGEXP email address query



Hello Richard,

At 05:06 PM 12/10/2002 -0800, Richard Baskett wrote:
SELECT * FROM `table_name` WHERE Email REGEXP ^[@];
But I am doing something wrong, because it's just not working :)

You are searching for an Email field that begins with an @.

Some alternatives:
  SELECT * FROM `table_name` WHERE Email not REGEXP @
  SELECT * FROM `table_name` WHERE Email not like %@%

For a more detailed discussion, I recommend the book Mastering Regular
Expressions, 2nd Edition:
  http://www.oreilly.com/catalog/regex2

Regards,
- Robert
sql,query


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

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


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

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




RE: ADO Bulk Inserts

2002-12-10 Thread Paul DuBois
At 15:07 -0500 12/10/02, Michael She wrote:

Apparently, aren't bulk inserts faster?


I'm currently looping my insert statements, but from what I read, a 
single bulk insert should be faster?


Can anyone confirm this?

Yes, a single bulk insert will be faster.

Also, the reason your multiple statements separated by semicolons
approach fails with a syntax error is that the client server
protocol does not allow you to send multiple statements in the
same string.  Indeed, you might even get a syntax error by adding
a semicolon to the end of a string containing a *single* query,
because semicolons are not actually part of any SQL statement syntax.




At 02:49 PM 12/10/2002 -0500, Fernando Grijalba wrote:

Why do you have to do it that way?

Could you do it in a loop?

Do Until rst.EOF
dbConn.Execute(INSERT STATMENT);
Loop

JFernando
** sql **

-Original Message-
From: Michael She [mailto:[EMAIL PROTECTED]]
Sent: December 10, 2002 13:55
To: Fernando Grijalba
Cc: MySQL Help
Subject: RE: ADO Bulk Inserts


Hi,


That is how I currently submit my statements, but can't I go:

Hi, that is how I execute my current statements.

But can't I submit multiple statements like:

INSERT INTO tblname(fld1) VALUES(val1);INSERT INTO tblname(fld1)
VALUES(val1);?

If I submit multiple statements I get a SQL error.



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

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-10 Thread Steven Adams
Well hows it spoes to work with disk qoutas if u dont chown it to the user
id??

/Steve
- Original Message -
From: Dean Harding [EMAIL PROTECTED]
To: 'Steven Adams' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 7:32 AM
Subject: RE: Quota Support


 Why would you need to chown it?  Your user's won't need to touch the
 file at all, so it should be happy being owned by mysql...

 I don't know, maybe it won't work... I'm not much of a Unix person -
 I've never touched unix since I left university :)

 Dean.

  -Original Message-
  From: Steven Adams [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, 10 December 2002 7:42 pm
  To: [EMAIL PROTECTED]
  Subject: Re: Quota Support
 
 
   So do u mean like this
 
   user home dir = /home/web/users/xxx
 
   then u symlink /home/web/users/xxx/mysql/database1 
   /usr/local/mysql/lib/database1
 
   chown -R xxx.xxx /home/web/users/xxx/mysql/database1
 
   Wouldent mysql get permissions errors like that?
 
   /Steve
   - Original Message -
   From: Dean Harding [EMAIL PROTECTED]
   To: 'Steven Adams' [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Sent: Monday, December 09, 2002 7:01 PM
   Subject: RE: Quota Support
  
  
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 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



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

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: Bug report: Embedded MySQL version 4.05a

2002-12-10 Thread Paul DuBois
At 15:39 -0800 12/10/02, Matt Solnit wrote:

===
Bug report -- MySQL v4.05a, binary distribution
===

--
Machine specs:
--
Compaq Presario desktop
Windows XP Professional SP1
.NET Framework SP2


Problem description:

The security features of MySQL do not seem to work with Embedded MySQL.
Instead, every user is given full permissions.


Would you expect otherwise?  If you have the embedded server linked
into an application, it's expected that the application will have full
control over the server and can do anything with any of its databases.


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

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




  1   2   >