Collapsing queries

2001-06-15 Thread Matthieu Paindavoine

Hello,

I am relatively new with MySQL (and SQL for that matter) and I couldn't
find much reference to my problem in earlier posts.

Let's say I have 2 tables,

CONTENT: msg_id, msg_text

ADDRESS: msg_id, address

and I receive the msg Hello World addressed to the twins Foo and Bar.
now my tables look like this:

CONTENT:

1   Hello World

ADDRESS:

1   Foo
1   Bar

I am desperatly looking for a sql statement that would produce

1   |   Hello World |   Foo, Bar

Is there such a thing??

I welcome any suggestions,

Thanks

Matthieu

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

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




thread count

2001-06-15 Thread Mikhail

I'm using MySQL under Win2K.
How i can regulate number ot threads in MySQL server?
May be better allow server use dynamic value or use big fixed value.

And one comment, on my server machine 2 processors (you can read more then
one CPU :)
Is any special config properties that I must to use?

WBR, Mikahil Kashkin
(http://www.instock.ru)



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

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




RE: Collapsing queries

2001-06-15 Thread Tyrone Mills

Try this:

SELECT * FROM content, address WHERE content.msg_id = address.msg_id

If I understand what your asking for, you want a JOIN. If I don't
understand, forgive me, it's late... :)

Tyrone

-Original Message-
From: matteo [mailto:matt@web]On Behalf Of Matthieu Paindavoine
Sent: Thursday, June 14, 2001 10:00 PM
To: [EMAIL PROTECTED]
Subject: Collapsing queries


Hello,

I am relatively new with MySQL (and SQL for that matter) and I couldn't
find much reference to my problem in earlier posts.

Let's say I have 2 tables,

CONTENT: msg_id, msg_text

ADDRESS: msg_id, address

and I receive the msg Hello World addressed to the twins Foo and Bar.
now my tables look like this:

CONTENT:

1   Hello World

ADDRESS:

1   Foo
1   Bar

I am desperatly looking for a sql statement that would produce

1   |   Hello World |   Foo, Bar

Is there such a thing??

I welcome any suggestions,

Thanks

Matthieu

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

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 with compiling mysql 3.23.39

2001-06-15 Thread De Clercq Eddy

Hi,

I've tried to compile mysql 3.23.39. I did a  CFLAGS=-O3 CXX=gcc
CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti ./configure
--prefix=/usr/local/mysql --enable-assembler
--with-mysqld-ldflags=-all-static and this gave no errors.
It fails at the make: 

Making all in client
c++ -DUNDEF_THREADS_HACK -I./../include
-I../include -I./.. -I..-I..-O3
-DDBUG_OFF -O3 -felide-constructors -fno-exceptions -fno-rtti
-fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_CURSES_H
-I/home/test/mysql-3.23.39/include -DHAVE_RWLOCK_T -c mysql.cc
In file included from mysql.cc:53:
/opt/sfw/include/curses.h:96: declaration does not declare anything
*** Error code 1
make: Fatal error: Command failed for target `mysql.o'
Current working directory /home/test/mysql-3.23.39/client
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /home/test/mysql-3.23.39
*** Error code 1
make: Fatal error: Command failed for target `all-recursive-am'

This is the mysqlbug info:

Description:
precise description of the problem (multiple lines)
How-To-Repeat:
code/input/activities to reproduce the problem (multiple lines)
Fix:
how to correct or work around the problem, if known (multiple
lines)

Submitter-Id:  submitter ID
Originator:
Organization:
 organization of PR author (multiple lines)
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  synopsis of the problem (one line)
Severity:  [ non-critical | serious | critical ] (one line)
Priority:  [ low | medium | high ] (one line)
Category:  mysql
Class: [ sw-bug | doc-bug | change-request | support ] (one line)
Release:   mysql-3.23.39 (Source distribution)

Environment:
machine, os, target, libraries (multiple lines)
System: SunOS area42 5.8 Generic_108528-05 sun4u sparc SUNW,Ultra-4
Architecture: sun4

Some paths:  /bin/perl /usr/ccs/bin/make /opt/sfw/bin/gmake /opt/sfw/bin/gcc
/usr/local/bin/cc
GCC: Reading specs from
/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
LIBC:
-rw-r--r--   1 root bin  1754016 Nov 23  2000 /lib/libc.a
lrwxrwxrwx   1 root root  11 Apr  3 07:28 /lib/libc.so -
./libc.so.1
-rwxr-xr-x   1 root bin  1129948 Nov 23  2000 /lib/libc.so.1
-rw-r--r--   1 root bin  1754016 Nov 23  2000 /usr/lib/libc.a
lrwxrwxrwx   1 root root  11 Apr  3 07:28 /usr/lib/libc.so -
./libc.so.1
-rwxr-xr-x   1 root bin  1129948 Nov 23  2000 /usr/lib/libc.so.1
Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock
--with-low-memory --with-mit-threads=yes --without-perl --enable-th
read-safe-client --with-berkeley-db --with-innodb


Can you help me please?

Greetz,

___

Eddy De Clercq
IT EMEA Intranet Team Leader

UUNET - a WorldCom Company
Culliganlaan 2, H
B-1831 Diegem
Belgium

Tel: +32 (0)2 404 60 00
Fax: +32 (0)2 404 60 05
Email: [EMAIL PROTECTED]
http://www.be.uu.net/



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

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




RE: Problem with compiling mysql 3.23.39

2001-06-15 Thread De Clercq Eddy

Hi, I forget the last line of the report:
Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock
--with-low-memory --with-mit-threads=yes --without-perl --enable-th
read-safe-client --with-berkeley-db --with-innodb
Perl: This is perl, version 5.005_03 built for sun4-solaris

Greetz,

___

Eddy De Clercq
IT EMEA Intranet Team Leader

UUNET - a WorldCom Company
Culliganlaan 2, H
B-1831 Diegem
Belgium

Tel: +32 (0)2 404 60 00
Fax: +32 (0)2 404 60 05
Email: [EMAIL PROTECTED]
http://www.be.uu.net/


 -Original Message-
 From: De Clercq Eddy 
 Sent: vrijdag 15 juni 2001 9:55
 To:   '[EMAIL PROTECTED]'
 Subject:  Problem with compiling mysql 3.23.39
 
 Hi,
 
 I've tried to compile mysql 3.23.39. I did a  CFLAGS=-O3 CXX=gcc
 CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti ./configure
 --prefix=/usr/local/mysql --enable-assembler
 --with-mysqld-ldflags=-all-static and this gave no errors.
 It fails at the make: 
 
 Making all in client
 c++ -DUNDEF_THREADS_HACK -I./../include
 -I../include -I./.. -I..-I..-O3
 -DDBUG_OFF -O3 -felide-constructors -fno-exceptions -fno-rtti
 -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_CURSES_H
 -I/home/test/mysql-3.23.39/include -DHAVE_RWLOCK_T -c mysql.cc
 In file included from mysql.cc:53:
 /opt/sfw/include/curses.h:96: declaration does not declare anything
 *** Error code 1
 make: Fatal error: Command failed for target `mysql.o'
 Current working directory /home/test/mysql-3.23.39/client
 *** Error code 1
 make: Fatal error: Command failed for target `all-recursive'
 Current working directory /home/test/mysql-3.23.39
 *** Error code 1
 make: Fatal error: Command failed for target `all-recursive-am'
 
 This is the mysqlbug info:
 
 Description:
 precise description of the problem (multiple lines)
 How-To-Repeat:
 code/input/activities to reproduce the problem (multiple lines)
 Fix:
 how to correct or work around the problem, if known (multiple
 lines)
 
 Submitter-Id:  submitter ID
 Originator:
 Organization:
  organization of PR author (multiple lines)
 MySQL support: [none | licence | email support | extended email support ]
 Synopsis:  synopsis of the problem (one line)
 Severity:  [ non-critical | serious | critical ] (one line)
 Priority:  [ low | medium | high ] (one line)
 Category:  mysql
 Class: [ sw-bug | doc-bug | change-request | support ] (one
 line)
 Release:   mysql-3.23.39 (Source distribution)
 
 Environment:
 machine, os, target, libraries (multiple lines)
 System: SunOS area42 5.8 Generic_108528-05 sun4u sparc SUNW,Ultra-4
 Architecture: sun4
 
 Some paths:  /bin/perl /usr/ccs/bin/make /opt/sfw/bin/gmake
 /opt/sfw/bin/gcc /usr/local/bin/cc
 GCC: Reading specs from
 /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
 gcc version 2.95.2 19991024 (release)
 Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
 LIBC:
 -rw-r--r--   1 root bin  1754016 Nov 23  2000 /lib/libc.a
 lrwxrwxrwx   1 root root  11 Apr  3 07:28 /lib/libc.so -
 ./libc.so.1
 -rwxr-xr-x   1 root bin  1129948 Nov 23  2000 /lib/libc.so.1
 -rw-r--r--   1 root bin  1754016 Nov 23  2000 /usr/lib/libc.a
 lrwxrwxrwx   1 root root  11 Apr  3 07:28 /usr/lib/libc.so -
 ./libc.so.1
 -rwxr-xr-x   1 root bin  1129948 Nov 23  2000 /usr/lib/libc.so.1
 Configure command: ./configure
 --with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory
 --with-mit-threads=yes --without-perl --enable-th
 read-safe-client --with-berkeley-db --with-innodb
 
 
 Can you help me please?
 
 Greetz,
 
 ___
 
 Eddy De Clercq
 IT EMEA Intranet Team Leader
 
 UUNET - a WorldCom Company
 Culliganlaan 2, H
 B-1831 Diegem
 Belgium
 
 Tel: +32 (0)2 404 60 00
 Fax: +32 (0)2 404 60 05
 Email: [EMAIL PROTECTED]
 http://www.be.uu.net/
 
 

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

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




Re: MySQL 4

2001-06-15 Thread Nessi


Hi

I am not sure if you mean what I am thinking you mean.
Lets say you have several input fields and you only
want the output where ALL entries apply, you can manage that
with the IF(match...against(), IF(match...against,0,0),0,0) -something like
that - clause.
At least thats worked for me.
Its a bit messy but I am sure you could get it to work even
if you have only one input field: you just need to make up a spacer
and get the seperate words in the input (ie you could use + as spacer
and then use explode() function).
If this sounds confusing or you need more details let me know
and Ill send an example of my select query.

Cheers, Nessi



Darn I keep having probs with this mailing list :((

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

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




Re: Error 127?

2001-06-15 Thread Greg Cope

Cesar Cabrera wrote:
 
 Hello and thanks,
 
 can you tell me where can I get information about the errors
 presented by MySQL? I have that kind of trouble each time the server (the
 machine) crash and it's no solved after myisamchk with any option.
 

a) perror [error number]
b) MySQL manual
c) What have you done with myisamcheck and have you tried either -r or
-o as arguments - Read the very good manual if if do not know what these
do.

Greg



 thanks again,
 
 Cesar A. Cabrera E.
 --
 'http://www.utp.edu.co/Lince/'
 
 On Thu, 14 Jun 2001, Eric Persson wrote:
 
  It sounds like your table have been corrupt, this can result in data
  loss. Try using isamchk to fix the problem.
 
  //Eric
 
  Cesar Cabrera wrote:
  
   Hello,
  
   what means an error 127 from table handler and an error 1030?
  
   where can I get documentation from that issues?
  
   Thanks for any help you can give me,
  
   Cesar A. Cabrera E.
   --
   'http://www.utp.edu.co/Lince/
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   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




Regarding non-functionality of query in mysql under linux

2001-06-15 Thread Veerapuram Satakopan

Respected Sir,

I am working as a System Analyst for Topworld Inftech, India.  We are using php-mysql 
for our web based projects.  I found a problem while i am using the following Query.

SQL-query: 

select distinctrow c.name, p.cat_id, p.prd_id, p.name, p.description, p.title, p.price
from categories c inner join(products p left join(products a 
left join products b on a.prd_id = b.prd_id)on p.prd_id = a.prd_id) 
on c.cat_id = p.cat_id where lower(p.name) like lower('%a%') or 
lower(a.title) like lower('%a%') or lower(b.description) 
like lower('%a%');


Error 
You have an error in your SQL syntax near 'inner join(products p left join(products a 
left join products b on a.prd_id = ' at line 2



Can u tell me how to solve this problem.  Waiting eagerly for your reply.


With Regards,

V.Satakopan,
System Analyst,
Topworld Inftech,
No.1, Santhome High Road,
Chennai - 600 004,
Tamil Nadu,
India.



RE: how do I do this

2001-06-15 Thread Adrian D'Costa

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 14 Jun 2001, Dinkler, Fred wrote:

 Unclear as to your intent, e.g. what does 'replace mean?  
 This SQL will display the id and hotel name for those hotels in the travel
 table.

Ok, the hotel table holds the hotel names and the travel.nome_hotel also
hold the table name (why? becuase the client need it that time).  Now I
create the hotel table and dumped all the hotel names from the travel
table to the hotel table.  Now that is done I need to remove the the hotel
names from the travel.nome_hotel and give them the corresponding id from
the hotel table.  I was thinking something like this

update travel set nome_hotel=hotel.id where
hotel.hotelname=travel.nome_hotel.

It does not work.  What would be the corret way?


  
 SELECT t.id, h.hotelname from travel t, hotel h where t.nome_hotel =
 h.hotelname;

This will just display the rows.  I need to update the travel table with
the id of hotel table based on the hotel names being the same.

TIA

Adrian


 
 -Original Message-
 From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 14, 2001 1:49 AM
 To: Mysql Mailing List
 Subject: how do I do this
 
 
 Hi,
 
 I have two table: 
 
 mysql select * from hotel limit 10
 - ;
 +++
 | id | hotelname  |
 +++
 |  1 | Adams Beach|
 |  2 | Aegean Village |
 |  3 | Angela |
 |  4 | App. in Ayja   |
 |  5 | Apt Alfaga |
 |  6 | Apt. Central Playa |
 |  7 | Arabia Beach   |
 |  8 | Asterias Beach |
 |  9 | Baron  |
 | 10 | Bel Air|
 +++
 
 and travel
 
 +-+
 | nome_hotel  |
 +-+
 | Vol seul|
 | Carina  |
 | Relax   |
 | Mistral |
 | Esperides Beach |
 | Vol seul|
 | Angela  |
 | Marmari Beach   |
 | Summer Palace   |
 | Aegean Village  |
 +-+
 
 What I want to do is replace the nome_hotel field with the ids of the
 hotel table for names that match the hotel.hotelname in the
 travel.nome_hotel.  How do I do this.
 
 TIA
 
 Adrian
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7Kcqz/f1mUNueu/oRAj9lAKCm6/oRkK12ApKACkYw/m7tyUijCwCgj1R5
6vTrU6rOotFVaOsCeF1zMWw=
=VYdY
-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




mysql died with innodb

2001-06-15 Thread Sven Huster

hi

i got this on my mysql server (any ideas?):

InnoDB: Assertion failure in thread 234323968 in file os0file.c line 637
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=134213632
record_buffer=2093056
sort_buffer=2097144
max_used_connections=121
max_connections=360
threads_connected=106
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 1604185 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

010615 08:09:27  mysqld ended

System: FreeBSD 4.3-RELEASE
MySQL: MySQL-Max-3.23.39 over nfs

thanks
regards
Sven


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

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




Re: auto_increment update

2001-06-15 Thread Sven Huster

On Thu, Jun 14, 2001 at 07:30:01PM -0500, Paul DuBois wrote:
 *This message was transferred with a trial version of CommuniGate(tm) Pro*
 At 1:36 AM +0200 6/15/01, Sven Huster wrote:
 Hi there
 
 can i somehow easily recreate the auto_increment col if is was not
 correctly set?
 i just recognized that most rows contain 1 cause the primary key was
 set
 on the auto_increment col + another one.
 so mysql only creates a entry  1 if the other field was equal to
 another row.

 Well, that's what's supposed to happen if you have a primary key
 or unique key on multiple columns where the last column is an
 AUTO_INCREMENT value.  If you want your AUTO_INCREMENT column
 to have unique values for each row, then you could drop that
 index and set up a PRIMARY KEY on just the AUTO_INCREMENT column.

 Actually, I'm not sure I understand what you want to do, so I'm
 just guessing.  If that doesn't answer your question, please
 clarify.

Hi

i want to fix the auto_increment col to have unique entries, but if i drop
the index
there are double entries in for the col, so i dont think it works just by
dropping the
key.
there is data in the table that i dont want to loose.

regards
sven


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

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




QUERY IN C LANGUAGE

2001-06-15 Thread Alessandro Coppelli

Hi to all.  I have this  simple function :

int  process_query (MYSQL *conn, char *query){

if (mysql_query (conn, query) != 0)
return(0);

 return(1);
}

and in the main   :

  errore = process_query (conn, INSERT INTO PubblicheAmministrazioni
VALUES('RagioneSociale','IndirizzoPA','PersonaRiferimentoNome','PersonaRiferimentoCognome',

'PersonaRiferimentoIndirizzo','PersonaRiferimentoTelefono','PersonaRiferimentoFax',

'PersonaRiferimentoEMail','Spesa','Contatori','indirizzo1','spesa1',
'indirizzo2','spesa2', 'indirizzo3','spesa3', 'indirizzo4','spesa4',
'indirizzo5','spesa5', 'indirizzo6','spesa6', 'indirizzo7','spesa7',
'indirizzo8','spesa8', 'indirizzo9','spesa9', 'indirizzo10','spesa10',
'indirizzo11','spesa11', 'indirizzo12','spesa12',
'indirizzo13','spesa13', 'indirizzo14','spesa14',
'indirizzo15','spesa15', 'indirizzo16','spesa16',
'indirizzo17','spesa17', 'indirizzo18','spesa18',
'indirizzo19','spesa19',
'indirizzo20','spesa20','indirizzo21','spesa21',
'indirizzo22','spesa22', 'indirizzo23','spesa23',
'indirizzo24','spesa24', 'indirizzo25','spesa25'));

 It's long ?  It's form corrects ; I get always error from function .
 Any idea ?


 Alessandro



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

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




Re: apache/php/modperl incomp?

2001-06-15 Thread Greg


Le jeudi 14 juin 2001, à 08:14, Daniel a écrit :

 I believe that i've seen this on the list before.
 Read the php docs before compiling, don't use the builtin mysql support,
 specify --with-mysql=/path/to/mysqllibs
Yes, I've compiled with this option. Is it possible that it doesn't 
actually use this parameter ?

Greg

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

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




Re: MySQL 3.23.39 released

2001-06-15 Thread Michael Widenius


Hi!

 Steven == Steven Roussey [EMAIL PROTECTED] writes:

Steven Changes in release 3.23.39
Steven --

Steven* Fixed problem with shutdown when `INSERT DELAYED' was waiting for
Steven  a `LOCK TABLE'.

Steven* Running `myisamchk --fast --force' will no longer repair tables
Steven  that only had the open count wrong.
Steven --

Steven THANK YOU! You don't know what it was for the first item to require a forced
Steven shutdown that made myisamchk take a huge amount of time. Although we have
Steven not had the need for a `myisamchk --fast --force' in a while, I tell you if
Steven you had a big fulltext index, you would avoid it like the plague.

Steven Now I have a question: Does this also apply to automatic repair inside
Steven mysqld? I'd finally use the feature if its true...


If you just run CHECK TABLE, it will repair the open count (it should
always have done that).

myisamchk --fast --force is equal to:

run CHECK TABLE on all tables
Run REPAIR TABLE on tables which was not marked as ok.

Regards,
Monty

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

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




mysql.sock

2001-06-15 Thread Marek Mahdal

Hi,
  I have a  problem with MySQL.
I am running Redhat Linux 6.1, MySQL 3.23.38 and PHP 4.0.
The command line client mysql is working perfectly. But if i try to connect to the 
MySQL server from a web site using PHP I get this error message:

Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (111) in /web/domains/allegro-viatatry/index.php on line 3

In the index.php I am using the same code I used on other machine, with the same 
parameters, and it worked. I looked into the /tmp directory. There is no file named
'mysql.sock'.

Please help.

Thank you.   Marek Mahdal, Slovakia



Why not use indexes?

2001-06-15 Thread Andrey Kotrekhov

Hi
I have index on field dstn
But query
select sum(usd) from fin_journal where dstn like 'O%' AND
date='2001-06-01 00:00:00' AND date'2001-07-01 00:00:00' AND descr IN
('abonplata POP3', 'registration POP3') group by dstn,dsuba,ident ;
don't use in.
In manual I found than indexes are using in LIKE
How can I see that index is used?


explain select sum(usd) from fin_journal where dstn like 'O%' AND
date='2001-06-01 00:00:00' AND date'2001-07-01 00:00:00' AND descr IN
('abonplata POP3', 'registration POP3') group by dstn,dsuba,ident ;
+-+--+---+--+-+--+---+-+
| table   | type | possible_keys | key  | key_len | ref  | rows  |
Extra   |
+-+--+---+--+-+--+---+-+
| fin_journal | ALL  | dstn  | NULL |NULL | NULL | 39797 |
where used; Using temporary |
+-+--+---+--+-+--+---+-+

If I see possible_keys-dstn, is this indes in use?


mysql
show index from fin_journal;
+-++--+--+-+---+-+--++-+
| Table   | Non_unique | Key_name | Seq_in_index | Column_name |
Collation | Cardinality | Sub_part | Packed | Comment |
+-++--+--+-+---+-+--++-+
| fin_journal |  1 | KEY1 |1 | d   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | KEY1 |2 | dstn| A
|NULL | NULL | NULL   | |
| fin_journal |  1 | KEY2 |1 | d   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | KEY2 |2 | dsuba   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | KEY3 |1 | c   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | KEY3 |2 | cstn| A
|NULL | NULL | NULL   | |
| fin_journal |  1 | KEY4 |1 | c   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | KEY4 |2 | csuba   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | k_sesid  |1 | sesid   | A
   NULL | NULL | NULL   | |
| fin_journal |  1 | dsuba|1 | dsuba   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | ident|1 | ident   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | csuba|1 | csuba   | A
|NULL | NULL | NULL   | |
| fin_journal |  1 | dstn |1 | dstn| A
|NULL | NULL | NULL   | |
+-++--+--+-+---+-+--++-+

___
Andrey Kotrekhov [EMAIL PROTECTED]


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

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




mysql.sock

2001-06-15 Thread Marek Mahdal

Hi,
  I have a  problem with MySQL.
I am running Redhat Linux 6.1, MySQL 3.23.38 and PHP 4.0.
The command line client mysql is working perfectly. But if i try to connect to the 
MySQL server from a web site using PHP I get this error message:
 
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (111) in /web/domains/allegro-viatatry/index.php on line 3

In the index.php I am using the same code I used on other machine, with the same 
parameters, and it worked. I looked into the /tmp directory. There is no file named
'mysql.sock'.
 
Please help.
 
Thank you.   Marek Mahdal, Slovakia



Re: Regarding non-functionality of query in mysql under linux

2001-06-15 Thread Van

Veerapuram Satakopan wrote:
 
 Respected Sir,
 
 I am working as a System Analyst for Topworld Inftech, India.  We are using 
php-mysql for our web based projects.  I found a problem while i am using the 
following Query.
 
 SQL-query:
 
 select distinctrow c.name, p.cat_id, p.prd_id, p.name, p.description, p.title, 
p.price
 from categories c inner join(products p left join(products a
 left join products b on a.prd_id = b.prd_id)on p.prd_id = a.prd_id)
 on c.cat_id = p.cat_id where lower(p.name) like lower('%a%') or
 lower(a.title) like lower('%a%') or lower(b.description)
 like lower('%a%');
 
 Error
 You have an error in your SQL syntax near 'inner join(products p left join(products 
a left join products b on a.prd_id = ' at line 2
 
 Can u tell me how to solve this problem.  Waiting eagerly for your reply.
 
 With Regards,
 
 V.Satakopan,
 System Analyst,
 Topworld Inftech,
 No.1, Santhome High Road,
 Chennai - 600 004,
 Tamil Nadu,
 India.

Veerapuram:

What's the possibility you could set your clock correctly?

We appear to be in the year 2001, although that probably has little to do with
the issue you've reported.

Inner join requires the ON keyword:

 from categories c inner join(products p left join(products a


If the above could possibly work, it would have to be:
from categories c inner join on products p left join(products a...

You might have some other issues with your query.

It's typically more useful to capitalize reserved words and Ucase query terms.  

Recommendation:
SELECT ThisField, ThatField
FROM ThisTable
ORDER BY SomeArbitraryField;

Less useful:
select thisfield, thatfield
fromt hisfield
order by somearbitraryfield;

Perhaps the difference between the above 2 statements makes it obvious.  Or,
perhaps you didn't note the deliberate mistake. 

MySQL will honor capitalization in it's error messages.  

Possible self-help remedies might be found at:
http://www.mysql.com/doc/J/O/JOIN.html

Regards,
Van
-- 
=
Linux rocks!!!   http://www.dedserius.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: Multiple CPU's in Freebsd

2001-06-15 Thread Sinisa Milivojevic

Rafael Martinez writes:
 
 Hello
 
 First of all, thank you to everybody who came with good suggestions and
 fixes. I have the 4xCpu machine with freebsd and mysql using all of then,
 and it looks pretty good :-) (we'll see when I finish testing it ;-) ).
 
 One idea will be to put this information in the Mysql-manual so
 anybody who ones to install/compile from source in freebsd can do it without the
 problems we have had.
 
 Sincerely
 rafael Martinez
 
 
 


We have known about LinuxThreads option on FreeBSD, but it was not
stable for quite some time.

When it becomes feasible to build MySQL on the off-shelf FreeBSD, we
shall come up with configure that will automatically use it.

Meanwhile, yes, we shall inlude a necessary info in our manual.


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   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




Problems with Fulltext query

2001-06-15 Thread Martin Kjeldsen

Hi,

I have some problems with the Fulltext query it doesn't
seem to function as I aspect. E.g. I have a table with a
Fulltext index on columns title and description.

If I query for:
SELECT node_id, title FROM node WHERE MATCH (title,description)
AGAINST('bil');
(bil is car in Danish) it doesn't get any results back. It's not because
'bil' is a stop word and it cannot be in more than 1% of the records (I've
tried
to query like this WHERE (title LIKE '%bil%' OR description LIKE '%bil%')
and
came up with a lot of hits but not nearly halve).

Shouldn't a match against a description like this
'Find butikker på nettet indenfor kategorier som tøj, møbler, have, smykker,
hobby og bil m.fl.'

or a title like this 'Bolig, Have  Bil'.

Any help is very much appreciated.

Martin Kjeldsen


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

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




BCP

2001-06-15 Thread Van Wyk

Hi, I am doing some development testing in PHP and MySQL. I have already
bulk copied some data from a Sybase table into a comma sep file.

My question.: How can I get this data into MySql so that I can test the
speed.
I am working on Win95  for now but intend porting everything to Sun Sol
by the end of the year. For now I need a dos version or equivelent of
BCP.EXE that will work with MySql. Is there something out there?
Please help. I am hopeing to get started tonight. Hopefully be Sunday I
can have done a decent load test.

Will let you know the results if you ask.

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


Lost connection to MySQL server during query

2001-06-15 Thread MikemickaloBlezien

Hello All,

I frequently get this error message.
Seems it has to do with number of open tables bigger than 10?? 
Do I have a bad setup?? please verify my setup file at the end. I think I
exaggerated the memory, it only uses 4 Megabytes anyway.


bash-2.01$ mysqladmin -i 5 status
Uptime: 174 Threads: 1 Questions: 821 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 179 Threads: 1 Questions: 846 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Lost connection to MySQL server during query
Uptime: 9 Threads: 1 Questions: 59 Slow queries: 0 Opens: 11
Flush tables:
1 Open tables: 7
Uptime: 14 Threads: 1 Questions: 59 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 19 Threads: 1 Questions: 104 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 24 Threads: 1 Questions: 104 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 29 Threads: 2 Questions: 122 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 34 Threads: 1 Questions: 130 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 39 Threads: 1 Questions: 152 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 44 Threads: 1 Questions: 182 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 49 Threads: 1 Questions: 182 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 54 Threads: 1 Questions: 182 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 60 Threads: 2 Questions: 203 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 65 Threads: 1 Questions: 236 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 70 Threads: 1 Questions: 236 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 75 Threads: 1 Questions: 267 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 80 Threads: 1 Questions: 277 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 85 Threads: 2 Questions: 280 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 90 Threads: 2 Questions: 393 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 95 Threads: 2 Questions: 450 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 100 Threads: 1 Questions: 462 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 105 Threads: 2 Questions: 470 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 110 Threads: 1 Questions: 495 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 115 Threads: 1 Questions: 531 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 120 Threads: 1 Questions: 531 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 125 Threads: 1 Questions: 558 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 130 Threads: 2 Questions: 592 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 135 Threads: 3 Questions: 712 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 140 Threads: 4 Questions: 896 Slow queries: 0 Opens: 13
Flush
tables: 1 Open tables: 9
Uptime: 146 Threads: 3 Questions: 1037 Slow queries: 0 Opens: 13
Flush
tables: 1 Open tables: 9
Uptime: 151 Threads: 4 Questions: 1130 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 156 Threads: 4 Questions: 1266 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 161 Threads: 3 Questions: 1418 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 166 Threads: 2 Questions: 1475 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 171 Threads: 1 Questions: 1485 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 176 Threads: 1 Questions: 1509 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Lost connection to MySQL server during query
  

java driver

2001-06-15 Thread Michael Garthwaite

I'm new to mysql and relatively new to java. I've downloaded a type 4 driver from 
mm.mysql. I've put the folder containing the driver in my classpath and included the 
driver in my code as per the instructions as follows:

try{
Class.forName(org.gjt.mm.mysql.Driver);
}

The problem is that though the code compiles it throws a ClassNotFoundException when I 
try to run it. For some reason the driver is not found. I'm probably missing something 
really obvious but can anyone help me with this.

Michael





Fw: Adding data to Mysql from VB6 front end

2001-06-15 Thread jaydeep/vishwas


- Original Message - 
From: jaydeep/vishwas 
To: [EMAIL PROTECTED] 
Sent: Friday, June 15, 2001 4:55 PM
Subject: Adding data to Mysql from VB6 front end


Dear Sir/Ms.,

I am trying to add data to tables in Mysql. I am using VB6 as front end tool.
MY problem is:
that when i am trying to enter the data from front end to the colunm having Varchar 
it is
taking null value from front end.
i had used these command
mysqlcreate table table_name (col_1 varchar(25) not null,col_2 int(6));

The table gets created,however,  if i am trying to enter the data from front end,in an 
empty table,
my data is not get stored in to the table in case varchar or char but
it works for integer or float.

On the other hand when I enter the data throuhg the backend directly, then it is 
taking data in the varcha of char columns.

Infact when I enter the first recordset through the backend and the rest of the 
records through the front end, then it allows it but the column width is restricted to 
the first entry through the backend in case of varchar and char.

Please help on how I can add data from the front end.

Thanks and Regards,
Manish Poddar





REF - Lost connection to MySQL server during query

2001-06-15 Thread MikemickaloBlezien


Just wanted to add:

it always loses connection when uptime=180
it restarts every 180 seconds?? the uptime count starts again at 0, so does the
query count.

Hello All,

I frequently get this error message.
Seems it has to do with number of open tables bigger than 10?? 
Do I have a bad setup?? please verify my setup file at the end. I think I
exaggerated the memory, it only uses 4 Megabytes anyway.


bash-2.01$ mysqladmin -i 5 status
Uptime: 174 Threads: 1 Questions: 821 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 179 Threads: 1 Questions: 846 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Lost connection to MySQL server during query
Uptime: 9 Threads: 1 Questions: 59 Slow queries: 0 Opens: 11
Flush tables:
1 Open tables: 7
Uptime: 14 Threads: 1 Questions: 59 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 19 Threads: 1 Questions: 104 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 24 Threads: 1 Questions: 104 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 29 Threads: 2 Questions: 122 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 34 Threads: 1 Questions: 130 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 39 Threads: 1 Questions: 152 Slow queries: 0 Opens: 11
Flush
tables: 1 Open tables: 7
Uptime: 44 Threads: 1 Questions: 182 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 49 Threads: 1 Questions: 182 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 54 Threads: 1 Questions: 182 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 60 Threads: 2 Questions: 203 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 65 Threads: 1 Questions: 236 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 70 Threads: 1 Questions: 236 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 75 Threads: 1 Questions: 267 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 80 Threads: 1 Questions: 277 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 85 Threads: 2 Questions: 280 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 90 Threads: 2 Questions: 393 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 95 Threads: 2 Questions: 450 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 100 Threads: 1 Questions: 462 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 105 Threads: 2 Questions: 470 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 110 Threads: 1 Questions: 495 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 115 Threads: 1 Questions: 531 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 120 Threads: 1 Questions: 531 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 125 Threads: 1 Questions: 558 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 130 Threads: 2 Questions: 592 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 135 Threads: 3 Questions: 712 Slow queries: 0 Opens: 12
Flush
tables: 1 Open tables: 8
Uptime: 140 Threads: 4 Questions: 896 Slow queries: 0 Opens: 13
Flush
tables: 1 Open tables: 9
Uptime: 146 Threads: 3 Questions: 1037 Slow queries: 0 Opens: 13
Flush
tables: 1 Open tables: 9
Uptime: 151 Threads: 4 Questions: 1130 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 156 Threads: 4 Questions: 1266 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 161 Threads: 3 Questions: 1418 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 166 Threads: 2 Questions: 1475 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 171 Threads: 1 Questions: 1485 Slow queries: 0 Opens: 14
Flush
tables: 1 Open tables: 10
Uptime: 176 Threads: 1 

Re: load-balancing with NFS

2001-06-15 Thread harm

On Fri, Jun 15, 2001 at 09:54:32AM +0200, Wouter de Jong wrote:
 On Thu, Jun 14, 2001 at 05:05:56PM -0700, Justin Bauer wrote:
  You can do load balancing, you just need to have the same information on
  each server.  With mysql you would use Replication to keep the servers
  sync'ed.
 
 Well, then you'd have to do 2way replication. And that doesn't work great with 
AUTO_INCREMENT fields, etc AFAIK : And since I have no way of controlling query's 
(it's a database-server for our customers), I don't think that's going to 
work...*argh* :

What`s wrong with the most obvious way:
database1.widexs.nl
database2.widexs.nl
database3.widexs.nl

?
Just tell them on which server there dbaseaccount lives and they are happy.
But that`s probably the way it is right now.


Just curious,

Harmen


As far as i know, DON'T DO THIS
mysql with serveral instances accessing the same database will not work
as expected.
   
check
http://www.mysql.com/doc/M/u/Multiple_servers.html
  
   Thanks, I'll skip the plan. No load-balancing for me thus :
  
we run mysql over nfs but only with one instance.
seems to be quite stable (db server freebsd - nfs server netapp filer)

-- 
   The Moon is Waning Crescent (37% of Full)
  nieuw.nl - 2dehands.nl

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

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 only create 127 records in a table :o(

2001-06-15 Thread Mette Møller Madsen

Hi there!

When I try to insert more than 127 rows/records in a table I get this error:

ERROR 1062: Duplicate entry '127' for key 1
(the key is an auto incremented primary key)

Does anyone know how to store _more_ than 127 rows in a table?

My guess is that I need to change to settings of my db, but I cannot find
anything in the manual. (I'm running version 3.23.38 which should be a
stable one.)

best regards,
Mette Madsen


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

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




Re: Relationships???

2001-06-15 Thread Pat Sherrill

Referential integrity should be maintained by the program (programmer) using
the file handler/database.

We design all of our schemas with a Parent/Child hierarchy in mind.  We
always have a unique key and there is always a column or key in common where
any relationship exists or could exist between tables.

Consider an invoice with a 1-many relationship.  Header information
regarding the sold to, ship to, etc.. and the Detail containing the items,
quantity, etc... . These two tables would have an invoice number
field/column in common.  The program used to Add,Edit,Delete would enforce
the relationship, thereby, maintaining referential integrity.

The concept of a DBA (read 'not a programmer') attempting to enforce
referential integrity by pure schema design without consideration of the
applications designed to use the data or the unlimited creativity of the
end-user at the keyboard over simplifies the process and itself imposes data
integrity questions.

Pat...
.
- Original Message -
From: Rolf Hopkins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 9:28 PM
Subject: Re: Relationships???


 If you are really after referential integrity then perhaps you should
 consider another database or you could always modify the code.

 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, June 15, 2001 8:32
 Subject: Relationships???


  Hello all,
 
  Without explicitly creating foreign keys, what is the most common method
 to
  create a truly relational database that enforces referential integrity?
 
  Any responses to this question are greatly appreciated!
 
  Sincerely,
 
  N. Silverwise
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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

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



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

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




MySQL rpl000001.test run indefinitely on Mac OS X 10.0.3

2001-06-15 Thread Joël Brogniart


 %dead.mysqlbug
 dead.mysqlbug

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

To 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 only create 127 records in a table :o(

2001-06-15 Thread David Lidström ( Cabesa )


 most probable is that the auto-inc field is of a type
 that will not allow higher values than 127!!
 What is the field-type?

\d

-Original Message-
From: Mette Møller Madsen [mailto:[EMAIL PROTECTED]]
Sent: den 15 juni 2001 13:46
To: mysql listserver
Subject: Can only create 127 records in a table :o(


Hi there!

When I try to insert more than 127 rows/records in a table I get this error:

ERROR 1062: Duplicate entry '127' for key 1
(the key is an auto incremented primary key)

Does anyone know how to store _more_ than 127 rows in a table?

My guess is that I need to change to settings of my db, but I cannot find
anything in the manual. (I'm running version 3.23.38 which should be a
stable one.)

best regards,
Mette Madsen


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

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:mysql died with innodb

2001-06-15 Thread Heikki Tuuri

Sven,

line 637 in mysql/innobase/os/os0file.c asserts that

TRUE == os_file_flush(file)

If you look at about line 557, you see how InnoDB does
the file flush: the default is to call fdatasync.

To solve the problem we should look at the NFS manuals
about what Unix functions are available in it. Maybe there
is some special NFS_fsync?

Did it crash immediately you started using it? What is
my.cnf like?

Regards,

Heikki

-Original Message-
From: Sven Huster [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Friday, June 15, 2001 11:32 AM
Subject: mysql died with innodb


hi

i got this on my mysql server (any ideas?):

InnoDB: Assertion failure in thread 234323968 in file os0file.c line 637
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=134213632
record_buffer=2093056
sort_buffer=2097144
max_used_connections=121
max_connections=360
threads_connected=106
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 1604185 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

010615 08:09:27  mysqld ended

System: FreeBSD 4.3-RELEASE
MySQL: MySQL-Max-3.23.39 over nfs

thanks
regards
Sven



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

To 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 only create 127 records in a table :o(

2001-06-15 Thread Bruce Stewart

Change the datatype of your primary key from TINYINT to something larger,
like SMALLINT, MEDIUMINT, or INT.


-Original Message-
From: Mette Møller Madsen [mailto:[EMAIL PROTECTED]]
Sent: Fri, 15 June 2001 13:46
To: mysql listserver
Subject: Can only create 127 records in a table :o(


Hi there!

When I try to insert more than 127 rows/records in a table I get this error:

ERROR 1062: Duplicate entry '127' for key 1
(the key is an auto incremented primary key)

Does anyone know how to store _more_ than 127 rows in a table?

My guess is that I need to change to settings of my db, but I cannot find
anything in the manual. (I'm running version 3.23.38 which should be a
stable one.)

best regards,
Mette Madsen


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

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



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

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




mysql@lists.mysql.com

2001-06-15 Thread Joël Brogniart

Description:
With mysql-test-run when the rpl01.test is reached it run 
indefinately. I have to stop the test with ctrl-c.
On an iMac with MacOS X 10.0.3 and Apple developer tools 10.0.1, I 
download, untar, configure and make MySQL 3.23.39

begin terminal copy without all command output--
[dhcp-b25:~/Installations] brogniar% wget 
http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.39.tar.gz
[dhcp-b25:~/Installations] brogniar% tar xzf mysql-3.23.39.tar.gz
[dhcp-b25:~/Installations] brogniar% cd mysql-3.23.39
[dhcp-b25:~/Installations/mysql-3.23.39] brogniar% ./configure 
--prefix=/usr/local/mysql --with-extra-charsets=complex 
--with-server-suffix=-max --with-bdb --with-innodb 
--with-mysqld-user=mysql --with-debug
[dhcp-b25:~/Installations/mysql-3.23.39] brogniar% make
end terminal copy---

Then I test I and when the rpl01.test is run then it run 
indefinately. I have to stop the test with ctrl-c.

begin terminal copy-
[dhcp-b25:~/Installations/mysql-3.23.39] brogniar% cd mysql-test
[dhcp-b25:~/Installations/mysql-3.23.39/mysql-test] brogniar% 
./mysql-test-run --debug --local rpl01.test
Installing Test Databases
Removing Stale Files
Installing Master Databases
010614 16:03:05  ../sql/mysqld: Shutdown Complete

Installing Slave Databases
010614 16:03:05  ../sql/mysqld: Shutdown Complete

Starting MySQL daemon
Loading Standard Test Databases
Starting Tests

  TEST USER   SYSTEM  ELAPSEDRESULT

^C
[dhcp-b25:~/Installations/mysql-3.23.39/mysql-test] brogniar%
end terminal copy---

On other terminal window
before ctrl-c:

begin terminal copy-
[dhcp-b25:~] brogniar% ps -aux | grep mysql
brogniar  7717   0.0  0.2 1720744  p1  S+ 0:00.17 sh 
./mysql-test-run --debug --local rpl01.test
brogniar  7754   0.0  1.137568   3636  p1  S+ 0:02.08 
/Users/brogniar/Installations/mysql-3.23.39/sql/mysqld --no-defaults
brogniar  7757   0.0  0.515824   1708  p1  S+ 0:00.86 
/Users/brogniar/Installations/mysql-3.23.39/sql/mysqld --no-defaults
brogniar  7763   0.0  0.1 1252212  p1  S+ 0:00.01 time -p 
/Users/brogniar/Installations/mysql-3.23.39/client/mysqltest 
--no-defaults
brogniar  7764   0.0  0.3 2564980  p1  S+ 0:00.31 
/Users/brogniar/Installations/mysql-3.23.39/client/mysqltest 
--no-defaults
brogniar  7771   0.0  0.0 1084 96 std  U+ 0:00.01 grep mysql
end terminal copy---

after ctrl-c:

begin terminal copy-
[dhcp-b25:~] brogniar% ps -aux | grep mysql
brogniar  7754   0.0  1.137364   3604  p1  S  0:02.12 
/Users/brogniar/Installations/mysql-3.23.39/sql/mysqld --no-defaults
brogniar  7757   0.0  0.515756   1700  p1  S  0:00.87 
/Users/brogniar/Installations/mysql-3.23.39/sql/mysqld --no-defaults
brogniar  7773   0.0  0.0 5708 72 std  SV 0:00.00 grep mysql
[dhcp-b25:~] brogniar% kill -9 7754
[dhcp-b25:~] brogniar% kill -9 7757
[dhcp-b25:~] brogniar%
end terminal copy---

How-To-Repeat:
Fix:

Submitter-Id:
Originator:[EMAIL PROTECTED]
Organization:
Universite Lumiere - Lyon 2
MySQL support: none
Synopsis:
What do you mean with synopsis of the problem?
Severity:
serious
Priority:
Category:  mysql
Class:
sw-bug
Release:   mysql-3.23.39-max (Source distribution)

Environment:
System: Darwin dhcp-b25.univ-lyon2.fr 1.3.3 Darwin Kernel Version 
1.3.3: Fri May  4 13:46:54 PDT 2001; 
root:xnu/xnu-124.8.obj~1/RELEASE_PPC  Power Macintosh powerpc


Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/cc

Compilation info: CC='cc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC:


lrwxr-xr-x  1 root  wheel  15 Jun 15 10:23 /usr/lib/libc.dylib - 
libSystem.dylib
Configure command: ./configure  --prefix=/usr/local/mysql 
--with-extra-charsets=complex --with-server-suffix=-max --with-bdb 
--with-innodb --with-mysqld-user=mysql --with-debug

More info: I uploaded log and debug trace file to 
ftp://support.mysql.com/pub/mysql/secret/jb200106151343_report.tar.gz






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

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




ODP: Can only create 127 records in a table :o(

2001-06-15 Thread Daniel Las

Hi

WHat is your hardware configuration ?
I had such problem with Alpha/Linux (RedHat 5.2)

Regards

Daniel £aœ
e-direct Polska sp. z o.o.
WWW: http://www.e-direct.pl
E-mail: [EMAIL PROTECTED]
45-072 Opole ul. Reymonta 45
tel. +48 77 44 26 073
fax. +48 77 44 26 074

 -Oryginalna wiadomoϾ-
 Od: Mette Møller Madsen [mailto:[EMAIL PROTECTED]]
 Wys³ano: 15 czerwca 2001 13:46
 Do: mysql listserver
 Temat: Can only create 127 records in a table :o(


 Hi there!

 When I try to insert more than 127 rows/records in a table I get
 this error:

 ERROR 1062: Duplicate entry '127' for key 1
 (the key is an auto incremented primary key)

 Does anyone know how to store _more_ than 127 rows in a table?

 My guess is that I need to change to settings of my db, but I cannot find
 anything in the manual. (I'm running version 3.23.38 which should be a
 stable one.)

 best regards,
 Mette Madsen


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

 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: Mysql.com manual

2001-06-15 Thread Gerald Clark



Simon Chan wrote:

 Hey Everybody,
 
 I noticed that a lot of people experience problems when they try to start the mysql 
server by
 typing this:
 
 $  bin/safe_mysqld --user=mysql 
 
 In the Mysql/msql O'Reilly book, it says to type this to start the daemon:
 
 bin/safe_mysqld --log 
 
 I ran into problems with the first command as well.
 
 Anyone out there know why this is so?  Maybe someone from Mysql.com can answer.
 
 thanks
 
 simon
 

Maybe because mysql does not own its files and directories.

-- 
Gerald L. Clark
[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




fulltext index

2001-06-15 Thread Dvoek Michal

Hi

is possible to create FULLTEXT index on column which is varchar(100)
binary ???

trying this i got:
ERROR 1005: Can't create table './xxx/#sql-19b_444.frm' (errno: 140)

i need column which can be fulltext searchable and case-sensitive
(therefore column is binary)

i alter column to normal (deleted binary) and fulltext index created,
but i try search 'challenge' and got columnt which contains
'Challenge' and that's wrong for my application.


---
 Dvoøáèek Michal mailto:[EMAIL PROTECTED]



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

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




Re: Can only create 127 records in a table :o(

2001-06-15 Thread Rafal Jank

Mette Mller Madsen wrote:
 
 Hi there!
 
 When I try to insert more than 127 rows/records in a table I get this error:
 
 ERROR 1062: Duplicate entry '127' for key 1
 (the key is an auto incremented primary key)
 
Change type of your primary key column to something bigger than tinyint
-- 
_/_/  _/_/_/  - Rafa Jank [EMAIL PROTECTED] -
 _/  _/  _/  _/   _/ Wirtualna Polska SA   http://www.wp.pl 
  _/_/_/_/  _/_/_/ul. Uphagena 2, 80-237 Gdansk, tel/fax. (58) 5215625
   _/  _/  _/ ==*  http://szukaj.wp.pl *==--

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

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




Re: Can only create 127 records in a table :o(

2001-06-15 Thread Pat Sherrill

Check your AUTO_INCREMENT column.  You probably have it set to a TINYINT
(0-128). Use ALTER TABLE to change it to an INT or BIGINT.

I hope this helps.

Pat...

- Original Message -
From: Mette Møller Madsen [EMAIL PROTECTED]
To: mysql listserver [EMAIL PROTECTED]
Sent: Friday, June 15, 2001 7:46 AM
Subject: Can only create 127 records in a table :o(


 Hi there!

 When I try to insert more than 127 rows/records in a table I get this
error:

 ERROR 1062: Duplicate entry '127' for key 1
 (the key is an auto incremented primary key)

 Does anyone know how to store _more_ than 127 rows in a table?

 My guess is that I need to change to settings of my db, but I cannot find
 anything in the manual. (I'm running version 3.23.38 which should be a
 stable one.)

 best regards,
 Mette Madsen


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

 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




Stringifying MySQL C types

2001-06-15 Thread Jochen Wiedmann


Hi,

does the MySQL client library contain any support for
a proper stringification of the MySQL specific data
types like my_ulonglong? IMO they are depending on the
operating system and I should not use ltoa() or similar
functions.

Thanks,

Jochen

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

To 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 only create 127 records in a table :o(

2001-06-15 Thread Jon Haworth

Your autoincrement column is of type TINYINT. This type is specifically
designed to only hold numbers from 0 to 127. For best results, use an
INTEGER - they can accept numbers up to 999 IIRC.

HTH
Jon


-Original Message-
From: Mette Møller Madsen [mailto:[EMAIL PROTECTED]]
Sent: 15 June 2001 12:46
To: mysql listserver
Subject: Can only create 127 records in a table :o(


Hi there!

When I try to insert more than 127 rows/records in a table I get this error:

ERROR 1062: Duplicate entry '127' for key 1
(the key is an auto incremented primary key)

Does anyone know how to store _more_ than 127 rows in a table?

My guess is that I need to change to settings of my db, but I cannot find
anything in the manual. (I'm running version 3.23.38 which should be a
stable one.)

best regards,
Mette Madsen


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

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



**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

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

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




Re: Collapsing queries

2001-06-15 Thread Matthieu Paindavoine

Thank you for your help but this is not quite what I wanted. I tried
your solution, but it raises the following problem:
It would return

1   |   Hello World |   Foo
1   |   Hello World |   Bar

and if I neglect to look at the msg_id in the first column (which I hope I
can get rid of) then there is no way of saying if it's one msg to Foo
and Bar, or if it's two messages, one for Foo and one for Bar.
So when i said in the subject header collapsing, I really meant it ;-)

Do you have more resources?

Cheers,

Matt



---
 
 SELECT * FROM content, address WHERE content.msg_id = address.msg_id
 
 If I understand what your asking for, you want a JOIN. If I don't
 understand, forgive me, it's late... :)
 
 
 Hello,
 
 I am relatively new with MySQL (and SQL for that matter) and I couldn't
 find much reference to my problem in earlier posts.
 
 Let's say I have 2 tables,
 
 CONTENT: msg_id, msg_text
 
 ADDRESS: msg_id, address
 
 and I receive the msg Hello World addressed to the twins Foo and Bar.
 now my tables look like this:
 
 CONTENT:
 
 1 Hello World
 
 ADDRESS:
 
 1 Foo
 1 Bar
 
 I am desperatly looking for a sql statement that would produce
 
 1 |   Hello World |   Foo, Bar
 
 Is there such a thing??
 
 I welcome any suggestions,
 
 Thanks
 
 Matthieu
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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

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




Re: Can only create 127 records in a table :o(

2001-06-15 Thread Thomas Karcher

Hi,

 When I try to insert more than 127 rows/records in a table I get this error:
 ERROR 1062: Duplicate entry '127' for key 1
 (the key is an auto incremented primary key)
 Does anyone know how to store _more_ than 127 rows in a table?
 My guess is that I need to change to settings of my db, but I cannot find
 anything in the manual. (I'm running version 3.23.38 which should be a
 stable one.)

perhaps you have the auto_increment-field set as a smallint which can
only store values up to 127? Use mediumint or int instead ...

Bye,
Thomas Karcher

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

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




Fwd: Re: Re: Can only create 127 records in a table :o(

2001-06-15 Thread Dvoek Michal

This is a forwarded message
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: Dvoøáèek Michal [EMAIL PROTECTED]
Date: Friday, June 15, 2001, 1:24:16 PM
Subject: Can only create 127 records in a table :o(

get back, due post not cointains some key words:

database

===8==Original message text===
Hi,

check column type of this table for this column (try change to int type)
(you probably set columnt type to smallint - range -127 to 127)


---
 Dvoøáèek Michal   mailto:[EMAIL PROTECTED]



===8===End of original message text===



--- 
 Dvoøáèek Michalmailto:[EMAIL PROTECTED]



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

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




RE: Can only create 127 records in a table :o(

2001-06-15 Thread Bill \Elvis\ Gibbs

And since it's auto_increment, use something like int unsigned because you
don't need to store negative numbers...

Bill Elvis Gibbs
goEbusiness.com - putting e-motion in your business
email - [EMAIL PROTECTED] work - 301-668-5090 cell - 301-748-6938

-Original Message-
From: Bruce Stewart [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 8:35 AM
To: 'Mette Møller Madsen'; 'mysql listserver'
Subject: RE: Can only create 127 records in a table :o(


Change the datatype of your primary key from TINYINT to something larger,
like SMALLINT, MEDIUMINT, or INT.


-Original Message-
From: Mette Møller Madsen [mailto:[EMAIL PROTECTED]]
Sent: Fri, 15 June 2001 13:46
To: mysql listserver
Subject: Can only create 127 records in a table :o(


Hi there!

When I try to insert more than 127 rows/records in a table I get this error:

ERROR 1062: Duplicate entry '127' for key 1
(the key is an auto incremented primary key)

Does anyone know how to store _more_ than 127 rows in a table?

My guess is that I need to change to settings of my db, but I cannot find
anything in the manual. (I'm running version 3.23.38 which should be a
stable one.)

best regards,
Mette Madsen


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

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



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

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



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

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




mysql.sock

2001-06-15 Thread Marek Mahdal

Hi,
  I have a  problem with MySQL.
I am running Redhat Linux 6.1, MySQL 3.23.38 and PHP 4.0.
The command line client mysql is working perfectly. But if i try to connect to the 
MySQL server from a web site using PHP I get this error message:
 
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (111) in /web/domains/allegro-viatatry/index.php on line 3

In the index.php I am using the same code I used on other machine, with the same 
parameters, and it worked. I looked into the /tmp directory. There is no file named
'mysql.sock'.
 
Please help.
 
Thank you.   Marek Mahdal, Slovakia



Please repost mysql-3.23.33-1.i386.rpm

2001-06-15 Thread bjbyerly

Hello,

Due to the widespread advertisement of the 3.23.33 MySQL release as
stable and production quality, I had done extensive testing of the
3.23.33 release. 

In order to prevent replication of that extensive testing effort,
I would be very grateful if you would continue to leave the
following MySQL 3.23.33-1 files posted on ftp.mysql.com:
ftp://ftp.mysql.com/MySQL-3.23/MySQL-shared-3.23.33-1.i386.rpm
ftp://ftp.mysql.com/MySQL-3.23/MySQL-3.23.33-1.i386.rpm
ftp://ftp.mysql.com/MySQL-3.23/MySQL-client-3.23.33-1.i386.rpm

I really appreciate the fine effort you have put into maintaining
the quality of this distribution.

Many thanks for your help,
Bryan


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

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




Question: Stored Procedures..

2001-06-15 Thread samir



I have a query regarding the use of procedures in MySql.

I am using ASP as frontend and MySQL version 3.23 as backend. I wish to
write Stored Procedures.
However, MySql 3.23 does not support Stored Procedures.

I would like to know the work around to do this. 
Do I need to write the logic (for stored procedures) in ASP?

Thanks,
Samir


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

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




mySQL and websphere

2001-06-15 Thread Bains, Harjot S.

I want to use mySQL with websphere as my webserver. Does anyone has done it
successfully?
Is mySQL compatible with websphere? Any help is greatly appreciated.

Thanks
Harjot

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

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




cvs access

2001-06-15 Thread Gustavo Vieira Goncalves Coelho Rios

Hi folks!

I would like to know if it's possible that some have read access to MySQL cvs 
repository? If yes, how may i have read acces (like an anonymous account).

Other question:

Which CVS TAGS MySQL uses for production environment? STABLE , CURRENT? (FreeBSD 
Project uses STABLE for production boxes).

Thanks a lot for your time and cooperation.


-- 
For I perceive that behind this seemingly unrelated sequence
of events, there lurks a singular, sinister attitude of mind.

Whose?

MINE! HA-HA!

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

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




Re: auto_increment update

2001-06-15 Thread Paul DuBois

At 10:39 AM +0200 6/15/01, Sven Huster wrote:
On Thu, Jun 14, 2001 at 07:30:01PM -0500, Paul DuBois wrote:
  *This message was transferred with a trial version of CommuniGate(tm) Pro*
  At 1:36 AM +0200 6/15/01, Sven Huster wrote:
  Hi there
  
  can i somehow easily recreate the auto_increment col if is was not
  correctly set?
  i just recognized that most rows contain 1 cause the primary key was
  set
  on the auto_increment col + another one.
  so mysql only creates a entry  1 if the other field was equal to
  another row.

  Well, that's what's supposed to happen if you have a primary key
  or unique key on multiple columns where the last column is an
  AUTO_INCREMENT value.  If you want your AUTO_INCREMENT column
  to have unique values for each row, then you could drop that
  index and set up a PRIMARY KEY on just the AUTO_INCREMENT column.

  Actually, I'm not sure I understand what you want to do, so I'm
  just guessing.  If that doesn't answer your question, please
  clarify.

Hi

i want to fix the auto_increment col to have unique entries, but if i drop
the index
there are double entries in for the col, so i dont think it works just by
dropping the
key.
there is data in the table that i dont want to loose.

Drop the AUTO_INCREMENT column, than add it back as an AUTO_INCREMENT
PRIMARY KEY.  MySQL will number the columns values uniquely for you.


regards
sven


-- 
Paul DuBois, [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




myisamchk and Incorrect key file

2001-06-15 Thread Kyle Cronan

Hello all,

I was getting the following error trying to clean out a large table of
call logs for a long distance billing system:

mysql delete from calls where calltime'2001-02-01';
ERROR 1034: Incorrect key file for table: 'calls'. Try to repair it

But then myisamchk finds nothing, even using extended-check:

angelina:/usr/var/devel# myisamchk -e calls
Checking MyISAM file: calls
Data records:  457423   Deleted blocks:   0
myisamchk: warning: 1 clients is using or hasn't closed the table properly
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1
- check records and index references
MyISAM-table 'calls' is usable but should be fixed

My suspicion is that this is because I inproperly copied the table from
our main database server.  The reason I say so is that the above warning
seems invalid; SHOW processlist reports no client threads accessing this
table.

Even so, why would this cause the problem running the DELETE query?  And
attempting to repair the table with myisamchk gets rid of the above
warning but doesn't fix the problem with the query.  Any thoughts?

Thanks,
Kyle Cronan
[EMAIL PROTECTED]

P.S. Here is the table description:

+---+
| Field  | Type| Null | Key | Default | Extra | Privileges  |
++-+--+-+-+---+-+
| id | varchar(64) | YES  | | NULL|   | s,i,u,r |
| customerid | int(11) | YES  | | NULL|   | s,i,u,r |
| accountid  | int(11) | YES  | MUL | NULL|   | s,i,u,r |
| orig_num   | varchar(64) | YES  | | NULL|   | s,i,u,r |
| dest_num   | varchar(64) | YES  | | NULL|   | s,i,u,r |
| orig_gw| varchar(64) | YES  | | NULL|   | s,i,u,r |
| dest_gw| varchar(64) | YES  | | NULL|   | s,i,u,r |
| calltime   | datetime| YES  | | NULL|   | s,i,u,r |
| duration   | int(11) | YES  | | NULL|   | s,i,u,r |
| charge | float(9,2)  | YES  | | NULL|   | s,i,u,r |
+---+


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

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




Volker Menten

2001-06-15 Thread Volker Menten

Sehr géehrtes MySql-Team,

Ich habe schwiereigkeiten mit der MySql Gui anwendung und kann keine FAQ oder hilfe 
Seiten finden, ich währe ihnen Dankbar für technischen supprot.


Mit freundlichen Grüßen

 Volker Menten

[EMAIL PROTECTED]



order by rand() question

2001-06-15 Thread Matt Heaton

Hi all, trying to do something and have it be as efficient as possilble.  My 
question is if I have a table with say 10,000 rows in it, and I issue
a command like this

select * from table where number=1 order by rand() limit 1;

If 1000 rows would match this command does mysql first find all 1000 rows
and THEN randomly select 1 of those to return, OR does it just randomly
start somewhere and then stop when it finds one?  The first method would
be really slow and inefficient, but I am afraid that is how it works?  Is 
there anyone out there that knows FOR SURE how the order by rand() operation 
works?  I can't find a specification out there for it.

Thanks,
Matt Heaton

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

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




Re: Stringifying MySQL C types

2001-06-15 Thread Sinisa Milivojevic

Jochen Wiedmann writes:
 
 Hi,
 
 does the MySQL client library contain any support for
 a proper stringification of the MySQL specific data
 types like my_ulonglong? IMO they are depending on the
 operating system and I should not use ltoa() or similar
 functions.
 
 Thanks,
 
 Jochen


Hi!

Yes, MySQL C API has all the support you need.

Take a look at include files, particularly m_string.h. 

There is longlong2str, str2int etc ...


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   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: myisamchk and Incorrect key file

2001-06-15 Thread Kyle Cronan

Never mind.  This was simply my mistake.  mysqld had a different copy of
the table in it's cache, so the problem went away when I restarted the
server process.

Thanks anyway,
Kyle Cronan
[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




Error Compiling MySQL++ examples (HELP PLEASE)

2001-06-15 Thread Tim Williams


I've downloaded the mysql++ api and I'm trying to compile the examples
but I keep getting these warnings I don't understand.  When I compile ,
using  the Makefile provided I get the following warnings:
custom1.cc:8:1 : warning: pasting ~ and stock does not give a
valid preprocessing token
custom1.cc:8:1 : warning: pasting , and stock does not give a
valid preprocessing token
custom1.cc:8:1 : warning: pasting , and stock does not give a
valid preprocessing token
custom1.cc:8:1 : warning: pasting , and stock does not give a
valid preprocessing token
and so on

Do I have something setup wrong or are these warnings normal?

Thanks
Tim Williams






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

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




recursive query

2001-06-15 Thread Attila Soki

hi,

how can i make recursive querys in mysql?
i want to show a tree.

my table:
tree (id int, parent int, name char(10));

id  parent  name
--
1   0   joe
2   1   mike
3   1   jim
4   2   george
5   3   eric
6   4   steven

and i need this result:

id  parent  name
---
1   0   joe
2   1   mike
4   2   george
6   4   steven
3   1   jim
5   3   eric


the tree:
1   0   joe
-2  1   mike
--4 2   george
---64   steven
-3  1   jim
--5 3   eric

thanks

ati.




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

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




RE: Collapsing queries

2001-06-15 Thread Roger Karnouk

this is as close as I could come to what you want.
it involves 2 steps

set a variable

set @var:= '';

then query

select address.msg_id, content.msg_text,
@var:= CONCAT_WS(',',@var,address.address) as addresses
from content, address
where content.msg_id = address.msg_id;

this returns a list but if you grap the last one in the list 
it will be what you want

++-+---+
| msg_id | msg_test| addresses |
++-+---+
|  1 | Hello World | Foo   |
|  1 | Hello World | Foo,Bar   | --- it will always be the last one you
can't reorder
++-+---+

that's as close as I could figure
-Original Message-
From: Matthieu Paindavoine [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 7:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Collapsing queries


Thank you for your help but this is not quite what I wanted. I tried
your solution, but it raises the following problem:
It would return

1   |   Hello World |   Foo
1   |   Hello World |   Bar

and if I neglect to look at the msg_id in the first column (which I hope I
can get rid of) then there is no way of saying if it's one msg to Foo
and Bar, or if it's two messages, one for Foo and one for Bar.
So when i said in the subject header collapsing, I really meant it ;-)

Do you have more resources?

Cheers,

Matt



---
 
 SELECT * FROM content, address WHERE content.msg_id = address.msg_id
 
 If I understand what your asking for, you want a JOIN. If I don't
 understand, forgive me, it's late... :)
 
 
 Hello,
 
 I am relatively new with MySQL (and SQL for that matter) and I couldn't
 find much reference to my problem in earlier posts.
 
 Let's say I have 2 tables,
 
 CONTENT: msg_id, msg_text
 
 ADDRESS: msg_id, address
 
 and I receive the msg Hello World addressed to the twins Foo and Bar.
 now my tables look like this:
 
 CONTENT:
 
 1 Hello World
 
 ADDRESS:
 
 1 Foo
 1 Bar
 
 I am desperatly looking for a sql statement that would produce
 
 1 |   Hello World |   Foo, Bar
 
 Is there such a thing??
 
 I welcome any suggestions,
 
 Thanks
 
 Matthieu
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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

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

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

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




RE: order by rand() question

2001-06-15 Thread Jon Haworth

I don't think the answer has changed since last week :-)

IMHO it's not really slow and inefficient, anyway - this script:

---start---
?php
$db = mysql_connect(localhost, root, :-));
mysql_select_db(Playground, $db);
mysql_query(CREATE TABLE mytable (myfield INTEGER UNSIGNED, PRIMARY KEY
myfield)));
for ($foo=1; $foo=1; $foo++) {
$s = INSERT INTO mytable SET myfield=. $foo;
mysql_query($s);
}
?
end

produces a table with 1 rows each containing an integer. Then we do:

mysql SELECT * FROM mytable ORDER BY RAND() LIMIT 5;
+-+
| myfield |
+-+
|9935 |
|3221 |
|1530 |
|3889 |
|2133 |
+-+
5 rows in set (0.08 sec)

Right, that's *less than a tenth of a second*, and that's on a crufy old
P200 that also happens to be serving our company Intranet at the same time
as doing this little experiment.

So what's so inefficient? I can't blink in 0.08 seconds, let alone think a
query is running too slowly.

Cheers
Jon


-Original Message-
From: Matt Heaton [mailto:[EMAIL PROTECTED]]
Sent: 15 June 2001 14:23
To: [EMAIL PROTECTED]
Subject: order by rand() question


Hi all, trying to do something and have it be as efficient as possilble.  My

question is if I have a table with say 10,000 rows in it, and I issue
a command like this

select * from table where number=1 order by rand() limit 1;

If 1000 rows would match this command does mysql first find all 1000 rows
and THEN randomly select 1 of those to return, OR does it just randomly
start somewhere and then stop when it finds one?  The first method would
be really slow and inefficient, but I am afraid that is how it works?  Is 
there anyone out there that knows FOR SURE how the order by rand() operation

works?  I can't find a specification out there for it.

Thanks,
Matt Heaton

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

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



**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

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

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




Re: 1030 : Got error 134 from table handler ?

2001-06-15 Thread Gerald Clark


perror 134 says:

134 = Record was already deleted (or record file crashed)

So, either your script is trying to delete a non existant record, or you 
need to run [my]isamchk on your files.

Patrice d'OZEO wrote:

 Hi,
 
 Here's the error - 1030 : Got error 134 from table handler
 
 We have that error on our web site. Apparently, It occurs when our scripts
 try to access
 the members table which is quite big. Note that It didn't occured before.
 We have other big tables and there's no problem !
 
 Can you explain me the reason of that error ?
 
 Thank you,
 
 Patrice
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
[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




Cannot connect to database

2001-06-15 Thread Norman Buskell

Hi Folks

I am having trouble connecting to a MySQL table using the DBI-connect() 
call from a Perl CGI script. The error message I get is:
Can't connect to database: Access denied for user: 'web504@localhost' 
(Using password: YES)
The web504 account and password are defined in the user table for any host 
but with no privileges. The web504 account is also defined in the db table 
for any host but with select and delete privileges for the required 
database. If I check access rights with mysqlaccess everything is OK. I can 
also manually access the database from the web server by running mysql as 
web504. If I change the DBI call to use the root account and password the 
CGI script runs succesfully.
Any help greatly appreciated
Cheers
Norman Buskell



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

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




Re: mysql.sock

2001-06-15 Thread Gerald Clark

update your php.ini file to define the proper socket file.

Marek Mahdal wrote:

 Hi,
   I have a  problem with MySQL.
 I am running Redhat Linux 6.1, MySQL 3.23.38 and PHP 4.0.
 The command line client mysql is working perfectly. But if i try to connect to the 
MySQL server from a web site using PHP I get this error message:
  
 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (111) in /web/domains/allegro-viatatry/index.php on line 3
 
 In the index.php I am using the same code I used on other machine, with the same 
parameters, and it worked. I looked into the /tmp directory. There is no file named
 'mysql.sock'.
  
 Please help.
  
 Thank you.   Marek Mahdal, Slovakia


-- 
Gerald L. Clark
[EMAIL PROTECTED]


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

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




Re: order by rand() question

2001-06-15 Thread Gerald Clark

You asked this earlier this week.
The answer has not changed.

Matt Heaton wrote:

 Hi all, trying to do something and have it be as efficient as possilble.  My 
 question is if I have a table with say 10,000 rows in it, and I issue
 a command like this
 
 select * from table where number=1 order by rand() limit 1;
 
 If 1000 rows would match this command does mysql first find all 1000 rows
 and THEN randomly select 1 of those to return, OR does it just randomly
 start somewhere and then stop when it finds one?  The first method would
 be really slow and inefficient, but I am afraid that is how it works?  Is 
 there anyone out there that knows FOR SURE how the order by rand() operation 
 works?  I can't find a specification out there for it.
 
 Thanks,
 Matt Heaton
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
[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




Rollup features?

2001-06-15 Thread Jim Mangione

Hi,

Does anyone know
1) if MySQL / Linux supports the use of Group By ROLLUP?
2) If not (as I suspect), are there plans for such an implementation?

Thanks everyone,
-Jim



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

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




transactions and pconnect (PHP)

2001-06-15 Thread Michael Widenius


Hi!

 Peter == Peter Zaitsev [EMAIL PROTECTED] writes:

Peter Hello mysql,
Peter   I'm planing to use transactions in application written in PHP, which
Peter   of course uses pconnect to optimize perfomance.

Peter   Few time ago I had to stop using lock tables as this lead to
Peter   locked system then somehow the php script was aborted before unlock
Peter   tables.

Peter   With transactions we could have the same bad situation if it's not
Peter   handeled, it's even worse as the result is unexpected depending on
Peter   the following statements transaction can be committed or rolled back.

Peter   I'm speaking about the following problem:
  
Peter   I issue the  begin statement and some of the statements, then PHP
Peter   script is aborted before the transaction is committed, but as
Peter   connection is not terminated mysql does not rolls it back. The next
Peter   statements come from the other PHP script so they could commit
Peter   transaction or roll it back.

The above problem should exist with all transactional databases.

Peter   The question is - does this problem present or not ? If it does I
Peter   think it would be nice to modify  the behavior so PHP would unlock
Peter   all the tables and rollback all the transactions from the previous
Peter   script.

I think that if a PHP script is aborted and you are using persistent
connections, then it should send a 'bk abort' to the database if there
is an active transaction.

I don't however think the current PHP code does this.
Peter and Tim, could you try to sort this out?
This is a question for the PHP list..

Regards,
Monty

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

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




Re: cvs access

2001-06-15 Thread Jeremy Zawodny

On Fri, Jun 15, 2001 at 10:44:57AM -0300, Gustavo Vieira Goncalves Coelho Rios wrote:
 Hi folks!
 
 I would like to know if it's possible that some have read access to
 MySQL cvs repository? If yes, how may i have read acces (like an
 anonymous account).

MySQL users BitKeeper. See the manual for info:

  http://www.mysql.com/doc/I/n/Installing_source_tree.html

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951

MySQL 3.23.29: up 1 days, processed 7,520,048 queries (86/sec. avg)

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

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




RE: mysql.sock

2001-06-15 Thread Mike Jimenez

I had the same problem and what I did is located the mysql.sock which was
located in /var/lib/mysql/mysql.sock
and then I just created a sym link from the temp dir and it worked fine.
ln -s /var/lib/mysql/mysql.sock mysql.sock

mysql.sock - /var/lib/mysql/mysql.sock

Mike

-Original Message-
From: Eric Persson [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 8:28 AM
To: Marek Mahdal; [EMAIL PROTECTED]
Subject: Re: mysql.sock


Marek Mahdal wrote:

 Hi,
   I have a  problem with MySQL.
 I am running Redhat Linux 6.1, MySQL 3.23.38 and PHP 4.0.
 The command line client mysql is working perfectly. But if i try to
connect to the MySQL server from a web site using PHP I get this error
message:

 Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (111) in
/web/domains/allegro-viatatry/index.php on line 3

 In the index.php I am using the same code I used on other machine, with
the same parameters, and it worked. I looked into the /tmp directory. There
is no file named
 'mysql.sock'.

 Please help.

 Thank you.   Marek Mahdal, Slovakia


Hi !

Try locating your mysql.sock file, depending on your mysqlinstallation
method and parameters its placed on different places.
I guess it could be in /usr/local/mysql/var/mysql.sock but try locate
mysql.sock in the shell.

Where the default mysql.sock is located by php can be set in php.ini i
think, otherwise you could supply som extra values to mysql_connect().
I think its mysql_connect(localhost:/usr/local/mysql/var/mysql.sock),
but check the manual to be sure.

Good luck!
Eric

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

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




VB, SQL: ...WHERE Mitglieder.geb='1978-08-26' doesn't work

2001-06-15 Thread Florian Lagg

I'm using Visual Basic with DAO 3.6 and I try to execute this query

dim rsPersonen as dao.recordset
Set rsPersonen = db.OpenRecordset( _
SELECT Mitglieder.* FROM Mitglieder  + _
WHERE Mitglieder.geb='1978-08-26')

Here I get an Error-Message:

Runtime-Error 3464, ...

If I use any other SQL-Query-Tool (e.g. MySQLFront) this query works and returns (as 
estimated) 1 Record.

Any other query which is not using any date works, e.g.:

dim rsPersonen as dao.recordset
Set rsPersonen = db.OpenRecordset( _
SELECT Mitglieder.* FROM Mitglieder  + _
WHERE Mitglieder.VName='Florian')

I hope you could help me solving this problem. By the way: Sorry for my bad english!

Thanks
Florian Lagg ([EMAIL PROTECTED])
__
Ferienklick.de - Jede Menge Urlaub auf einen Blick!
Hier geht's zu Ihrem Traumstrand: http://ferienklick.de/?PP=2-0-100-105-1


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

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




Re: mysqldump on large database..

2001-06-15 Thread Dan Nelson

In the last episode (Jun 15), SDiZ Cheng said:
 When i use mysqldump, 
 seems that MySQL will open all the tables in the database.
 But, what i have is: a database will over 10,000 tables ..
 I get a Too much opened file error on this..
 I think increasing open_file_limit is not possible,
 because of the limit of the OS itself..

Which OS are you running?  You should be able to open 2 files
(index+data) on most Unixes with a little tuning.  It may be slow, but
it should work.  Alternatively, you can temporarily move tables 1000 at
a time into another directory, mysqldump them, and move them back.

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




RE: order by rand() question

2001-06-15 Thread Chris Bolt

 I don't think the answer has changed since last week :-)

 IMHO it's not really slow and inefficient, anyway - this script:
(clipped)
 produces a table with 1 rows each containing an integer. Then we do:

 mysql SELECT * FROM mytable ORDER BY RAND() LIMIT 5;
(clipped)
 5 rows in set (0.08 sec)

 Right, that's *less than a tenth of a second*, and that's on a crufy old
 P200 that also happens to be serving our company Intranet at the same time
 as doing this little experiment.

 So what's so inefficient? I can't blink in 0.08 seconds, let alone think a
 query is running too slowly.

Watch out though. Sure, it may be that fast when you're selecting one row
out of 10,000 ints on a lightly loaded server. However MySQL works this way:

- SELECT * FROM mytable;
- Order all found rows by rand()
- Send back the first 5

It's not that inefficient when you just have one column, since that's all
you'll be getting anyways, however I have a table with 38 columns, 141000
rows and lots of data you are making MySQL get a lot of data it doesn't end
up using. This is how fast your fast query runs on it (granted this is on a
server with medium to heavy load and ~50 queries per second):

mysql select * from users order by rand() limit 1;
...
1 row in set (1 min 29.48 sec)

You can make this a little faster:

mysql select id from users order by rand() limit 1;
...
1 row in set (10.10 sec)

mysql select * from users where id = 123456;
...
1 row in set (0.12 sec)

But it's still quite inefficient. The best way would be to generate the
random numbers from your application. If you wanted five rows, generate 10
numbers (just to be really safe in case a few reference deleted rows)
between 1 and max(id) (assuming you have an auto_increment column named id)
and do:

mysql select max(id) from users;
...
1 row in set (0.12 sec)

mysql select * from users where id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) limit
5;
...
5 rows in set (0.33 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: Collapsing queries

2001-06-15 Thread Chris Bolt

SELECT cont.msg_id, cont.msg_text, CONCAT_WS(', ', a1.address, a2.address)
FROM CONTENT AS cont, ADDRESS AS a1, ADDRESS AS a2 WHERE cont.msg_id =
a1.msg_id AND cont.msg_id = a2.msg_id;

Many thanks to salle in efnet #mysql for teaching me this trick ;-)

 Hello,

 I am relatively new with MySQL (and SQL for that matter) and I couldn't
 find much reference to my problem in earlier posts.

 Let's say I have 2 tables,

 CONTENT: msg_id, msg_text

 ADDRESS: msg_id, address

 and I receive the msg Hello World addressed to the twins Foo and Bar.
 now my tables look like this:

 CONTENT:

 1 Hello World

 ADDRESS:

 1 Foo
 1 Bar

 I am desperatly looking for a sql statement that would produce

 1 |   Hello World |   Foo, Bar

 Is there such a thing??


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

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




RE: MySQL compression?

2001-06-15 Thread Chris Bolt

Look up myisampack in the mysql manual at http://www.mysql.com/doc/. The
only drawback is you can't modify the table.

 I have a table that has massive amounts of text.  Just plain text, stuff
 that would compress REALLY well.  Does mysql have any sort of compression
 internally for the table data that it stores?  A simple gzip wouldn't add
 too much overhead to the system, and you could still have
 clear-text indexes.


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

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




RE: cvs access

2001-06-15 Thread Chris Bolt

 Hi folks!
 
 I would like to know if it's possible that some have read access 
 to MySQL cvs repository? If yes, how may i have read acces (like 
 an anonymous account).

Check out the CVS link on http://sourceforge.net/projects/mysql/


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

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




Re: mysql died with innodb

2001-06-15 Thread Dan Nelson

In the last episode (Jun 15), Heikki Tuuri said:
 Sven,
 
 line 637 in mysql/innobase/os/os0file.c asserts that
 
 TRUE == os_file_flush(file)
 
 If you look at about line 557, you see how InnoDB does
 the file flush: the default is to call fdatasync.

 To solve the problem we should look at the NFS manuals about what
 Unix functions are available in it. Maybe there is some special
 NFS_fsync?

When fsync() is called on an NFS filehandle, the system flushes any
dirty buffers on the client, and if over an NFSv3 mount, commits the
writes.

Sven: did you get any nfs server timeout messages in /var/log/messages?

Heikki: how hard would it be to send the errno back to the client if
filesystem calls fail?  On regular MYISAM tables, the user sees an
error message (or something gets dumped to the error log) and the
server doesn't assert().

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




Re: mysql died with innodb

2001-06-15 Thread Heikki Tuuri

Dan,

of course InnoDB could catch the error and send the error
message to the client. But the problem is that we have to
get NFS to flush the files, otherwise we may very easily get
database corruption in case of a crash.

MyISAM does not call f(data)sync at all, but then you may have
to run repair if it crashes.

I looked at FreeBSD manuals at www.freebsd.org and did not
find any notice that fdatasync would not work for NFS.
Presumably with some settings it should work, or maybe
there is a bug in the OS/hardware combination.

Regards,

Heikki

-Original Message-
From: Dan Nelson [EMAIL PROTECTED]
To: Heikki Tuuri [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Friday, June 15, 2001 8:57 PM
Subject: Re: mysql died with innodb


In the last episode (Jun 15), Heikki Tuuri said:
 Sven,
 
 line 637 in mysql/innobase/os/os0file.c asserts that
 
 TRUE == os_file_flush(file)
 
 If you look at about line 557, you see how InnoDB does
 the file flush: the default is to call fdatasync.

 To solve the problem we should look at the NFS manuals about what
 Unix functions are available in it. Maybe there is some special
 NFS_fsync?

When fsync() is called on an NFS filehandle, the system flushes any
dirty buffers on the client, and if over an NFSv3 mount, commits the
writes.

Sven: did you get any nfs server timeout messages in /var/log/messages?

Heikki: how hard would it be to send the errno back to the client if
filesystem calls fail?  On regular MYISAM tables, the user sees an
error message (or something gets dumped to the error log) and the
server doesn't assert().

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




PHP and mysql and images

2001-06-15 Thread Kevin Pratt

Can any one tell me how place images in to a mysql database and then
retrieve them later?


Thanks
Kevin


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

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




Re: mysql died with innodb

2001-06-15 Thread Dan Nelson

In the last episode (Jun 15), Heikki Tuuri said:
 of course InnoDB could catch the error and send the error message to
 the client. But the problem is that we have to get NFS to flush the
 files, otherwise we may very easily get database corruption in case
 of a crash.
 
 MyISAM does not call f(data)sync at all, but then you may have to run
 repair if it crashes.
 
 I looked at FreeBSD manuals at www.freebsd.org and did not find any
 notice that fdatasync would not work for NFS. Presumably with some
 settings it should work, or maybe there is a bug in the OS/hardware
 combination.

fsync (FreeBSD doesn't have fdatasync) definitely does work with NFS. 
Knowing the errno that fsync() returned when it failed might help the
debugging process, though.  

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




Re: order by rand() question

2001-06-15 Thread Chris Petersen

In a slight change of this question (since I have no data to currently test
this with, as my ISP is using too old a version of mysql), does anyone know
what something like this would do?

SELECT * FROM theTable ORDER BY RAND(), date LIMIT 5;

I'd like to be able to pull out a certain number of rows, randomly, and then
sort them by date (or another field).  Or is there a way to sort the rows
AFTER they are put through LIMIT? (sort of like how HAVING is to WHERE)

Thanks,

Chris


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

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




properly checking for existing records with perl

2001-06-15 Thread Rory O'Connor

I am writing a small perl script that will write data to a Mysql
database.  The SQL will need to be different based on whether or not the
e-mail address already exists in the database though.  I coded something
that works, but I would like some feedback as to whether or not this is
the best way.  I need this to be as efficient as possible because there
is occasionally very heavy traffic on it, and there will be over 100,000
records in the database.

Basically, I collect the data, then I query the database to see if the
e-mail exists. and if it returns row(s) then I update the data to the
database.  if it doesn't, i insert the new data into the db.  any help
is appreciated!  here's the code snippet:

# see if the e-mail exists
$query = SELECT email FROM $table where email = \'$email\';
$dbh =
DBI-connect(DBI:mysql:database=$database;host=$host,$user,$mysqlpa
ssword,{'RaiseError'=1}); 
$sth = $dbh-prepare($query);
$sth-execute();
$numrows = $sth-rows;

# if there are rows returned, the e-mail is in there, so we need to
update the record
if ($numrows ge '1') {

# set the SQL for UPDATE
$sql = UPDATE $table SET prefix=\$prefix\, firstname=\$firstname\,
middlename=\$middlename\, lastname=\$lastname\,
address1=\$address1\, address2=\$address2\, city=\$city\,
state=\$state\, zip=\$zip\, country=\$country\, email=\$email\
WHERE email = \$email\;
#actually execute the UPDATE
$sth = $dbh-prepare($sql);
$sth-execute();  
# finish and disconnect
$sth-finish();
$dbh-disconnect();

}

# if there are no rows returned, it's a new record, so insert it
else {

## Set sql to perfect insert format 
$sql = insert into $table
(prefix,firstname,middlename,lastname,address1,address2,city,state,zip,c
ountry,email,phone,howfound,interest,lastpurch_web,optin,optin_partners,
mail_type,comments,record_type,date,browser) VALUES
(\$prefix\,\$firstname\,\$middlename\,\$lastname\,\$address1\,
\$address2\,\$city\,\$state\,\$zip\,\$country\,\$email\); 
#actually execute the insert
$sth = $dbh-prepare($sql);
$sth-execute();  
# finish and disconnect
$sth-finish();
$dbh-disconnect();

}
 

providing the finest in midget technology

-
Before posting, please check:
   http://www.mysql.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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




SUM() function in select statement

2001-06-15 Thread kitty79

hi folks,
i have the following table (table_name=comment)
+-+--+--+-++
+
| Field   | Type | Null | Key | Default| Extra
|
+-+--+--+-++
+
| id  | smallint(5) unsigned |  | PRI | 0  | auto_increment
|
| taste   | int(6)   |  | | 0  |
|
| ph  | int(6)   |  | | 0  |
|
| enabled | char(1)  | YES  | | N  |
|
+-+--+--+-++
+

with the following content:
++---++-+
| id | taste | ph | enabled |
++---++-+
|  1 | 5 |  8 | |
|  2 | 2 |  7 | |
|  3 | 8 |  3 | |
++---++-+

and want to do a select statement like
select SUM(taste) FROM comment;
to get the summation of taste (here 15)

mysql select SUM(taste) FROM comment;
++
| SUM(taste) |
++
|  0 |
++
and got this result:-( whats wrong? thank you:-)

Tobias


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

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




RE: indexing = NP complete??

2001-06-15 Thread Chris Bolt

 Is this machine basically dedicated to MySQL? If so, I'd try bumping
 up the record_buffer to 16 or 32MB and see what that does. I've got it
 set at 32MB on a server with 1GB of RAM.

I'm looking at my-huge.cnf included with mysql 3.23.39 and it has a
record_buffer of 1M. Are the example configs included with mysql
conservative, and if so, do you have any other suggestions for
configurations with lots of ram (768MB in my case)?


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

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




Problems with make on redhat 7.1

2001-06-15 Thread Greg Stienstra

I have been unsuccessful doing a make for mysql-3-23.29 using redhat 7.1 on an
Intel Pentium with 64 megabytes. There seems to be a problem with file db.h. I
am doing the install from the source tarball mysql-3.23.39.tar.gz , not the RPM.



Here is an excerpt from the session:


(lines cut, including ./Configure)
Making all in share
make[3]: Entering directory `/otheros/download/mysql-3.23.39/sql/share'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/otheros/download/mysql-3.23.39/sql/share'
make[3]: Entering directory `/otheros/download/mysql-3.23.39/sql'
make[3]: *** No rule to make target `../bdb/build_unix/db.h', needed by
`mysqld.o'.  Stop.
make[3]: Leaving directory `/otheros/download/mysql-3.23.39/sql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/otheros/download/mysql-3.23.39/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/otheros/download/mysql-3.23.39'
make: *** [all-recursive-am] Error 2
[root@junco mysql-3.

Any assistance in solving this problem would be 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: mysqldump on large database..

2001-06-15 Thread John Cichy

Hello

I created a perl script that might help. Because I like to have a full backup 
of my databases and table backups (I know I can split the full backup, but 
I'm too lazy ;), I created a perl script that queries MySQL for the table 
names in the database and then creates a shell script with individual 
mysqldump commands for each table, after it creates the script it executes 
it. I think this will help in this case because it is only asking MySQL to 
dump one table at a time. With 10,000 tables the script will run for a long 
time, but at least it will be automated. Contact me off the list and I will 
be glad to send it to you.

Have a great day...
John

Someone please correct me if my idea of how mysqldump runs (i.e. it will 
still attempt to open all files) is incorrect.


On Friday 15 June 2001 13:36, Dan Nelson wrote:
 In the last episode (Jun 15), SDiZ Cheng said:
  When i use mysqldump,
  seems that MySQL will open all the tables in the database.
  But, what i have is: a database will over 10,000 tables ..
  I get a Too much opened file error on this..
  I think increasing open_file_limit is not possible,
  because of the limit of the OS itself..

 Which OS are you running?  You should be able to open 2 files
 (index+data) on most Unixes with a little tuning.  It may be slow, but
 it should work.  Alternatively, you can temporarily move tables 1000 at
 a time into another directory, mysqldump them, and move them back.

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

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




Re: mysql died with innodb

2001-06-15 Thread Heikki Tuuri

Dan,

I see. My automake/autoconf script currently checks if there
exists fdatasync, and if not then it uses fsync. So we know
now that it calls fsync. I wrote to Steve and asked him to compile
a version where he sees the error number from fsync.

Thank you for the FreeBSD info.

Heikki

-Original Message-
From: Dan Nelson [EMAIL PROTECTED]
To: Heikki Tuuri [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]; [EMAIL PROTECTED]
[EMAIL PROTECTED]
Date: Friday, June 15, 2001 9:27 PM
Subject: Re: mysql died with innodb


In the last episode (Jun 15), Heikki Tuuri said:
 of course InnoDB could catch the error and send the error message to
 the client. But the problem is that we have to get NFS to flush the
 files, otherwise we may very easily get database corruption in case
 of a crash.

 MyISAM does not call f(data)sync at all, but then you may have to run
 repair if it crashes.

 I looked at FreeBSD manuals at www.freebsd.org and did not find any
 notice that fdatasync would not work for NFS. Presumably with some
 settings it should work, or maybe there is a bug in the OS/hardware
 combination.

fsync (FreeBSD doesn't have fdatasync) definitely does work with NFS.
Knowing the errno that fsync() returned when it failed might help the
debugging process, though.

--
 Dan Nelson
 [EMAIL PROTECTED]


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

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




RE: recursive query

2001-06-15 Thread Chris Bolt

http://marc.theaimsgroup.com/?l=mysqlm=99213870412899w=2
http://marc.theaimsgroup.com/?l=mysqlm=99214323317893w=2
http://www.bolt.cx/misc/thread.txt

 hi,
 
 how can i make recursive querys in mysql?
 i want to show a tree.
 
 my table:
 tree (id int, parent int, name char(10));
...
 thanks
 
 ati.

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

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




RE: PHP and mysql and images

2001-06-15 Thread Chris Bolt

Why would you want to do that? That's what filesystems are for.

 Can any one tell me how place images in to a mysql database and then
 retrieve them later?


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

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




Re: PHP and mysql and images

2001-06-15 Thread Zak Greant

This topic has been covered many times - check the PHP-General mailing list
archives (http://marc.theaimsgroup.com/?l=php-general)

--zak



- Original Message -
From: Kevin Pratt [EMAIL PROTECTED]
To: Mysql List [EMAIL PROTECTED]
Sent: Friday, June 15, 2001 12:25 PM
Subject: PHP and mysql and images


 Can any one tell me how place images in to a mysql database and then
 retrieve them later?


 Thanks
 Kevin


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

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



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

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




Re: PHP and mysql and images

2001-06-15 Thread Mat Murdock

Is there a particular reason why you want the images in a mysql database.
It would be faster if you put that path to the images in a table then the
actual images.


Mat

- Original Message -
From: Kevin Pratt [EMAIL PROTECTED]
To: Mysql List [EMAIL PROTECTED]
Sent: Friday, June 15, 2001 12:25 PM
Subject: PHP and mysql and images


 Can any one tell me how place images in to a mysql database and then
 retrieve them later?


 Thanks
 Kevin


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

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



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

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




RE: order by rand() question

2001-06-15 Thread Chris Bolt

 In a slight change of this question (since I have no data to
 currently test this with, as my ISP is using too old a
 version of mysql), does anyone know what something like
 this would do?

 SELECT * FROM theTable ORDER BY RAND(), date LIMIT 5;

Exactly the same as SELECT * FROM theTable ORDER BY RAND() LIMIT 5; would
do, since RAND() returns a different value for each row, and the date column
would only be sorted in the event of duplicates in the previous order
expression.


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

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




Limiting connections per database

2001-06-15 Thread Seth

Just wondering if there is a way to limit the number of connections to a
particular database without starting up another server to run that database
specifically.


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

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




Re: indexing = NP complete??

2001-06-15 Thread Jeremy Zawodny

On Fri, Jun 15, 2001 at 12:53:04PM -0600, Chris Bolt wrote:
  Is this machine basically dedicated to MySQL? If so, I'd try bumping
  up the record_buffer to 16 or 32MB and see what that does. I've got it
  set at 32MB on a server with 1GB of RAM.
 
 I'm looking at my-huge.cnf included with mysql 3.23.39 and it has a
 record_buffer of 1M. Are the example configs included with mysql
 conservative, and if so, do you have any other suggestions for
 configurations with lots of ram (768MB in my case)?

I don't know that they're conservative. They are good starting points
which are optimized for the general case. Most folks aren't going to
do lots of heavy indexing as much as they are SELECT queries
(hopefully on indexed columns).

I don't have any other suggestions at the moment...

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951

MySQL 3.23.29: up 1 days, processed 8,464,357 queries (85/sec. avg)

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

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




Re: Problems with make on redhat 7.1

2001-06-15 Thread Trond Eivind Glomsrød

Greg Stienstra [EMAIL PROTECTED] writes:

 I have been unsuccessful doing a make for mysql-3-23.29 using redhat 7.1 on an
 Intel Pentium with 64 megabytes. There seems to be a problem with file db.h. I
 am doing the install from the source tarball mysql-3.23.39.tar.gz , not the RPM.

It compiles just fine for me, so this is most likely a local
configuration issue.

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

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

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




Re: SUM() function in select statement

2001-06-15 Thread Gerald Clark

That should work.
What OS, kernel, version, compiler are you using?

kitty79 wrote:

 hi folks,
 i have the following table (table_name=comment)
 +-+--+--+-++
 +
 | Field   | Type | Null | Key | Default| Extra
 |
 +-+--+--+-++
 +
 | id  | smallint(5) unsigned |  | PRI | 0  | auto_increment
 |
 | taste   | int(6)   |  | | 0  |
 |
 | ph  | int(6)   |  | | 0  |
 |
 | enabled | char(1)  | YES  | | N  |
 |
 +-+--+--+-++
 +
 
 with the following content:
 ++---++-+
 | id | taste | ph | enabled |
 ++---++-+
 |  1 | 5 |  8 | |
 |  2 | 2 |  7 | |
 |  3 | 8 |  3 | |
 ++---++-+
 
 and want to do a select statement like
   select SUM(taste) FROM comment;
 to get the summation of taste (here 15)
 
 mysql select SUM(taste) FROM comment;
 ++
 | SUM(taste) |
 ++
 |  0 |
 ++
 and got this result:-( whats wrong? thank you:-)
 
 Tobias
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
[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




Possible Bug in mysql 3.23.38

2001-06-15 Thread Simon Shapiro

Could not find a bug report form.  So I am telling y'll...

Platform:  FreeBSD 4.3 (I do not think it matters)

After creating a new database, I ran:

update user set password = 'SomeJunk' where user = 'root';

This inserts the string 'SomeJunk' literally into the database,
unencrypted.  This is SQL expected but the result is a database
lockout (not to mention the security breach of having the clear
password stored in a file.

I got the smart idea to assign a root password like this from the
Bugzilla-Guide.txt file that comes with Bugzilla.

If there is a better way to assign passwords, please let me know.

I tried

grant all on mysql.* to foo identified by bar;

Seems to work for creating new accounts.

Also, the user table looks like:

mysql select host, user, password from user;
+---+-+--+
 | host   | user | password |
+---+-+--+
| localhost | root| 7d30d6e5796d165e |
| nomis | root| 7d30d6e5796d165e |
| localhost | |  |
| nomis | |  |
| localhost | ShimonR | 7d30d6e5796d165e |
+---+-+--+
5 rows in set (0.00 sec)

Does this mean that any user from localhost or from nomis can connect?

Otherwise, this is really nice (my first first hand encounter with mysql).


-- 


Sincerely Yours, [EMAIL PROTECTED]
 770.265.0958
Simon Shapiro

Unwritten code has no bugs and executes at twice the speed of mouth



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

To 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 Bug in mysql 3.23.38

2001-06-15 Thread Joshua J. Kugler

PLEASE read the manual.  you need to 

set password = password('SomeJunk')

And the bug report form can be obtained by running mysqlbug, the instructions 
for which are also found in the manual.

Thank you.

j- k-

On Friday 15 June 2001 13:08, Simon Shapiro wrote:
 Could not find a bug report form.  So I am telling y'll...

 Platform:  FreeBSD 4.3 (I do not think it matters)

 After creating a new database, I ran:

 update user set password = 'SomeJunk' where user = 'root';

 This inserts the string 'SomeJunk' literally into the database,
 unencrypted.  This is SQL expected but the result is a database
 lockout (not to mention the security breach of having the clear
 password stored in a file.

 I got the smart idea to assign a root password like this from the
 Bugzilla-Guide.txt file that comes with Bugzilla.

 If there is a better way to assign passwords, please let me know.

 I tried

 grant all on mysql.* to foo identified by bar;

 Seems to work for creating new accounts.

 Also, the user table looks like:

 mysql select host, user, password from user;
 +---+-+--+

  | host   | user | password |

 +---+-+--+

 | localhost | root| 7d30d6e5796d165e |
 | nomis | root| 7d30d6e5796d165e |
 | localhost | |  |
 | nomis | |  |
 | localhost | ShimonR | 7d30d6e5796d165e |

 +---+-+--+
 5 rows in set (0.00 sec)

 Does this mean that any user from localhost or from nomis can connect?

 Otherwise, this is really nice (my first first hand encounter with mysql).

-- 
Joshua Kugler, Information Services Director
Associated Students of the University of Alaska Fairbanks
[EMAIL PROTECTED], 907-474-7601

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

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




Re: VB, SQL: ...WHERE Mitglieder.geb='1978-08-26' doesn't work

2001-06-15 Thread Bob Hall

I'm using Visual Basic with DAO 3.6 and I try to execute this query

dim rsPersonen as dao.recordset
 Set rsPersonen = db.OpenRecordset( _
 SELECT Mitglieder.* FROM Mitglieder  + _
 WHERE Mitglieder.geb='1978-08-26')

Here I get an Error-Message:

Runtime-Error 3464, ...

With DAO, the query has to pass through the Jet Engine, so you need 
to adjust for Jet's idiosyncrasies.
WHERE Mitglieder.geb = #1978-08-26#
That's my best guess.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database

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

To 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 Bug in mysql 3.23.38

2001-06-15 Thread Chris Bolt

 After creating a new database, I ran:

 update user set password = 'SomeJunk' where user = 'root';

 This inserts the string 'SomeJunk' literally into the database,
 unencrypted.  This is SQL expected but the result is a database
 lockout (not to mention the security breach of having the clear
 password stored in a file.

 I got the smart idea to assign a root password like this from the
 Bugzilla-Guide.txt file that comes with Bugzilla.

I just opened Bugzilla-Guide.txt and it says:

mysql UPDATE user SET Password=PASSWORD ('new_password') WHERE user='root';
mysql FLUSH PRIVILEGES;

note the PASSWORD('new_password') instead of just 'new_password'

 If there is a better way to assign passwords, please let me know.

 I tried

 grant all on mysql.* to foo identified by bar;

 Seems to work for creating new accounts.

Try
GRANT ALL PRIVILEGES ON table.* TO user@localhost IDENTIFIED BY 'password';

Since in most cases (web server and mysql on same box) you don't need to
allow users to connect from anywhere. If you want to include a hostname or
wildcard, put it in '' (like '%.host.com' or just '%')

 Also, the user table looks like:

 mysql select host, user, password from user;
 +---+-+--+
  | host   | user | password |
 +---+-+--+
 | localhost | root| 7d30d6e5796d165e |
 | nomis | root| 7d30d6e5796d165e |
 | localhost | |  |
 | nomis | |  |
 | localhost | ShimonR | 7d30d6e5796d165e |
 +---+-+--+
 5 rows in set (0.00 sec)

 Does this mean that any user from localhost or from nomis can connect?

Don't know, but unless they have corresponding rows in another table to
actually give them privileges, they can't do anything.

I don't have rows like that in my user table so they should be safe to
delete.


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

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




RE: order by rand() question

2001-06-15 Thread Chris Bolt

 Gotcha.  So is there any way to return 5 (some number) rows, chosen
 randomly, and then sort them by date (or name or whatever).  So the final
 result is a list, sorted by date, but of rows chosen randomly from the
 table.

CREATE TEMPORARY TABLE temptable TYPE=HEAP SELECT * FROM theTable ORDER BY
RAND() LIMIT 5;
SELECT * FROM temptable ORDER BY date;
DROP TABLE temptable;


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

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




VB, SQL: ...WHERE Mitglieder.geb='1978-08-26' doesn't work

2001-06-15 Thread Florian Lagg

I'm using Visual Basic with DAO 3.6 and I try to execute this query

dim rsPersonen as dao.recordset
Set rsPersonen = db.OpenRecordset( _
SELECT Mitglieder.* FROM Mitglieder  + _
WHERE Mitglieder.geb='1978-08-26')

Here I get an Error-Message:

Runtime-Error 3464, ...

If I use any other SQL-Query-Tool (e.g. MySQLFront) this query works and returns (as 
estimated) 1 Record.

Any other query which is not using any date works, e.g.:

dim rsPersonen as dao.recordset
Set rsPersonen = db.OpenRecordset( _
SELECT Mitglieder.* FROM Mitglieder  + _
WHERE Mitglieder.VName='Florian')

I hope you could help me solving this problem. By the way: Sorry for my bad english!

Thanks
Florian Lagg ([EMAIL PROTECTED])
__
Sie surfen im Internet statt im Meer? Selbst schuld!
Auf zum Strand: http://lastminute.de/?PP=1-0-100-105-1


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

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




Expected speed of MySQL on a 166

2001-06-15 Thread Chris Cameron

I'm currently using a 166 UNIX machine for a dedicated MySQL database,
and I'm interested in knowing what kind of speed I should be expecting
from it. I ask because right now it's at a point of being unusable even
for development on some of the larger queries.

I compiled MySQL 3.23.37 myself with -O6's -march-i586 and various
./configure options I don't remeber. The database I'm using has 3 tables
of about 9 thousand entries, un-indexed decimal(5,8)'s, and a few
tinytext's. There are 168 columns. A query like 'SELECT 97TotalAssets,
98TotalAssets FROM Business WHERE SIC='112'' will take a good 5 seconds.
Any more useful of a query will take up to 90 seconds. All the queries are
SELECT's.

Is there something I can do, or am I going to need something faster than a
166?

Thanks
Chris


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

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   >