Full Text Index and MySQL 4.0.2

2002-07-10 Thread Steve

Now that MySQL 4.0.2 has been released, does anyone know if Support for
always-index words is available?

This is mentioned in the todo:
http://www.mysql.com/doc/F/u/Fulltext_TODO.html

'Support for always-index words. They could be any strings the user wants
to treat as words, examples are C++, AS/400, TCP/IP, etc.'

If this feature is supported, I would appreciate any help in getting this to
work.

Thanks in advance,
Steve


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

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




Implementing commit,transaction in isam table type

2002-07-10 Thread smart chandar

I am using Mysql Db that contains Isam table types,I
am developing a project
that is using interrelated tables,unfortunatily isam
table type doesn't support 
the commit and transaction,but i should implement
that,can anyone give a 
logic for that

thanks in advance

with regards
chandar


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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

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




Re: Connectiing mySQL db on Localhost to mySQL DB on Server

2002-07-10 Thread Terence

www.mysqlfront.de

- Original Message -
From: Thomas Edison Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 1:27 PM
Subject: Connectiing mySQL db on Localhost to mySQL DB on Server


Hi,

I would like to export Table Data which is on my
localhost mySQL Server, to a Table in mySQL on the
Internet Web Server. How can i do that? Basically it's
just moving mySQL Table Data from localhost to web
server on the internet! Is it possible? if so, how?

Thanks,
T. Edison Jr.



__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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

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


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

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




Re: Implementing commit,transaction in isam table type

2002-07-10 Thread Pierre Baridon

why not using innodb tables ?


smart chandar wrote:
 I am using Mysql Db that contains Isam table types,I
 am developing a project
 that is using interrelated tables,unfortunatily isam
 table type doesn't support 
 the commit and transaction,but i should implement
 that,can anyone give a 
 logic for that
 
 thanks in advance
 
 with regards
 chandar
 
 
 __
 Do You Yahoo!?
 Sign up for SBC Yahoo! Dial - First Month Free
 http://sbc.yahoo.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 




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

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




RE: C API: mysql_data_seek

2002-07-10 Thread Chan WieVia ICM N MC MI E3 Extern


Hi,

Thanks for ur reply.

When i commented out the mysql_data_seek() function, mysql_fetch_row()
returns me a non-NULL value (this should be the first row from the MResult).
This results show that I've a valid connection and/or query.  And when I
call mysql_fetch_row() again (retrieving the 2nd row from the MResult,
which is the desired row), it returns me a non-NULL value too.  From this
result, I know that I've not seek past the result set.  However, with the
addition of the mysql_data_seek(MResult, 1) function, a NULL value is
returned.  And that's where I don't know how the mistake was made.

Please advice and thanks.

wv


-Original Message-
From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
Sent: 09 July 2002 23:03
To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
Subject: Re: C API: mysql_data_seek


Hi,

It's ok but you must retrieve data from row.
int sql_result;x,i;
MYSQL_RES *MResult;
MYSQL_ROW *row;
MYSQL *MQuery;
char SQLQuery[];

 sprintf( SQLQuery, SELECT * FROM Profile );
sql_result = mysql_query(SQLQuery);
MResult = mysql_store_result(MQuery);//mysql_store_result return in
MResult  not in MQuery (here was :...mysql_store_result(MQuery))
mysql_data_seek(MResult, 1); //it's ok here...i suppose you whish to
retrieve data from  2-nd row

row = mysql_fetch_row( MResult) ;// if you have a valid connection(or
query) mysql_fetch_row should return non NULL value.

  i = mysql_num_fields(MResult) ;
  for ( x = 0 ; x  i ; x++ )
{
printf(Data from MYSQL_ROW : %s \n,row[x]);
}
 mysql_free_result( res ) ;

I hope it's help.
Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Chan WieVia ICM N MC MI E3 Extern
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 9:29 PM
Subject: C API: mysql_data_seek



 Hi,

 I'm using the MySQL built-in C function, mysql_data_seek, for accessing a
 particular row from the Result (MYSQL_RES) returned by mysql_store_result.

 int sql_result;
 MYSQL_RES *MResult;
 MYSQL_ROW row;
 MYSQL MQuery;
 char SQLQuery[];

 sprintf( SQLQuery, SELECT * FROM Profile );
 sql_result = mysql_query(SQLQuery);
 MResult = mysql_store_result(MQuery);
 mysql_data_seek(MResult, 1);
 row = mysql_fetch_row(MResult);

 However, row returns NULL.  I wonder if I've made any mistake in the
 process.  Can someone please help to check?  In addition, is there any
 special considerations when using this function?

 Thanks in advance.

 wv




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

 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




Warning message with MySQL++ API

2002-07-10 Thread Poizot Emmanuel

Hello,
I just start trying building a program in C++ using MySQL++ API.
I want to use  sql_create_basic_n macros to manage results of queries on my 
database.
So I defined structures using this macro based on the tables of the db.
for example, in the db I have a table defined as follow:
+---+--+--+-+-++| 
Field | Type | Null | Key | Default | Extra  
|+---+--+--+-+-++| 
|| ID   | int(10) unsigned | | PRI | NULL | auto_increment
|| name  | varchar(60)| |  | | 
|| op  | blob  | YES  |  | NULL|  
|| date| datetime| | | -00-00 00:00:00 |  
|+---+--+--+-+-++

and I defined a structure for this table as follow :
sql_create_basic_4(structclass,
0,0,
unsigned int, id,
string, name,
string, op,
Date, sdate)

The problem is when I compiled, I get a lost of warning for each of the 
defined structures:

CGtad.h:10:1: warning: pasting - and id does not give a valid 
preprocessing token
CGtad.h:10:1: warning: pasting - and name does not give a valid 
preprocessing token
CGtad.h:10:1: warning: pasting - and op does not give a valid 
preprocessing token
CGtad.h:10:1: warning: pasting - and sdate does not give a valid 
preprocessing token
CGtad.h:10:1: warning: pasting structclass and :: does not give a valid 
preprocessing token
CGtad.h:10:1: warning: pasting :: and structclass does not give a valid 
preprocessing token
CGtad.h:10:1: warning: pasting populate_structclass and  does not give a 
valid preprocessing token
CGtad.h:10:1: warning: pasting sql_COMPARE__0 and ( does not give a valid 
preprocessing token
etc

Does anyboby have an idear of how to resolve this ?
-- 
Cordialement.

Emmanuel POIZOT
CNAM/INTECHMER
B.P. 324
50103 Cherbourg Cedex
Tèl : 33 (0)2 33 88 73 42
Fax : 33 (0)2 33 88 73 39


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

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




Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Mark Hughes

Hi,

We updated one of our slave servers to 3.3.51 from 3.23.38 and in common
with lots of other posts i've seen we're getting lots of errors where the
slave loses the connection to the master:

020710  7:24:05  Error reading packet from server:  (server_errno=1159)
020710  7:25:05  Slave: Failed reading log event, reconnecting to retry,
log 'update.408' position 131306
020710  7:25:05  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'update.408' at
position 131306
020710  7:26:12  Error reading packet from server:  (server_errno=1159)
020710  7:26:12  Slave: Failed reading log event, reconnecting to retry,
log 'update.408' position 132434
020710  7:26:12  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'update.408' at
position 132434
020710  7:26:42  Error reading packet from server:  (server_errno=1159)
020710  7:27:42  Slave: Failed reading log event, reconnecting to retry,
log 'update.408' position 132434
020710  7:27:42  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'update.408' at
position 132434

These are happening every 60 seconds or so.

Some info on our architecture

System: Linux int04948-2 2.2.19-6.2.16 #1 Wed Mar 13 13:03:05 EST 2002
i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='gcc'  CFLAGS=' -O3'  CXX='gcc'  CXXFLAGS=' -O3
-felide-constructors -fno-exceptions -fno-rtti  '
LDFLAGS=''
LIBC:
lrwxrwxrwx   1 root root   13 Jul  9 16:49 /lib/libc.so.6 -
libc-2.1.3.so
-rwxr-xr-x   1 root root  4105868 Dec  8  2001 /lib/libc-2.1.3.so
-rw-r--r--   1 root root 20299228 Dec  8  2001 /usr/lib/libc.a
-rw-r--r--   1 root root  178 Dec  8  2001 /usr/lib/libc.so
Configure command: ./configure --disable-shared
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
--without-berkeley-db --without-innodb --enable-assembler
--enable-local-infile --with-mysqld-user=mysql
--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
--with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql
--infodir=/usr/info --includedir=/usr/include --mandir=/usr/man
'--with-comment=Official MySQL RPM' CC=gcc 'CFLAGS= -O3' 'CXXFLAGS= -O3
-felide-constructors -fno-exceptions -fno-rtti  ' CXX=gcc
Perl: This is perl, version 5.005_03 built for i386-linux

I couldn't find a solution to this, is it a known problem with 3.3.51 ?

Thanks,
Mark.


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

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




Re: C API: mysql_data_seek

2002-07-10 Thread Gelu Gogancea

Hi,

If i understand well you use twice mysql_data_seek.If you use
mysql_data_seek() after mysql_fetch_row() the effect is NULL.
Because mysql_data_seek() (in fact) set the cursor (if we can said like
this...) in the MResult (MYSQL_RES) and not in the row (MYSQL_ROW).

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Chan WieVia ICM N MC MI E3 Extern
[EMAIL PROTECTED]
To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 10:13 AM
Subject: RE: C API: mysql_data_seek



 Hi,

 Thanks for ur reply.

 When i commented out the mysql_data_seek() function,
mysql_fetch_row()
 returns me a non-NULL value (this should be the first row from the
MResult).
 This results show that I've a valid connection and/or query.  And when I
 call mysql_fetch_row() again (retrieving the 2nd row from the MResult,
 which is the desired row), it returns me a non-NULL value too.  From this
 result, I know that I've not seek past the result set.  However, with the
 addition of the mysql_data_seek(MResult, 1) function, a NULL value is
 returned.  And that's where I don't know how the mistake was made.

 Please advice and thanks.

 wv


 -Original Message-
 From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
 Sent: 09 July 2002 23:03
 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
 Subject: Re: C API: mysql_data_seek


 Hi,

 It's ok but you must retrieve data from row.
 int sql_result;x,i;
 MYSQL_RES *MResult;
 MYSQL_ROW *row;
 MYSQL *MQuery;
 char SQLQuery[];

  sprintf( SQLQuery, SELECT * FROM Profile );
 sql_result = mysql_query(SQLQuery);
 MResult = mysql_store_result(MQuery);//mysql_store_result return
in
 MResult  not in MQuery (here was :...mysql_store_result(MQuery))
 mysql_data_seek(MResult, 1); //it's ok here...i suppose you whish to
 retrieve data from  2-nd row

 row = mysql_fetch_row( MResult) ;// if you have a valid connection(or
 query) mysql_fetch_row should return non NULL value.

   i = mysql_num_fields(MResult) ;
   for ( x = 0 ; x  i ; x++ )
 {
 printf(Data from MYSQL_ROW : %s \n,row[x]);
 }
  mysql_free_result( res ) ;

 I hope it's help.
 Regards,

 Gelu
 _
 G.NET SOFTWARE COMPANY

 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: Chan WieVia ICM N MC MI E3 Extern
 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 09, 2002 9:29 PM
 Subject: C API: mysql_data_seek


 
  Hi,
 
  I'm using the MySQL built-in C function, mysql_data_seek, for accessing
a
  particular row from the Result (MYSQL_RES) returned by
mysql_store_result.
 
  int sql_result;
  MYSQL_RES *MResult;
  MYSQL_ROW row;
  MYSQL MQuery;
  char SQLQuery[];
 
  sprintf( SQLQuery, SELECT * FROM Profile );
  sql_result = mysql_query(SQLQuery);
  MResult = mysql_store_result(MQuery);
  mysql_data_seek(MResult, 1);
  row = mysql_fetch_row(MResult);
 
  However, row returns NULL.  I wonder if I've made any mistake in the
  process.  Can someone please help to check?  In addition, is there any
  special considerations when using this function?
 
  Thanks in advance.
 
  wv
 
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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: Implementing commit,transaction in isam table type

2002-07-10 Thread Bert VdB

Seems fairly impossible to me to really emulate transactions on a
non-transactional db.
Even if you develop a system where you :
a. collect all queries untill the end and then perform them in 1 block
b. keep your own logs of the queries and be able to roll them back in case
of error
even then it will not be a real transaction, because for example :
- a server-crash whilest doing the 1-block-query will corrupt the database
- same for the roll back you have written
- you don't have isolation levels, so queries will read wrong data
- ...

Switch to InnoDB is my advice :)

B.

-Original Message-
From: Pierre Baridon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 08:11
To: smart chandar; [EMAIL PROTECTED]
Subject: Re: Implementing commit,transaction in isam table type


why not using innodb tables ?


smart chandar wrote:
 I am using Mysql Db that contains Isam table types,I
 am developing a project
 that is using interrelated tables,unfortunatily isam
 table type doesn't support 
 the commit and transaction,but i should implement
 that,can anyone give a 
 logic for that
 
 thanks in advance
 
 with regards
 chandar
 
 
 __
 Do You Yahoo!?
 Sign up for SBC Yahoo! Dial - First Month Free
 http://sbc.yahoo.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 




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

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

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

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




Best Journaling file system?

2002-07-10 Thread Iago Sineiro

Hi all.

Which is the best journaling file system for mysql and innodb?

Ext3 or Reiserfs?

Innodb needs a journaling file system or is better use ext2?

Iago.


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

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




Bug with AUTO_INCREMENT

2002-07-10 Thread Steve Hay

Hi,

Continuing my troubles with AUTO_INCREMENT (which nobody has yet 
responded to), I've now ruled the Perl DBI out of the equation and 
reproduced the same problem using the mysql.exe command-line tool.

Hopefully somebody will be tempted to help this time now that there is 
no Perl involved to put people off?

The bug can be reproduced as follows:

Create the following simple database containing just one BDB table:

CREATE DATABASE test;

CREATE TABLE foo (
   id INT NOT NULL AUTO_INCREMENT,
   num INT,
   str VARCHAR(10),
   PRIMARY KEY (id)
) TYPE=BDB;

Now start two mysql.exe sessions running with the -f flag to ignore 
errors.

Set each one into no auto-commit mode with:

SET AUTOCOMMIT=0;

and then feed each of them the following two lines 50,000 times each:

INSERT INTO foo (num, str) VALUES (1, 'a');
COMMIT;

On my NT4 machine I do this with the simple Perl program (I know I said 
Perl wasn't involved, but the Perl DBI still isn't):

sql.pl
--
print SET AUTOCOMMIT=0;\n;
for (1 .. 5) {
print INSERT INTO foo (num, str) VALUES (1, 'a');\n;
print COMMIT;\n;
}

I pipe the output from this to the mysql.exe programs, and then 
re-direct STDERR from that to log files, e.g.:

Command Prompt One:
\perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2 
session1.txt

Command Prompt Two:
\perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2 
session2.txt

When I inspect the output collected in these log files I find, not 
unexpectedly, that there are many deadlock errors (which I'm quite 
comfortable with, and can handle in my real software by simply retrying 
the transaction), but that there are also a few of the following error:

Duplicate entry '1' for key 1

Surely this is a bug isn't it?

The transaction that is being performed 50,000 times each by the two 
mysql.exe sessions doesn't specify any value for the AUTO_INCREMENT 
column id - it just leaves it up to the database to choose the next 
value.

This error suggests that the database has wrongly chosen the value '1', 
and then (rightly) complains that it is already used!

I would really appreciate a response on this one as I'm now at the end 
of my tether trying to work out what is wrong.

Thanks in advance,

Steve



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

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




Re: [mysql] Elevar un numero a potencia

2002-07-10 Thread Daniel BI

o
POWER( (monto+12), 2 )
o
POW( (monto+12), 2 )

- Original Message -
From: Daniel BI [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 10:16 AM
Subject: Re: [mysql] Elevar un numero a potencia


 (monto+12)*(monto+12)

 :)

 - Original Message -
 From: Hernan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, July 10, 2002 12:22 AM
 Subject: [mysql] Elevar un numero a potencia


  Hola
 
  Alguno sabe como elever un numero a una potencia en una instruccion sql
 
  necesito elevar (monto+12)^2
 
  Saludos
 
 
  -
  Para darte de baja, envía un mensaje a: [EMAIL PROTECTED]
  Para obtener ayuda, visita http://www.eListas.net/foro/mysql
 
 
 
  ___
  Visita nuestro patrocinador:
 
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
  Vuela a Estados Unidos, Europa, Asia, Africa...!!!
  ¡Solo en KLM - Ofertas Especiales!
  Para reservar las tarifas más bajas garantizadas...
  ...haz clic aquí - http://elistas.net/ml/77/##K
 
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
 
 



-
Before posting, please check:
   http://www.mysql.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




RE: C API: mysql_data_seek

2002-07-10 Thread Chan WieVia ICM N MC MI E3 Extern

Hi Gelu,

Thnx for the prompt reply.

I called mysql_data_seek() once and I called it before mysql_fetch_row().
With this, mysql_fetch_row() returns NULL row.

Then I decided to check if the connection (and query) is valid by commented
out mysql_data_seek().  I called only mysql_fetch_row() and it returns
non-NULL row.  From the result, I  know that the connection and the query
are valid.

The next thing I check is the number of rows in the MResult.  I have 3 rows
altogether.  Hence, it should return me something if I set the cursor (using
mysql_seek_data() ) to the 2nd row and then get the row with
mysql_fetch_row().  However, this does not work.

I've checked my concept on mysql_data_seek() against the description you
have provided in the first reply, and I do not detect any different. Hence I
presume the mistake was made due to some special considerations which I do
not know.  Please advice.

Once again, thnx for replying.

Regards,
wv


-Original Message-
From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
Sent: 10 July 2002 09:38
To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
Subject: Re: C API: mysql_data_seek


Hi,

If i understand well you use twice mysql_data_seek.If you use
mysql_data_seek() after mysql_fetch_row() the effect is NULL.
Because mysql_data_seek() (in fact) set the cursor (if we can said like
this...) in the MResult (MYSQL_RES) and not in the row (MYSQL_ROW).

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Chan WieVia ICM N MC MI E3 Extern
[EMAIL PROTECTED]
To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 10:13 AM
Subject: RE: C API: mysql_data_seek



 Hi,

 Thanks for ur reply.

 When i commented out the mysql_data_seek() function,
mysql_fetch_row()
 returns me a non-NULL value (this should be the first row from the
MResult).
 This results show that I've a valid connection and/or query.  And when I
 call mysql_fetch_row() again (retrieving the 2nd row from the MResult,
 which is the desired row), it returns me a non-NULL value too.  From this
 result, I know that I've not seek past the result set.  However, with the
 addition of the mysql_data_seek(MResult, 1) function, a NULL value is
 returned.  And that's where I don't know how the mistake was made.

 Please advice and thanks.

 wv


 -Original Message-
 From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
 Sent: 09 July 2002 23:03
 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
 Subject: Re: C API: mysql_data_seek


 Hi,

 It's ok but you must retrieve data from row.
 int sql_result;x,i;
 MYSQL_RES *MResult;
 MYSQL_ROW *row;
 MYSQL *MQuery;
 char SQLQuery[];

  sprintf( SQLQuery, SELECT * FROM Profile );
 sql_result = mysql_query(SQLQuery);
 MResult = mysql_store_result(MQuery);//mysql_store_result return
in
 MResult  not in MQuery (here was :...mysql_store_result(MQuery))
 mysql_data_seek(MResult, 1); //it's ok here...i suppose you whish to
 retrieve data from  2-nd row

 row = mysql_fetch_row( MResult) ;// if you have a valid connection(or
 query) mysql_fetch_row should return non NULL value.

   i = mysql_num_fields(MResult) ;
   for ( x = 0 ; x  i ; x++ )
 {
 printf(Data from MYSQL_ROW : %s \n,row[x]);
 }
  mysql_free_result( res ) ;

 I hope it's help.
 Regards,

 Gelu
 _
 G.NET SOFTWARE COMPANY

 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: Chan WieVia ICM N MC MI E3 Extern
 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 09, 2002 9:29 PM
 Subject: C API: mysql_data_seek


 
  Hi,
 
  I'm using the MySQL built-in C function, mysql_data_seek, for accessing
a
  particular row from the Result (MYSQL_RES) returned by
mysql_store_result.
 
  int sql_result;
  MYSQL_RES *MResult;
  MYSQL_ROW row;
  MYSQL MQuery;
  char SQLQuery[];
 
  sprintf( SQLQuery, SELECT * FROM Profile );
  sql_result = mysql_query(SQLQuery);
  MResult = mysql_store_result(MQuery);
  mysql_data_seek(MResult, 1);
  row = mysql_fetch_row(MResult);
 
  However, row returns NULL.  I wonder if I've made any mistake in the
  process.  Can someone please help to check?  In addition, is there any
  special considerations when using this function?
 
  Thanks in advance.
 
  wv
 
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To 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 problem even worse!

2002-07-10 Thread Steve Hay

[EMAIL PROTECTED] wrote:

Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

sql,query

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:

Mike Hall wrote:

Well if you try and INSERT '1' into a unique field several times, of course
it is going to fail. That is expected behaviour, not a bug.

Yes, I realise that, but I'm not INSERTing '1' into a UNIQUE field.

The '1' in the code below is INSERTed into the 'num' column, which, if 
you look at the database definition, is not specified as UNIQUE.

The error that I'm getting refers to key 1, which is the 'id' column. 
 You'll note that I'm not specifying a value for the 'id' column - I 
leave it up to the database to choose a value itself (it is an 
AUTO_INCREMENT column) and it keeps wrongly choosing a value that is 
already used.

I'd say that IS a bug.

- Steve

for (my $deadlocks = 0, my $total = 0, my $i = 1; $i = 5; $i++) {
   $total++;

   eval {
   $dbh-do(INSERT INTO foo (num, str) VALUES (1, 'a'));
   $dbh-commit();
   };








-- 
Klein bottle for rent - enquire within.




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

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




Re: SQL select rows conditional on same select

2002-07-10 Thread Carl Franks

Thanks Chuck!

The last example you gave looked just right, but when I ran it, it returned
an error.
A quick look at the mysql manual revealed that UNION SELECTs are on the TO
DO list for mysql :(

With the examples you provided though, I was able to create the following
statement which returns exactly what I wanted.

select distinct X.id, X.title from X, Y
where X.id=Z or (X.id=Y.assoc and Y.id=Z);

when Z = 1
++---+
| id | title |
++---+
|  1 | one   |
|  3 | three |
++---+

when Z = 2
++---+
| id | title |
++---+
|  2 | two   |
|  3 | three |
|  4 | four  |
++---+

and when Z = 3 or 4 or 5, it just returns the single row that I would
expect.

Again, thanks.
Carl


 Carl Franks wrote:
 Hi,

 I have 2 tables, X and Y.

 table X  table Y
 ++---+   ++---+
 | id | title |   | id | assoc |
 ++---+   ++---+
 |  1 | one   |   |  1 | 3 |
 |  2 | two   |   |  2 | 3 |
 |  3 | three |   |  2 | 4 |
 |  4 | four  |   ++---+
 |  5 | five  |
 ++---+

 I wish to retrieve the X.id and X.title where X.id=Z
 select X.id, X.title from X where X.id = Z
 and also the X.id and X.title where (X.id=Y.assoc) when (Y.id=X.id)
 select X.id, X.title from X, Y where X.id = Y.assoc and X.id = Y.id
 So... I think you want the OR of those two statements.  The obvious
 way to do this might be:
 select X.id, X.title from X where X.id = Z
 union
 select X.id, X.title from X, Y where X.id = Y.assoc and X.id = Y.id
 or:
 select X.id, X.title from X, Y
 where ( X.id = Z and not exists (select * from X, Y where X.id =
 Y.assoc and X.id = Y.id)
or  X.id = Y.assoc and X.id = Y.id)
 The above won't work in current versions of mysql, and probably can't make
 very good use of indices.
 It can be simulated in mysql via:
 select distinct X.id, X.title from X, Y
 where ( X.id = Z
or  X.id = Y.assoc and X.id = Y.id)

 but I'm trouble trying to express this as a single SQL statement.
 Could someone help me out with this, or at least give me a clue as to how to
 think this one through?

 In case I haven't explained it very well, I'll describe exactly what I'm
 doing.
 Z is a product number, and I want to retrieve the (table X) data for product
 Z and also the (table X) data for any other products associated with it,
 represented by table Y.
 The above paragraph seems different than what you said above.  To get
 the data for products associated with product Z, I think you want

 Y.id = Z and X.id = Y.assoc

 select X.id, X.title from X where X.id = Z
 union
 select X.id, X.title from X, Y where X.id = Y.assoc and Y.id = Z

 Chuck


 I know I could do it using 2 select statements, firstly just selecting
 X.id, X.title, Y.id, Y.assoc where X.id=Z
 (I'm using perl DBI)
 and then within the perl program create another SQL statement selecting
 X.id, X.title WHERE Y.assoc IS NOT NULL in the results from the first
 select.
 However, I would like to do this with one SELECT if it's possible, for
 efficiency.

 Thanks,
 Carl







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

 To request this thread, e-mail [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 mailto:[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: C API: mysql_data_seek

2002-07-10 Thread Gelu Gogancea

Hi,
If i understand well, mysql_fetch_row() work fine but if you add
mysql_data_seek() the row is NULL.
...you use pointers when declare variables ?In my pre-previuos e-mail i fill
what (i considered) it's not was OK.

MYSQL_RES *MResult;
MYSQL_ROW *row;
MYSQL *MQuery;

instead...

MYSQL_RES *MResult;
MYSQL_ROW row;
MYSQL MQuery;


Regards,

Gelu

_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Chan WieVia ICM N MC MI E3 Extern
[EMAIL PROTECTED]
To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 11:42 AM
Subject: RE: C API: mysql_data_seek


 Hi Gelu,

 Thnx for the prompt reply.

 I called mysql_data_seek() once and I called it before mysql_fetch_row().
 With this, mysql_fetch_row() returns NULL row.

 Then I decided to check if the connection (and query) is valid by
commented
 out mysql_data_seek().  I called only mysql_fetch_row() and it returns
 non-NULL row.  From the result, I  know that the connection and the query
 are valid.

 The next thing I check is the number of rows in the MResult.  I have 3
rows
 altogether.  Hence, it should return me something if I set the cursor
(using
 mysql_seek_data() ) to the 2nd row and then get the row with
 mysql_fetch_row().  However, this does not work.

 I've checked my concept on mysql_data_seek() against the description you
 have provided in the first reply, and I do not detect any different. Hence
I
 presume the mistake was made due to some special considerations which I do
 not know.  Please advice.

 Once again, thnx for replying.

 Regards,
 wv


 -Original Message-
 From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
 Sent: 10 July 2002 09:38
 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
 Subject: Re: C API: mysql_data_seek


 Hi,

 If i understand well you use twice mysql_data_seek.If you use
 mysql_data_seek() after mysql_fetch_row() the effect is NULL.
 Because mysql_data_seek() (in fact) set the cursor (if we can said like
 this...) in the MResult (MYSQL_RES) and not in the row (MYSQL_ROW).

 Regards,

 Gelu
 _
 G.NET SOFTWARE COMPANY

 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: Chan WieVia ICM N MC MI E3 Extern
 [EMAIL PROTECTED]
 To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, July 10, 2002 10:13 AM
 Subject: RE: C API: mysql_data_seek


 
  Hi,
 
  Thanks for ur reply.
 
  When i commented out the mysql_data_seek() function,
 mysql_fetch_row()
  returns me a non-NULL value (this should be the first row from the
 MResult).
  This results show that I've a valid connection and/or query.  And when I
  call mysql_fetch_row() again (retrieving the 2nd row from the MResult,
  which is the desired row), it returns me a non-NULL value too.  From
this
  result, I know that I've not seek past the result set.  However, with
the
  addition of the mysql_data_seek(MResult, 1) function, a NULL value is
  returned.  And that's where I don't know how the mistake was made.
 
  Please advice and thanks.
 
  wv
 
 
  -Original Message-
  From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
  Sent: 09 July 2002 23:03
  To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
  Subject: Re: C API: mysql_data_seek
 
 
  Hi,
 
  It's ok but you must retrieve data from row.
  int sql_result;x,i;
  MYSQL_RES *MResult;
  MYSQL_ROW *row;
  MYSQL *MQuery;
  char SQLQuery[];
 
   sprintf( SQLQuery, SELECT * FROM Profile );
  sql_result = mysql_query(SQLQuery);
  MResult = mysql_store_result(MQuery);//mysql_store_result return
 in
  MResult  not in MQuery (here was :...mysql_store_result(MQuery))
  mysql_data_seek(MResult, 1); //it's ok here...i suppose you whish to
  retrieve data from  2-nd row
 
  row = mysql_fetch_row( MResult) ;// if you have a valid
connection(or
  query) mysql_fetch_row should return non NULL value.
 
i = mysql_num_fields(MResult) ;
for ( x = 0 ; x  i ; x++ )
  {
  printf(Data from MYSQL_ROW : %s \n,row[x]);
  }
   mysql_free_result( res ) ;
 
  I hope it's help.
  Regards,
 
  Gelu
  _
  G.NET SOFTWARE COMPANY
 
  Permanent e-mail address : [EMAIL PROTECTED]
[EMAIL PROTECTED]
  - Original Message -
  From: Chan WieVia ICM N MC MI E3 Extern
  [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, July 09, 2002 9:29 PM
  Subject: C API: mysql_data_seek
 
 
  
   Hi,
  
   I'm using the MySQL built-in C function, mysql_data_seek, for
accessing
 a
   particular row from the Result (MYSQL_RES) returned by
 mysql_store_result.
  
   int sql_result;
   MYSQL_RES *MResult;
   MYSQL_ROW row;
   

debian package

2002-07-10 Thread Pierre Baridon


is there any debian package of mysql supporting innodb ?


thanks,

Pierre




--
sql,query


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

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




script - full backup of mysql databases

2002-07-10 Thread adi

There is a script for RH Linux for each day automatic full backup of mysql
databases?
(the results may be like: backup_mmdd.sql, so it can be easily imported)

tx in adv for any help



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

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




How to Connect two mySQL Tables

2002-07-10 Thread Thomas Edison Jr.

Hi,

If i have two seperate mySQL Tables in my database,
with some information.. and i would like to connect
the two tables so as to get Relevant Data picked up
from the relevant Table and it's relevant fields. 

Do we need to use a Foriegn/Primary key for this
purpose? If so, how do you use them? I coudln't find a
suitable description on using  the Foriegn Keys in the
mySQL Manual.

Thanks,
T. Edison Jr.



__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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

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




email address authentification .....

2002-07-10 Thread toby -



hi guys

im sure theres a function to check for a valid email address entered by user 
before storing it into the db but i cant locate it in php manuel NOR in 
mysql manuel

will someone plz tell me bout it ?

thnx a million

toby .

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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

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




Re: Controlling a database size

2002-07-10 Thread Victoria Reznichenko

JvdW,
Tuesday, July 09, 2002, 3:03:17 PM, you wrote:

J I have a quick newbie question. How would I limit the size a database can grow 
J to in mysql? Let's say I want to limit my database to 20MB. How would I do 
J this? Would this be done on a user level or the actual database?

You can't do it with MySQL, use disk quotas. If the size of database
will be more that available user will get error 28: No space left on device.




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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

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




Re: bug with like, latin1 and umlaut ü/y

2002-07-10 Thread Victoria Reznichenko

oliver,
Wednesday, July 10, 2002, 2:33:06 AM, you wrote:

Description:
o I was trying to find every row in a table which contains the umlaut
o ü (ue). MySQL listed every row which contained the umlaut and rows
o which contained the letter y, but no umlaut... Client and server
o characterset is latin1.

As far as I understand you want to enable correct German sorting order?
If so, since 4.0.0. MySQL supports latin_de character set.
   http://www.mysql.com/doc/G/e/German_character_set.html




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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

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




Re: Connectiing mySQL db on Localhost to mySQL DB on Server

2002-07-10 Thread Egor Egorov

Thomas,
Wednesday, July 10, 2002, 8:27:06 AM, you wrote:

TEJ I would like to export Table Data which is on my
TEJ localhost mySQL Server, to a Table in mySQL on the
TEJ Internet Web Server. How can i do that? Basically it's
TEJ just moving mySQL Table Data from localhost to web
TEJ server on the internet! Is it possible? if so, how?

mysqldump -hlocalhost -uuser_name -p database_name table_name | mysql
-hremote_host_name -uuser_name -p database_name1

http://www.mysql.com/doc/m/y/mysqldump.html

or you can make a dump file and then copy it on your remote server.

Take a look also at SELECT INTO OUTFILE and LOAD DATA INFILE
statements:
   http://www.mysql.com/doc/L/O/LOAD_DATA.html
   http://www.mysql.com/doc/S/E/SELECT.html





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com



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

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




Re: How to Connect two mySQL Tables

2002-07-10 Thread Victoria Reznichenko

Thomas,
Wednesday, July 10, 2002, 1:15:35 PM, you wrote:

TEJ If i have two seperate mySQL Tables in my database,
TEJ with some information.. and i would like to connect
TEJ the two tables so as to get Relevant Data picked up
TEJ from the relevant Table and it's relevant fields. 

TEJ Do we need to use a Foriegn/Primary key for this
TEJ purpose?

You can join several tables in SELECT statements without foreign keys,
f.e.
SELECT * FROM table1, table2 WHERE table1.column1=table2.column2;

Please, check the MySQL manual:
http://www.mysql.com/doc/M/u/Multiple_tables.html

Foreign keys are used for Referential Integrity ...

TEJ If so, how do you use them? I coudln't find a
TEJ suitable description on using  the Foriegn Keys in the
TEJ mySQL Manual.

http://www.mysql.com/doc/S/E/SEC446.html
http://www.mysql.com/doc/e/x/example-Foreign_keys.html
http://www.mysql.com/doc/A/N/ANSI_diff_Foreign_Keys.html




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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

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




Re: Token parsing incorrect behavior

2002-07-10 Thread Egor Egorov

robbat2,
Wednesday, July 10, 2002, 7:01:39 AM, you wrote:

r Description:
r I have been writing an SQL tokenizer for the phpMyAdmin project, on which I 
am a core developer.
r I used this page (Manual 6.1.2 Database, Table, Index, Column, and Alias Names) for 
reference 
r as to what a valid token was. As well as this reference on SQL User Variables 
(Manual 6.1.4 User Variables).

r Most specificly, it states that an identifier CAN start with a number.
r Ergo,
r 0xff could be an identifer or a hexadecimal number.

r However,
r 0xgff and 0xffg
r are not valid hexadecimal numbers, and are only valid as identifiers.

r Use my SQL fragment below, and note the results of the two SELECT queries.  

r While the 0xgff column produces correct results, The 0xfge column does not. The 
column title is garbled.

r How-To-Repeat:
r CREATE TABLE `strtest` (
r   `0xfge` int(10) unsigned zerofill NOT NULL auto_increment,
r   `0xgff` varchar(255) NOT NULL default '',
r   PRIMARY KEY  (`0xfge`)
r ) TYPE=MyISAM;
r INSERT INTO strtest VALUES (01, 'Foo');

r SELECT * FROM strtest;
r SELECT 0xfge,0xgff FROM strtest;

Fix:
r Make tokens that fail as being hexadecimal numbers be recognized as 
identifiers only.

You should quote column name as in your CREATE TABLE statement:
mysql SELECT `0xfge`,`0xgff` FROM strtest;
++---+
| 0xfge  | 0xgff |
++---+
| 01 | Foo   |
++---+
1 row in set (0.00 sec)





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com



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

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




Visio-mysql driver question

2002-07-10 Thread Nixarlidis Aris

hi,
I'm trying to get Visio work with mysql to get a visual representation of 
my data base.Visio asks for a 'Visio Database Driver' for mysql.Does 
anyone know if such a driver exists or if what I;m trying to do can be 
done or not?
Thanks,Aris


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

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




RE: C API: mysql_data_seek

2002-07-10 Thread Chan WieVia ICM N MC MI E3 Extern

Hi Gelu,

Yes, you are right in getting my problem.

I tried using pointers when declaring the variables

MYSQL_ROW *row;
MYSQL *MQuery;

However, I do not get the desired result too.  
Besides pointer, do you know any other possible mistakes?

Really appreciate your response.

wv





-Original Message-
From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
Sent: 10 July 2002 11:02
To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
Subject: Re: C API: mysql_data_seek


Hi,
If i understand well, mysql_fetch_row() work fine but if you add
mysql_data_seek() the row is NULL.
...you use pointers when declare variables ?In my pre-previuos e-mail i fill
what (i considered) it's not was OK.

MYSQL_RES *MResult;
MYSQL_ROW *row;
MYSQL *MQuery;

instead...

MYSQL_RES *MResult;
MYSQL_ROW row;
MYSQL MQuery;


Regards,

Gelu

_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Chan WieVia ICM N MC MI E3 Extern
[EMAIL PROTECTED]
To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 11:42 AM
Subject: RE: C API: mysql_data_seek


 Hi Gelu,

 Thnx for the prompt reply.

 I called mysql_data_seek() once and I called it before mysql_fetch_row().
 With this, mysql_fetch_row() returns NULL row.

 Then I decided to check if the connection (and query) is valid by
commented
 out mysql_data_seek().  I called only mysql_fetch_row() and it returns
 non-NULL row.  From the result, I  know that the connection and the query
 are valid.

 The next thing I check is the number of rows in the MResult.  I have 3
rows
 altogether.  Hence, it should return me something if I set the cursor
(using
 mysql_seek_data() ) to the 2nd row and then get the row with
 mysql_fetch_row().  However, this does not work.

 I've checked my concept on mysql_data_seek() against the description you
 have provided in the first reply, and I do not detect any different. Hence
I
 presume the mistake was made due to some special considerations which I do
 not know.  Please advice.

 Once again, thnx for replying.

 Regards,
 wv


 -Original Message-
 From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
 Sent: 10 July 2002 09:38
 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
 Subject: Re: C API: mysql_data_seek


 Hi,

 If i understand well you use twice mysql_data_seek.If you use
 mysql_data_seek() after mysql_fetch_row() the effect is NULL.
 Because mysql_data_seek() (in fact) set the cursor (if we can said like
 this...) in the MResult (MYSQL_RES) and not in the row (MYSQL_ROW).

 Regards,

 Gelu
 _
 G.NET SOFTWARE COMPANY

 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: Chan WieVia ICM N MC MI E3 Extern
 [EMAIL PROTECTED]
 To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, July 10, 2002 10:13 AM
 Subject: RE: C API: mysql_data_seek


 
  Hi,
 
  Thanks for ur reply.
 
  When i commented out the mysql_data_seek() function,
 mysql_fetch_row()
  returns me a non-NULL value (this should be the first row from the
 MResult).
  This results show that I've a valid connection and/or query.  And when I
  call mysql_fetch_row() again (retrieving the 2nd row from the MResult,
  which is the desired row), it returns me a non-NULL value too.  From
this
  result, I know that I've not seek past the result set.  However, with
the
  addition of the mysql_data_seek(MResult, 1) function, a NULL value is
  returned.  And that's where I don't know how the mistake was made.
 
  Please advice and thanks.
 
  wv
 
 
  -Original Message-
  From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
  Sent: 09 July 2002 23:03
  To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
  Subject: Re: C API: mysql_data_seek
 
 
  Hi,
 
  It's ok but you must retrieve data from row.
  int sql_result;x,i;
  MYSQL_RES *MResult;
  MYSQL_ROW *row;
  MYSQL *MQuery;
  char SQLQuery[];
 
   sprintf( SQLQuery, SELECT * FROM Profile );
  sql_result = mysql_query(SQLQuery);
  MResult = mysql_store_result(MQuery);//mysql_store_result return
 in
  MResult  not in MQuery (here was :...mysql_store_result(MQuery))
  mysql_data_seek(MResult, 1); //it's ok here...i suppose you whish to
  retrieve data from  2-nd row
 
  row = mysql_fetch_row( MResult) ;// if you have a valid
connection(or
  query) mysql_fetch_row should return non NULL value.
 
i = mysql_num_fields(MResult) ;
for ( x = 0 ; x  i ; x++ )
  {
  printf(Data from MYSQL_ROW : %s \n,row[x]);
  }
   mysql_free_result( res ) ;
 
  I hope it's help.
  Regards,
 
  Gelu
  _
  G.NET SOFTWARE COMPANY
 
  Permanent e-mail address : [EMAIL 

Newbie Authentication question

2002-07-10 Thread Eddie Willett

Is there a way to do pass through authentication from NT to mysql
running on linux.  I looking for something like what samba does.  If I
can't do that what about ldap authentication.  I don't want to have to
setup a new account for all the users because a) that another account I
have to maintain b) the users would hate it.  If anyone has any ideas
please tell me.

Eddie


__
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that you must not read this transmission and
that any disclosure, copying, printing, distribution or use of this
transmission is strictly prohibited. If you have received this
transmission in error, please immediately notify the sender by telephone
or return email and delete the original transmission and its attachments
without reading or saving in any manner.
__

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

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




Foreign keys in MySQL

2002-07-10 Thread Hanxue Lee

Hi,

In the MySQL documentation, it is stated that

foreign keys in SQL are not used to join tables, but are used mostly for
checking referential integrity (foreign key constraints). 

Does it mean that constraints are not supported? I need to have Update and
perhaps Delete Referential Integrity.


Yours Truly,
Hanxue



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

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




Re: C API: mysql_data_seek

2002-07-10 Thread Gelu Gogancea

Hi,
Resume
I understand that you use C API functions in the right order:

mysql_init()
mysql_option()
mysql_real_connect()
mysql_real_query()
mysql_store_result()
mysql_data_seek()
mysql_fetch_field()
mysql_fetch_row()
mysql_free_result()
mysql_close()

Question :
What version of libmysql.dll and what compilers you used ?
I put this question because i wish to send to you an example with
mysql_data_seek();

Regards,

Gelu

_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Chan WieVia ICM N MC MI E3 Extern
[EMAIL PROTECTED]
To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 3:03 PM
Subject: RE: C API: mysql_data_seek


 Hi Gelu,

 Yes, you are right in getting my problem.

 I tried using pointers when declaring the variables

 MYSQL_ROW *row;
 MYSQL *MQuery;

 However, I do not get the desired result too.
 Besides pointer, do you know any other possible mistakes?

 Really appreciate your response.

 wv





 -Original Message-
 From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
 Sent: 10 July 2002 11:02
 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
 Subject: Re: C API: mysql_data_seek


 Hi,
 If i understand well, mysql_fetch_row() work fine but if you add
 mysql_data_seek() the row is NULL.
 ...you use pointers when declare variables ?In my pre-previuos e-mail i
fill
 what (i considered) it's not was OK.

 MYSQL_RES *MResult;
 MYSQL_ROW *row;
 MYSQL *MQuery;

 instead...

 MYSQL_RES *MResult;
 MYSQL_ROW row;
 MYSQL MQuery;


 Regards,

 Gelu

 _
 G.NET SOFTWARE COMPANY

 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: Chan WieVia ICM N MC MI E3 Extern
 [EMAIL PROTECTED]
 To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, July 10, 2002 11:42 AM
 Subject: RE: C API: mysql_data_seek


  Hi Gelu,
 
  Thnx for the prompt reply.
 
  I called mysql_data_seek() once and I called it before
mysql_fetch_row().
  With this, mysql_fetch_row() returns NULL row.
 
  Then I decided to check if the connection (and query) is valid by
 commented
  out mysql_data_seek().  I called only mysql_fetch_row() and it returns
  non-NULL row.  From the result, I  know that the connection and the
query
  are valid.
 
  The next thing I check is the number of rows in the MResult.  I have 3
 rows
  altogether.  Hence, it should return me something if I set the cursor
 (using
  mysql_seek_data() ) to the 2nd row and then get the row with
  mysql_fetch_row().  However, this does not work.
 
  I've checked my concept on mysql_data_seek() against the description you
  have provided in the first reply, and I do not detect any different.
Hence
 I
  presume the mistake was made due to some special considerations which I
do
  not know.  Please advice.
 
  Once again, thnx for replying.
 
  Regards,
  wv
 
 
  -Original Message-
  From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
  Sent: 10 July 2002 09:38
  To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
  Subject: Re: C API: mysql_data_seek
 
 
  Hi,
 
  If i understand well you use twice mysql_data_seek.If you use
  mysql_data_seek() after mysql_fetch_row() the effect is NULL.
  Because mysql_data_seek() (in fact) set the cursor (if we can said like
  this...) in the MResult (MYSQL_RES) and not in the row (MYSQL_ROW).
 
  Regards,
 
  Gelu
  _
  G.NET SOFTWARE COMPANY
 
  Permanent e-mail address : [EMAIL PROTECTED]
[EMAIL PROTECTED]
  - Original Message -
  From: Chan WieVia ICM N MC MI E3 Extern
  [EMAIL PROTECTED]
  To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Wednesday, July 10, 2002 10:13 AM
  Subject: RE: C API: mysql_data_seek
 
 
  
   Hi,
  
   Thanks for ur reply.
  
   When i commented out the mysql_data_seek() function,
  mysql_fetch_row()
   returns me a non-NULL value (this should be the first row from the
  MResult).
   This results show that I've a valid connection and/or query.  And when
I
   call mysql_fetch_row() again (retrieving the 2nd row from the
MResult,
   which is the desired row), it returns me a non-NULL value too.  From
 this
   result, I know that I've not seek past the result set.  However, with
 the
   addition of the mysql_data_seek(MResult, 1) function, a NULL value
is
   returned.  And that's where I don't know how the mistake was made.
  
   Please advice and thanks.
  
   wv
  
  
   -Original Message-
   From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
   Sent: 09 July 2002 23:03
   To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
   Subject: Re: C API: mysql_data_seek
  
  
   Hi,
  
   It's ok but you must retrieve 

Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Richard Fox

Can your INT id be overflowing, i.e. reaches the max value for int and
starting at 1 again?
Rich

- Original Message -
From: Steve Hay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 4:12 AM
Subject: Bug with AUTO_INCREMENT


 Hi,

 Continuing my troubles with AUTO_INCREMENT (which nobody has yet
 responded to), I've now ruled the Perl DBI out of the equation and
 reproduced the same problem using the mysql.exe command-line tool.

 Hopefully somebody will be tempted to help this time now that there is
 no Perl involved to put people off?

 The bug can be reproduced as follows:

 Create the following simple database containing just one BDB table:

 CREATE DATABASE test;

 CREATE TABLE foo (
id INT NOT NULL AUTO_INCREMENT,
num INT,
str VARCHAR(10),
PRIMARY KEY (id)
 ) TYPE=BDB;

 Now start two mysql.exe sessions running with the -f flag to ignore
 errors.

 Set each one into no auto-commit mode with:

 SET AUTOCOMMIT=0;

 and then feed each of them the following two lines 50,000 times each:

 INSERT INTO foo (num, str) VALUES (1, 'a');
 COMMIT;

 On my NT4 machine I do this with the simple Perl program (I know I said
 Perl wasn't involved, but the Perl DBI still isn't):

 sql.pl
 --
 print SET AUTOCOMMIT=0;\n;
 for (1 .. 5) {
 print INSERT INTO foo (num, str) VALUES (1, 'a');\n;
 print COMMIT;\n;
 }

 I pipe the output from this to the mysql.exe programs, and then
 re-direct STDERR from that to log files, e.g.:

 Command Prompt One:
 \perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2
 session1.txt

 Command Prompt Two:
 \perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2
 session2.txt

 When I inspect the output collected in these log files I find, not
 unexpectedly, that there are many deadlock errors (which I'm quite
 comfortable with, and can handle in my real software by simply retrying
 the transaction), but that there are also a few of the following error:

 Duplicate entry '1' for key 1

 Surely this is a bug isn't it?

 The transaction that is being performed 50,000 times each by the two
 mysql.exe sessions doesn't specify any value for the AUTO_INCREMENT
 column id - it just leaves it up to the database to choose the next
 value.

 This error suggests that the database has wrongly chosen the value '1',
 and then (rightly) complains that it is already used!

 I would really appreciate a response on this one as I'm now at the end
 of my tether trying to work out what is wrong.

 Thanks in advance,

 Steve



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

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [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: Great tool

2002-07-10 Thread Kevin Passey

I was starting to write something in JSP which would run under TOMCAT.

I don't think I'll bother now - this looks cool.

Here is the link http://www.anse.de/mysqlfront/

Nice one!!

Regards thanks Cesar

Kevin

-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]]
Sent: 10 July 2002 12:56
To: MySQL General; PHP DB List
Subject: Great tool


Hi all. I found in one of these DB lists a word about a tool called
MySQL - Front so I went there, downloaded it and ran it today for the
first time and well...

¡¡TWO THUMBS UP!!!

It really seems like a great GUI app. I installed it over Win XP Pro and
had no troubles with it so far. It's amazing how much graphical
possibilities it has. Really recommend it for *EVERY* newbie like me and
for all Masters who doesn't know it.

C.

Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621

sql


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

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

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

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




Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Steve Hay

Richard Fox wrote:

Can your INT id be overflowing, i.e. reaches the max value for int and
starting at 1 again?
Rich

I don't think it is because (a) the last value that was successfully 
INSERT'ed - usually around 40,000-odd - is well short of the maximum 
INT, and (b) it doesn't always fall over after some particular number of 
iterations - it falls over at different, apparently random, times each 
time I try the test.

- Steve

- Original Message -
From: Steve Hay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 4:12 AM
Subject: Bug with AUTO_INCREMENT


Hi,

Continuing my troubles with AUTO_INCREMENT (which nobody has yet
responded to), I've now ruled the Perl DBI out of the equation and
reproduced the same problem using the mysql.exe command-line tool.

Hopefully somebody will be tempted to help this time now that there is
no Perl involved to put people off?

The bug can be reproduced as follows:

Create the following simple database containing just one BDB table:

CREATE DATABASE test;

CREATE TABLE foo (
   id INT NOT NULL AUTO_INCREMENT,
   num INT,
   str VARCHAR(10),
   PRIMARY KEY (id)
) TYPE=BDB;

Now start two mysql.exe sessions running with the -f flag to ignore
errors.

Set each one into no auto-commit mode with:

SET AUTOCOMMIT=0;

and then feed each of them the following two lines 50,000 times each:

INSERT INTO foo (num, str) VALUES (1, 'a');
COMMIT;

On my NT4 machine I do this with the simple Perl program (I know I said
Perl wasn't involved, but the Perl DBI still isn't):

sql.pl
--
print SET AUTOCOMMIT=0;\n;
for (1 .. 5) {
print INSERT INTO foo (num, str) VALUES (1, 'a');\n;
print COMMIT;\n;
}

I pipe the output from this to the mysql.exe programs, and then
re-direct STDERR from that to log files, e.g.:

Command Prompt One:
\perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2
session1.txt

Command Prompt Two:
\perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2
session2.txt

When I inspect the output collected in these log files I find, not
unexpectedly, that there are many deadlock errors (which I'm quite
comfortable with, and can handle in my real software by simply retrying
the transaction), but that there are also a few of the following error:

Duplicate entry '1' for key 1

Surely this is a bug isn't it?

The transaction that is being performed 50,000 times each by the two
mysql.exe sessions doesn't specify any value for the AUTO_INCREMENT
column id - it just leaves it up to the database to choose the next
value.

This error suggests that the database has wrongly chosen the value '1',
and then (rightly) complains that it is already used!

I would really appreciate a response on this one as I'm now at the end
of my tether trying to work out what is wrong.

Thanks in advance,

Steve



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

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






-- 
Klein bottle for rent - enquire within.




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

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




Great tool

2002-07-10 Thread César Aracena

Hi all. I found in one of these DB lists a word about a tool called
MySQL - Front so I went there, downloaded it and ran it today for the
first time and well...

¡¡TWO THUMBS UP!!!

It really seems like a great GUI app. I installed it over Win XP Pro and
had no troubles with it so far. It's amazing how much graphical
possibilities it has. Really recommend it for *EVERY* newbie like me and
for all Masters who doesn't know it.

C.

Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621

sql


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

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




Re: Replication (possible) problems | 'show binlog' command is broken?

2002-07-10 Thread Marc Prewitt

Mihail,

Are you still experiencing these problems?  We've seen the same thing
happen our 2 of our slaves.  It seems to happen for a day or two and then
go away.

We've done a snoop while this happens and it looks like the master is
closing the socket to the slave.  However, the master reports no errors in
it's logs.

Mysql support suggests that it might be a hardware or os bug.  I'd like to
rule this out and get them to look further into the problem.  Can you
describe your hardware/os setup of the master and slave and the network
connecting them?

Thanks,
Marc Prewitt

-- 

 Marc Prewitt
 Wall Street Source
 www.wssource.com

Mihail Manolov wrote:
 
 Greetings,
 
 We got the following lines in our error logfile on one of our slave servers:
 
 020521 13:19:29  Error reading packet from server: Lost connection to MySQL
 server during query (read_errno 0,server_errno=2013)
 020521 13:19:29  Slave: Failed reading log event, reconnecting to retry, log
 'db-bin.024' position 833365852
 020521 13:19:29  Slave: reconnected to master
 '[EMAIL PROTECTED]:3306',replication resumed in log 'db-bin.024' at
 position 833365852
 
 It isn't the first one and I was wondering what could be cause?
 A network problem? Large data chunk, or something?
 
 I tried to see what was the event that cause that problem and the following
 commands only returns an error:
 
 show binlog events in 'db-bin.024' from 833365852 limit 5;
 ERROR 1064: You have an error in your SQL syntax near 'binlog events in
 'db-bin.024' from 833365852 limit 5' at line 1
 
 Any help is appreciated!
 
 Mihail Manolov
 Government Liquidation, LLC
 202 467 6868 x.227
 [EMAIL PROTECTED]
 www.govliquidation.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: Lost connection to MySQL server during query

2002-07-10 Thread Steve Mertz

Ah! Thanks, this gave me the clue.  I had to up the limit of openfiles

(csh/OpenBSD) limit openfiles 1024 (from 64) and it works like a
charm now.  Thanks!


- Original Message -
From: Gelu Gogancea [EMAIL PROTECTED]
To: Steve Mertz [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 4:31 PM
Subject: Re: Lost connection to MySQL server during query


 Hi,

 My opinion:
 This can be a very good reason to kill the socket(is a file too) which is
 open during query.
 This error show you that you have too many open files in the system.I
tested
 something like this(Linux - Red Hat 7.2) some time ago and after 2000
(this
 mean sockets) clients connected this error occured.

 Regards,

 Gelu
 _
 G.NET SOFTWARE COMPANY

 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: Steve Mertz [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 09, 2002 11:49 PM
 Subject: Re: Lost connection to MySQL server during query


  No, nothing other than the startup and shutdown messages.
 
  And every once and a while:
  020708 21:00:46  Error in accept: Bad file descriptor
 
  But this doesn't happen all the time after restarting the database and I
  still
  have problems so I don't think that this is related.
 
  Thanks!
  -- Steve
 
 
 
  - Original Message -
  From: Michael Bacarella [EMAIL PROTECTED]
  To: Steve Mertz [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, July 09, 2002 3:43 PM
  Subject: Re: Lost connection to MySQL server during query
 
 
   Is there anything in the error log?
  
   See mysql/data/hostname.err
  
   -M
  
   On Tue, Jul 09, 2002 at 03:26:17PM -0500, Steve Mertz wrote:
I keep getting Lost connection to MySQL server during query
   
marcos:mysql-3.23.51 {117} mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Lost connection to MySQL server during query'
   
Server timeout is set for 8 hours (default) and I have been trying
to hit the server all within a couple of minutes.
   
Sometimes it works, sometimes it doesn't. (below is a repeat of the
command 2 minutes after the first one was issued.)
   
   
marcos:mysql-3.23.51 {120} !!
mysqladmin version
mysqladmin  Ver 8.23 Distrib 3.23.51, for unknown-openbsd3.1 on i386
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free
 software,
and you are welcome to modify and redistribute it under the GPL
 license
   
Server version  3.23.51-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 10 min 57 sec
   
Threads: 2  Questions: 108  Slow queries: 0  Opens: 34  Flush
tables:
 1
Open tables: 28 Queries per second avg: 0.164
   
marcos:mysql-3.23.51 {121} uname -a
OpenBSD marcos 3.1 marcos#5 i386
   
What should I start looking for?  (below is mysqladmin variables)
  
  
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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: Read-Only MySQL

2002-07-10 Thread Tac

Microweb provides exactly that.  I haven't used it, but I did research on
comparing it with running Apache from a CD-ROM.  Currently I'm leaning
toward the Apache implementation, because PHP will run as a dll, rather than
through CGI.  But if we need a database, I'll probably go with the Microweb
solution (though the Apache version is free).

Microweb is pretty clever with MySQL -- if it's read-only, it'll run from
the CD, otherwise, it'll copy the tables to a temporarly location on the
user's harddrive.

I'm not sure how licensing is handled, though.

Tac


From http://www.indigostar.com/microweb.htm:
MicroWeb allows you to create a working web site on a CD-ROM.  Using a web
browser, a user can run CGI programs as well as view html files on the
CD-ROM.

To view the website the end user only has to run the microweb.exe program on
the CD-ROM, there is nothing to configure.  This will automatically start a
web browser for viewing the website.

MicroWeb provides support for MySQL, it will automatically start a MySQL
server if one is included on the CD.





- Original Message -
From: Colin Faber [EMAIL PROTECTED]
To: Gerald R. Jensen [EMAIL PROTECTED]
Cc: Kristian Koehntopp [EMAIL PROTECTED]; MySQL List
[EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 8:20 PM
Subject: Re: Read-Only MySQL


 Like Kristian says,

 I don't see why you couldn't do something like that, Though you may
 want to setup mysql to have a very large amount of cache to pool from
 this way you can speed performance of it.



 Gerald R. Jensen wrote:
 
  Kristian:
 
  Possible? I suppose, but not very practical. It would be
  ssllooww, you'd need to supply an application to permit
  access to the data, and how would you handle licensing?
 
  Gerald Jensen
 
  - Original Message -
  From: Kristian Koehntopp [EMAIL PROTECTED]
  To: MySQL List [EMAIL PROTECTED]
  Sent: Tuesday, July 09, 2002 6:48 AM
  Subject: Read-Only MySQL
 
  I want to create a CD-ROM which contains a copy of MySQL (for
  Windows) and a set of MySQL databases. Is it possible to set up
  a read-only MySQL, that is, a MySQL running from a r/o media?
 
  Kristian
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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

 --
 Colin Faber
 (303) 736-5160
 fpsn.net, 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



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

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




Table Design!!

2002-07-10 Thread Abhi

Dear MySQL User,
I am sending the table schema of 5 tables.Here pid (partner ID) is in the top layer, 
aid (Affiliate ID) is in the middle layer and uid (User Id OR Customer ID) is in the 
bottem layer.User may promoted to Affiliate and affiliate may promoted to partner.We 
have to store there billing and contact info...Could you pls check that design is 
perfect?Pls send ur comments?
Regards,


mysql desc tbl_user;
+-+---+--+-+--++
| Field   | Type  | Null | Key | Default  | Extra  |
+-+---+--+-+--++
| uid | smallint(8)   |  | PRI | NULL | auto_increment |
| aid | smallint(8)   |  | PRI | 0||
| pid | smallint(8)   |  | PRI | 0||
| username| varchar(16)   |  | |  ||
| password| varchar(16)   |  | |  ||
| user_status | enum('A','I','S') | YES  | | NULL ||
| secret_word | varchar(20)   | YES  | | NULL ||
| language| varchar(8)|  | | ENG  ||
| flag_group  | double(8,0)   |  | | 0||
| group_name  | varchar(16)   | YES  | | Customer ||
| db_update   | timestamp(14) | YES  | | NULL ||
| update_user | smallint(8)   |  | | 0||
+-+---+--+-+--++
12 rows in set (0.00 sec)

mysql desc tbl_affiliate;
+--+---+--+-+-+---+
| Field| Type  | Null | Key | Default | Extra |
+--+---+--+-+-+---+
| aid  | smallint(8)   |  | PRI | 0   |   |
| pid  | smallint(8)   |  | PRI | 0   |   |
| affil_type   | enum('1','2','3') |  | | 1   |   |
| affil_order_date | timestamp(14) | YES  | | NULL|   |
| affil_status | enum('A','I','S') | YES  | | NULL|   |
| affil_aux_data   | varchar(64)   | YES  | | NULL|   |
| db_update| timestamp(14) | YES  | | NULL|   |
| update_user  | smallint(8)   |  | | 0   |   |
+--+---+--+-+-+---+
8 rows in set (0.00 sec)

mysql desc tbl_partner;
++---+--+-+-+---+
| Field  | Type  | Null | Key | Default | Extra |
++---+--+-+-+---+
| pid| smallint(8)   |  | PRI | 0   |   |
| partner_type   | enum('1','2','3') |  | | 1   |   |
| partner_order_date | timestamp(14) | YES  | | NULL|   |
| partner_status | enum('A','I','S') | YES  | | NULL|   |
| partner_aux_data   | varchar(64)   | YES  | | NULL|   |
| db_update  | timestamp(14) | YES  | | NULL|   |
| update_user| smallint(8)   |  | | 0   |   |
++---+--+-+-+---+
7 rows in set (0.00 sec)

mysql desc tbl_user_contact_info;
+-+---+--+-+-+---+
| Field   | Type  | Null | Key | Default | Extra |
+-+---+--+-+-+---+
| uid | smallint(8)   |  | PRI | 0   |   |
| email   | varchar(64)   |  | | |   |
| email_alt   | varchar(64)   |  | | |   |
| first_name  | varchar(12)   |  | | |   |
| last_name   | varchar(12)   |  | | |   |
| company | varchar(32)   | YES  | | NULL|   |
| address_1   | varchar(32)   | YES  | | NULL|   |
| address_2   | varchar(32)   | YES  | | NULL|   |
| city| varchar(20)   | YES  | | NULL|   |
| state   | varchar(20)   | YES  | | NULL|   |
| zip | varchar(9)| YES  | | NULL|   |
| country | char(2)   |  | | |   |
| phone   | varchar(24)   | YES  | | NULL|   |
| fax | varchar(24)   | YES  | | NULL|   |
| cell_phone  | varchar(24)   | YES  | | NULL|   |
| db_update   | timestamp(14) | YES  | | NULL|   |
| update_user | smallint(8)   |  | | 0   |   |
+-+---+--+-+-+---+
17 rows in set (0.00 sec)

mysql desc tbl_user_billing_info;
++---+--+-+-+---+
| Field  | Type

Re: auto-increment usage question

2002-07-10 Thread Richard Fox


 Hi,

 I have a mysql table which has a run_id which together with user_id forms
the
 primary key for the table. run_id is not null and auto-increment. I delete
 records from this table, and add new records. I want the run_id to keep
 incrementing and not reuse values, but here is the actual behavior:

 When records are deleted, upon the next insert run_id will be given a
 value which is one higher than the greatest value remaining in the table.
If
 the table is empty, run_id will be assigned '1'.

 Is there any way in which I can get run_id to keep incrementing and not be
 based on the current highest value in the table, but on the last assigned
 run_id even if that record has been deleted?

 If not, are there any common workarounds?

 TIA

 Rich

sql, query


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

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




Re: Foreign keys in MySQL

2002-07-10 Thread Roger Baklund

* Hanxue Lee
 In the MySQL documentation, it is stated that

 foreign keys in SQL are not used to join tables, but are used mostly for
 checking referential integrity (foreign key constraints). 

This could have been formulated in a better way, IMHO. I would even say the
statement is wrong. In RDBMS terminology, a 'foreign key' is one (or more)
column(s) in a table identifying records in a different table. Consider this
schema:

CREATE TABLE owner (
  id int primary key,
  name varchar(30));

CREATE TABLE pet (
  id int primary key,
  owner int,
  name varchar(30));

The 'owner' field of the 'pet' table is a foreign key if it used to store
the primary keys from the 'owner' table. It _is_ a foreign key, even if no
foreign key _constraints_ have been defined. The FOREIGN KEY keywords in
MySQL is used to define such _constraints_, not to define the foreign key
itself.

Maybe the phrase in the manual should have been something like:

...the FOREIGN KEY keywords are not used to join tables, but...

 Does it mean that constraints are not supported?

Why did you think that? The statement you quoted says ...not used to join
tables... used mostly for... foreign key constraints.

Anyway, the answer is 'yes and no', foreign key _constraints_ are supported,
but only if you use InnoDB tables. Using the FOREIGN KEY keywords on other
table types will not give errors, but it will be ignored.

 I need to have Update and perhaps Delete Referential Integrity.

URL: http://www.mysql.com/doc/S/E/SEC446.html 
URL: http://www.mysql.com/doc/e/x/example-Foreign_keys.html 

--
Roger


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

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




Re: bug with like, latin1 and umlaut ü/y

2002-07-10 Thread Thomas Spahni

On Wed, 10 Jul 2002, Victoria Reznichenko wrote:

 oliver,
 Wednesday, July 10, 2002, 2:33:06 AM, you wrote:
 
 Description:
 o I was trying to find every row in a table which contains the umlaut
 o ü (ue). MySQL listed every row which contained the umlaut and rows
 o which contained the letter y, but no umlaut... Client and server
 o characterset is latin1.
 
 As far as I understand you want to enable correct German sorting order?
 If so, since 4.0.0. MySQL supports latin_de character set.
http://www.mysql.com/doc/G/e/German_character_set.html

Hi Victoria,

unfortunately this is not about sort order but appears to be a bug. I
checked it with 4.0.2 using charset latin1 and indeed, Oliver's results
are reproducible. We don't want a hit on 'y' when we search for
LIKE '%ü%'.

best regards,
Thomas Spahni
-- 
sql, query


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

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




Re: Visio-mysql driver question

2002-07-10 Thread Gelu Gogancea

Hi,
If you know very well to work with Macro and have knowledge about MYSQL
API , you can use the last version of GMySQL typelibrary.
Download from www.gonetsoftware.com/gmysql

If you have any question about GMySQL , e-mail me.

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Nixarlidis Aris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 3:02 PM
Subject: Visio-mysql driver question


 hi,
 I'm trying to get Visio work with mysql to get a visual representation of
 my data base.Visio asks for a 'Visio Database Driver' for mysql.Does
 anyone know if such a driver exists or if what I;m trying to do can be
 done or not?
 Thanks,Aris


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

 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




slave server in readonly

2002-07-10 Thread Pierre Baridon


is it possible to start a server in 'read only' mode ?
so that users cannot write in  my slave server ?

thanks,

Pierre






--sql,query


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

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




RE: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Nilesh Shah

Set variable net_read_timeout to some bigger value.

 http://www.mysql.com/doc/S/H/SHOW_VARIABLES.html


Nilesh Shah



-Original Message-
From: Mark Hughes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 3:36 AM
To: [EMAIL PROTECTED]
Subject: Replication - Error reading packet from server:
(server_errno=1159)


Hi,

We updated one of our slave servers to 3.3.51 from 3.23.38 and in common
with lots of other posts i've seen we're getting lots of errors where
the
slave loses the connection to the master:

020710  7:24:05  Error reading packet from server:  (server_errno=1159)
020710  7:25:05  Slave: Failed reading log event, reconnecting to retry,
log 'update.408' position 131306
020710  7:25:05  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
at
position 131306
020710  7:26:12  Error reading packet from server:  (server_errno=1159)
020710  7:26:12  Slave: Failed reading log event, reconnecting to retry,
log 'update.408' position 132434
020710  7:26:12  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
at
position 132434
020710  7:26:42  Error reading packet from server:  (server_errno=1159)
020710  7:27:42  Slave: Failed reading log event, reconnecting to retry,
log 'update.408' position 132434
020710  7:27:42  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
at
position 132434

These are happening every 60 seconds or so.

Some info on our architecture

System: Linux int04948-2 2.2.19-6.2.16 #1 Wed Mar 13 13:03:05 EST 2002
i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='gcc'  CFLAGS=' -O3'  CXX='gcc'  CXXFLAGS=' -O3
-felide-constructors -fno-exceptions -fno-rtti  '
LDFLAGS=''
LIBC:
lrwxrwxrwx   1 root root   13 Jul  9 16:49 /lib/libc.so.6 -
libc-2.1.3.so
-rwxr-xr-x   1 root root  4105868 Dec  8  2001
/lib/libc-2.1.3.so
-rw-r--r--   1 root root 20299228 Dec  8  2001 /usr/lib/libc.a
-rw-r--r--   1 root root  178 Dec  8  2001 /usr/lib/libc.so
Configure command: ./configure --disable-shared
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
--without-berkeley-db --without-innodb --enable-assembler
--enable-local-infile --with-mysqld-user=mysql
--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
--with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql
--infodir=/usr/info --includedir=/usr/include --mandir=/usr/man
'--with-comment=Official MySQL RPM' CC=gcc 'CFLAGS= -O3' 'CXXFLAGS= -O3
-felide-constructors -fno-exceptions -fno-rtti  '
CXX=gcc
Perl: This is perl, version 5.005_03 built for i386-linux

I couldn't find a solution to this, is it a known problem with 3.3.51 ?

Thanks,
Mark.


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

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: script - full backup of mysql databases

2002-07-10 Thread Alok K. Dhir


Here's a trivial example.  Run something like this out of cron every
night.

--- cut
#!/bin/sh
DATE=`/bin/date +%Y-%m-%d`
mysqldump -u root -p [password] --all-databases --opt  \
/path/to/large/partition/backup_${DATE}.sql
--- cut

 -Original Message-
 From: adi [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, July 10, 2002 5:34 AM
 To: [EMAIL PROTECTED]
 Subject: script - full backup of mysql databases
 
 
 There is a script for RH Linux for each day automatic full 
 backup of mysql databases? (the results may be like: 
 backup_mmdd.sql, so it can be easily imported)
 
 tx in adv for any help
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


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

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




Re: auto-increment usage question

2002-07-10 Thread Gerald Clark

That is the normal behavior for ISAM type files.
Convert them to MYISAM.

Richard Fox wrote:

Hi,

I have a mysql table which has a run_id which together with user_id forms

the

primary key for the table. run_id is not null and auto-increment. I delete
records from this table, and add new records. I want the run_id to keep
incrementing and not reuse values, but here is the actual behavior:

When records are deleted, upon the next insert run_id will be given a
value which is one higher than the greatest value remaining in the table.

If

the table is empty, run_id will be assigned '1'.

Is there any way in which I can get run_id to keep incrementing and not be
based on the current highest value in the table, but on the last assigned
run_id even if that record has been deleted?

If not, are there any common workarounds?

TIA

Rich


sql, query


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

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





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

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




Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Steve Hay

Thomas Spahni wrote:

Steve,

I tried your example on MyIsam tables; no problems with auto_increment at
all, except for a few

ERROR 1040: Too many connections

when 100 scripts are inserting concurrently at full speed.

Thomas

I've tried the same myself on MyISAM tables as well now, and I also 
found that there is no problem - it only seems to happen using BDB tables.

However, I need to use BDB tables rather than MyISAM to get transaction 
support, which is required by the software that I'm working on.

In fact, it seems that BDB tables work too if the transaction support is 
not used, i.e. set AUTOCOMMIT=1 and don't bother with explicit COMMIT 
statements.

Maybe MySQL has a problem with AUTO_INCREMENT when used with transactions?

- Steve



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

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




Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Thomas Spahni

On Wed, 10 Jul 2002, Steve Hay wrote:

 Richard Fox wrote:
 
 Can your INT id be overflowing, i.e. reaches the max value for int and
 starting at 1 again?
 Rich
 
 I don't think it is because (a) the last value that was successfully 
 INSERT'ed - usually around 40,000-odd - is well short of the maximum 
 INT, and (b) it doesn't always fall over after some particular number of 
 iterations - it falls over at different, apparently random, times each 
 time I try the test.
 
 - Steve

Steve,

I tried your example on MyIsam tables; no problems with auto_increment at
all, except for a few

ERROR 1040: Too many connections

when 100 scripts are inserting concurrently at full speed.

Thomas

 
 - Original Message -
 From: Steve Hay [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, July 10, 2002 4:12 AM
 Subject: Bug with AUTO_INCREMENT
 
 
 Hi,
 
 Continuing my troubles with AUTO_INCREMENT (which nobody has yet
 responded to), I've now ruled the Perl DBI out of the equation and
 reproduced the same problem using the mysql.exe command-line tool.
 
 Hopefully somebody will be tempted to help this time now that there is
 no Perl involved to put people off?
 
 The bug can be reproduced as follows:
 
 Create the following simple database containing just one BDB table:
 
 CREATE DATABASE test;
 
 CREATE TABLE foo (
id INT NOT NULL AUTO_INCREMENT,
num INT,
str VARCHAR(10),
PRIMARY KEY (id)
 ) TYPE=BDB;
 
 Now start two mysql.exe sessions running with the -f flag to ignore
 errors.
 
 Set each one into no auto-commit mode with:
 
 SET AUTOCOMMIT=0;
 
 and then feed each of them the following two lines 50,000 times each:
 
 INSERT INTO foo (num, str) VALUES (1, 'a');
 COMMIT;
 
 On my NT4 machine I do this with the simple Perl program (I know I said
 Perl wasn't involved, but the Perl DBI still isn't):
 
 sql.pl
 --
 print SET AUTOCOMMIT=0;\n;
 for (1 .. 5) {
 print INSERT INTO foo (num, str) VALUES (1, 'a');\n;
 print COMMIT;\n;
 }
 
 I pipe the output from this to the mysql.exe programs, and then
 re-direct STDERR from that to log files, e.g.:
 
 Command Prompt One:
 \perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2
 session1.txt
 
 Command Prompt Two:
 \perl5\bin\perl.exe sql.pl | \mysql\bin\mysql.exe -f -u root test 2
 session2.txt
 
 When I inspect the output collected in these log files I find, not
 unexpectedly, that there are many deadlock errors (which I'm quite
 comfortable with, and can handle in my real software by simply retrying
 the transaction), but that there are also a few of the following error:
 
 Duplicate entry '1' for key 1
 
 Surely this is a bug isn't it?
 
 The transaction that is being performed 50,000 times each by the two
 mysql.exe sessions doesn't specify any value for the AUTO_INCREMENT
 column id - it just leaves it up to the database to choose the next
 value.
 
 This error suggests that the database has wrongly chosen the value '1',
 and then (rightly) complains that it is already used!
 
 I would really appreciate a response on this one as I'm now at the end
 of my tether trying to work out what is wrong.
 
 Thanks in advance,
 
 Steve
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [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




replace query

2002-07-10 Thread Anil Garg

Hi,
i have a table with 2000 rows.
One column (name answer)has a string (ok --) in all the rows.(e.g ok --
yes we support this.).
now i want to remove all these 'ok --' in this column..leaving(e.g yes we
support this)
I tried to do it with the replace query but being a newbie to mysql i
couldnt find the right syntax.
Can someone help.

thanx and regards
anil


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

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 install on Linux 7.1

2002-07-10 Thread Marvin Cummings

Hey can someone provide me some help in installing and configuring mysql ver3.23.51 on 
my Linux server? I downloaded the file from mysql.com to my servers hard drive and now 
want to install it. I right-clicked the installation file and clicked install. It 
appears to have installed something, but I can't find it. I looked in the /var/lib 
directories and don't see anything. Though the installation steps are covered somewhat 
on mysql.com, I'm still having problems as I'm totally new to linux. 
Any documented steps from a newbie's perspective or something simple would be really 
helpful.
Any help is 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




help !

2002-07-10 Thread Brett Whittaker

I was trying to connect into an MYSQL database, and I keep getting the error
message

Can't connect to MySQL server on '10.10.10.250' (10054)

but I know that the database is running and I can connect fine on the server
itself!

Any suggestions would be greatly 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




calculating inside query

2002-07-10 Thread andy

Hi there,

I would like to find out the top 10 of some ratings. There are 2 columns.
One for the rating and one for the amount of ratings.
To find out the top 10 I would have to divide those 2 values and sort it.

Somehow this does not work. I do not have a clue why. Maybe someone of you
guys do see the error:

SELECT
  ID,
  rating_total / ratings_amount AS top10
FROM rating
ORDER BY top10 desc
LIMIT 10

Thanx for any help,

Andy
query


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

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




RE: Error at compilation...can I ingore ?

2002-07-10 Thread Ismael Touama

OK THANKS,

read to config.log, change some options...

-Message d'origine-
De : Ismael Touama [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 9 juillet 2002 18:54
À : [EMAIL PROTECTED]
Objet : Error at compilation...can I ingore ?


Oï,

I just configure my Makefile (is that the good one ?),
and I obtain the following errors...
make[2]: *** [libmysql.lo] Error 1
make[2]: Quit the '/root/MySQL/mysql-3.23.51/libmysql' directory
make[1]: *** [all-recursive] Erreur 1
make[1]: Quit the '/root/MySQL/mysql-3.23.51' directory
make: *** [all-recursive-am] Error 2


The problem seems to be located with libmysql.c, kind of arguments problem.
Here's my command line:
CFLAGS=-03 -mpentiumpro CXX=gcc
CXXFLAGS=-03 -menptiumpro -mstack-align-double \
-felide-contructors -fno-exceptions-fno-rtti
 ./configure --prefix=/usr/local/mysql \
--enable-assembler --with-mysql-ldflags=-all-static --with-client-ldflags=-a
ll-static --with-innodb

So, I just saw the following error : -fno-exceptions-fno-rtti must
be -fno-exceptions -fno-rtti.

Furthermore i put the line as is without backslash (I put it as a single
line without taping on enter.

The problem is that I don't find 'config.cache', so I can't rm it and so I
cannot 'make clean' !!!
Is 'make clean' efficient alone ?

Thanks for helps,
bbsc
ism


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

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




Join two mySQL Tables

2002-07-10 Thread Carlos Rovetto

Hi.  When I use a select to extract information of two tables using inner 
join the time response is slowly.

Thanks

Carlos Rovetto

P.d: I use Visual Basic 6.0 with ODBC to work with MySQL

From: Thomas Edison Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: How to Connect two mySQL Tables
Date: Wed, 10 Jul 2002 03:15:35 -0700 (PDT)

Hi,

If i have two seperate mySQL Tables in my database,
with some information.. and i would like to connect
the two tables so as to get Relevant Data picked up
from the relevant Table and it's relevant fields.

Do we need to use a Foriegn/Primary key for this
purpose? If so, how do you use them? I coudln't find a
suitable description on using  the Foriegn Keys in the
mySQL Manual.

Thanks,
T. Edison Jr.



__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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

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




_
MSN Fotos: la forma más fácil de compartir e imprimir fotos. 
http://photos.msn.es/support/worldwide.aspx


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

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




Re: email address authentification .....

2002-07-10 Thread João Paulo Vasconcellos

This is somewhat OT here, but you may try Killersoft.com:

  http://www.killersoft.com/print.php?sid=2




On Wednesday 10 July 2002 08:08, toby - wrote:
 hi guys

 im sure theres a function to check for a valid email address entered by
 user before storing it into the db but i cant locate it in php manuel NOR
 in mysql manuel

 will someone plz tell me bout it ?

 thnx a million

 toby .

 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx


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

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

-- 
João Paulo Vasconcellos
Gerente de Tecnologia - NetCard
Tel. 21 3852-9008 Ramal 31
[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 DateTime subtraction question

2002-07-10 Thread Richard Fox

This question relates to both mysql in general and the mysql++ C++ API in
particular, thus the adressing to both lists.

I have a DateTime object (really a formatted string) say 2002-07-10
11:38:38. I want to subtract some variable number of hours (from 0 to 11)
from it. How do I accomplish this in an elegant manner?

There is quite a bit of logic to handle all the cases where subtracting
hours takes the date one day back, which can take the month one month back,
which can take the year one year back! And of couse all the months have
different lengths so this can be some ugly code. I can do this the hard way,
but I was wondering if anyone already has a nice solution.

Many thanks

Rich


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

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




Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Mark Matthews

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve Hay wrote:
| Thomas Spahni wrote:
|
| Steve,
|
| I tried your example on MyIsam tables; no problems with auto_increment at
| all, except for a few
|
| ERROR 1040: Too many connections
|
| when 100 scripts are inserting concurrently at full speed.
|
| Thomas
|
| I've tried the same myself on MyISAM tables as well now, and I also
| found that there is no problem - it only seems to happen using BDB tables.
|
| However, I need to use BDB tables rather than MyISAM to get transaction
| support, which is required by the software that I'm working on.
|
| In fact, it seems that BDB tables work too if the transaction support is
| not used, i.e. set AUTOCOMMIT=1 and don't bother with explicit COMMIT
| statements.
|
| Maybe MySQL has a problem with AUTO_INCREMENT when used with transactions?

Is there a reason you can't use InnoDB tables? They are
transaction-capable, and they have a lot more active development on them
than BDB. They also support AUTO_INCREMENT.

-Mark




-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6-2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9LGa9lyjUJM+7nP4RArx3AJ9swXHifi4jrENHU8N5sUxQFePAZQCeNBUx
E1SnUdn13xdqFvKSWRl5GXM=
=Re4/
-END PGP SIGNATURE-


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

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




RE: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Mark Hughes

Thanks, I had a look at that and it seems that slave_net_timeout is the
variable that should be used and this is set to 3600 seconds - however it
appears that the net_read_timeout is being used and by changing this from
30 to 3600 seconds the messages seem to have gone away.

In the 3.23.38 version we are using with our other slaves they never 
timeout and the slave_new_timeout variable doesn't exist - it would
seem that some code has been introduced to allow the slave connections to
timeout but is using the net_read_timeout variable rather than the
slave_net_timeout variable as I would expect.


On Wed, 10 Jul 2002, Nilesh Shah wrote:

 Set variable net_read_timeout to some bigger value.
 
  http://www.mysql.com/doc/S/H/SHOW_VARIABLES.html
 
 
 Nilesh Shah
 
 
 
 -Original Message-
 From: Mark Hughes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 10, 2002 3:36 AM
 To: [EMAIL PROTECTED]
 Subject: Replication - Error reading packet from server:
 (server_errno=1159)
 
 
 Hi,
 
 We updated one of our slave servers to 3.3.51 from 3.23.38 and in common
 with lots of other posts i've seen we're getting lots of errors where
 the
 slave loses the connection to the master:
 
 020710  7:24:05  Error reading packet from server:  (server_errno=1159)
 020710  7:25:05  Slave: Failed reading log event, reconnecting to retry,
 log 'update.408' position 131306
 020710  7:25:05  Slave: reconnected to master
 '[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
 at
 position 131306
 020710  7:26:12  Error reading packet from server:  (server_errno=1159)
 020710  7:26:12  Slave: Failed reading log event, reconnecting to retry,
 log 'update.408' position 132434
 020710  7:26:12  Slave: reconnected to master
 '[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
 at
 position 132434
 020710  7:26:42  Error reading packet from server:  (server_errno=1159)
 020710  7:27:42  Slave: Failed reading log event, reconnecting to retry,
 log 'update.408' position 132434
 020710  7:27:42  Slave: reconnected to master
 '[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
 at
 position 132434
 
 These are happening every 60 seconds or so.
 
 Some info on our architecture
 
 System: Linux int04948-2 2.2.19-6.2.16 #1 Wed Mar 13 13:03:05 EST 2002
 i686 unknown
 Architecture: i686
 
 Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
 /usr/bin/cc
 GCC: Reading specs from
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
 gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
 Compilation info: CC='gcc'  CFLAGS=' -O3'  CXX='gcc'  CXXFLAGS=' -O3
 -felide-constructors -fno-exceptions -fno-rtti  '
 LDFLAGS=''
 LIBC:
 lrwxrwxrwx   1 root root   13 Jul  9 16:49 /lib/libc.so.6 -
 libc-2.1.3.so
 -rwxr-xr-x   1 root root  4105868 Dec  8  2001
 /lib/libc-2.1.3.so
 -rw-r--r--   1 root root 20299228 Dec  8  2001 /usr/lib/libc.a
 -rw-r--r--   1 root root  178 Dec  8  2001 /usr/lib/libc.so
 Configure command: ./configure --disable-shared
 --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
 --without-berkeley-db --without-innodb --enable-assembler
 --enable-local-infile --with-mysqld-user=mysql
 --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
 --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin
 --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql
 --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man
 '--with-comment=Official MySQL RPM' CC=gcc 'CFLAGS= -O3' 'CXXFLAGS= -O3
 -felide-constructors -fno-exceptions -fno-rtti  '
 CXX=gcc
 Perl: This is perl, version 5.005_03 built for i386-linux
 
 I couldn't find a solution to this, is it a known problem with 3.3.51 ?
 
 Thanks,
 Mark.
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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 install on Linux 7.1

2002-07-10 Thread David Kramer

Are you using RPM or installing from source, i.e. running make?  Also if you
need to find where files are located change to root directy  cd /  then
type  find -name mysql  that will get you started as to where your mysql
files are located.  The find command is very helpful when searching for
files, its very similar to windows start menu search utility.  Just make
sure you change to the most parent directory to run the search, as find
traverses from the Present Working Directory  PWD  forward.  Also the best
doc I have found is on the mysql.com site itself: http://www.mysql.com/doc/
You will find everything you need there...  Good Luck and Welcome to Linux.

David Kramer

-Original Message-
From: Marvin Cummings [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 9:13 AM
To: [EMAIL PROTECTED]
Subject: MySQL install on Linux 7.1


Hey can someone provide me some help in installing and configuring mysql
ver3.23.51 on my Linux server? I downloaded the file from mysql.com to my
servers hard drive and now want to install it. I right-clicked the
installation file and clicked install. It appears to have installed
something, but I can't find it. I looked in the /var/lib directories and
don't see anything. Though the installation steps are covered somewhat on
mysql.com, I'm still having problems as I'm totally new to linux. 
Any documented steps from a newbie's perspective or something simple would
be really helpful.
Any help is appreciated. 

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

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

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

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




Re: replace query

2002-07-10 Thread Georg Richter

On Wednesday, 10. July 2002 18:13, Anil Garg wrote:
Hi!
 I tried to do it with the replace query but being a newbie to mysql i
 couldnt find the right syntax.
 Can someone help.


http://www.mysql.com/doc/U/P/UPDATE.html

Regards

Georg



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

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




RE: help !

2002-07-10 Thread Dan Vande More

Do a telnet 10.10.10.250 3306
then a ctrl-] to end it.

What do you see?

-Original Message-
From: Brett Whittaker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 10:29 AM
To: [EMAIL PROTECTED]
Cc: Brett Whittaker
Subject: help !


I was trying to connect into an MYSQL database, and I keep getting the error
message

Can't connect to MySQL server on '10.10.10.250' (10054)

but I know that the database is running and I can connect fine on the server
itself!

Any suggestions would be greatly appreciated.


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

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


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

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




Re:help !

2002-07-10 Thread Oliver Six

Brett Whittaker [EMAIL PROTECTED] wrote on 10.07.2002 18:28:54:


I was trying to connect into an MYSQL database, and I keep getting the error
message

Can't connect to MySQL server on '10.10.10.250' (10054)

but I know that the database is running and I can connect fine on the server
itself!

Any suggestions would be greatly appreciated.


Hi Brett,

try to connect using a telnet 10.10.10.250 3306. You should get some control 
characters and the version number of your server. If not check your network 
connection. 

Bye Oliver
--
Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine, and 5% 
attention to detail. 

Oliver Six, CEO
CAHOS GmbH, Cimbernstr. 51, Germany 81377 Muenchen
Phone +49 89 71 01 93 41,  Fax +49 89 71 01 93 42


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

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




sorting values not so easy!

2002-07-10 Thread andy

Hi guys,

I have a problem sorting values comming out of a db. It is not as easy.

Here is the prob:
One table containing user points.
Other table containing reports with rankings
For each top 10 report (the 10 reports with the most ranking) there are 20
extra points granted

Now I would like to get the top 5 members out of the db. If I only pull out
the user table ordered by points desc limit 5 I might miss a user with a top
10 report and 20 extra points.

So I thought about sorting the array afterwards with asort, but then I loose
the asoziation with the user_id.

Maybe there is a way to sort the other arrays with the same sorting algo? Or
a way to include a iff clause in the query?

currently I am doing:
SELECT
u_name,
id,
points
FROM user
WHERE
points  0
ORDER by points desc
LIMIT 5

and the top10 reports extra.

Has anybody a good idea on that?

Andy


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

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




RE: help !

2002-07-10 Thread Luc Foisy

 -Original Message- 
 I was trying to connect into an MYSQL database, and I keep 
 getting the error
 message
 
 Can't connect to MySQL server on '10.10.10.250' (10054)
 
 but I know that the database is running and I can connect 
 fine on the server
 itself!
 
 Any suggestions would be greatly appreciated.

You probably have only granted permission, for the user you are connecting as, to the 
localhost where MySQL is installed

use mysql;
SELECT * FROM user\G

This will show all users able to connect to mysql server and from what host address. 
Check the ip of the computer you are connecting from and see if it in there.

If not, try:
GRANT some privileges on database.table to 'username'@'10.10.10.%' identified 
by 'password';
^^^
can be wildcard *.* or database.*

Check the GRANT section in the mysql manual.

If you are connecting to the server from windows, you may want to use the -u option, 
which is the user name on the mysql server, just incase your windows username does not 
match
:   mysql -u username

hmm, what else... try that for now

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

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




help in re-thinking a way to do the following:

2002-07-10 Thread Norris, Joseph


Group,

Given the following code:


$sql = qq! select * from table where suffix1  ''!;
$db_action = $DB-prepare($sql);
$db_action-execute or die could not do $sql - $DBI::errstr;
$rows = $db_action-rows;
$rec = $db_action-fetchall_arrayref;
$db_action-finish;

for ($i=0;$i$rows;$i++) {
$id = $rec-[$i][0];
$first_name = $rec-[$i][1];
$last_name = $rec-[$i][2];
$identifier = $rec-[$i][3];
$prefix1 = $rec-[$i][4];
$suffix1 = $rec-[$i][5];
$prefix2 = $rec-[$i][6];
$suffix2 = $rec-[$i][7];
$site = $rec-[$i][8];
$location = $rec-[$i][9];
$phone_loc_id = $rec-[$i][10];

I would like to find alternate ways to do this that would take into account
changes to the table. For example let's say that the table changes (for
example lets say that site field in the above example is removed).  What I
am interested in, is how are others in the group are handling this type of
thing. I have heard something about tying column names - not sure what this
is.  Any and all suggestions will be most appreciated.

Thanks.


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

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




RE: MySQL install on Linux 7.1

2002-07-10 Thread Luc Foisy

 -Original Message-
 Hey can someone provide me some help in installing and 
 configuring mysql ver3.23.51 on my Linux server? I downloaded 
 the file from mysql.com to my servers hard drive and now want 
 to install it. I right-clicked the installation file and 
 clicked install. It appears to have installed something, but 
 I can't find it. I looked in the /var/lib directories and 
 don't see anything. Though the installation steps are covered 
 somewhat on mysql.com, I'm still having problems as I'm 
 totally new to linux. 
 Any documented steps from a newbie's perspective or something 
 simple would be really helpful.
 Any help is appreciated. 

Default RedHat mysql server rpm install will go to /var/lib/mysql 
make sure you installed the server, and not just the client

run: find /usr/bin -name *mysql*
or look in /usr/bin

if you don't see safe_mysqld then you haven't installed the server

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

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




Re: replace query

2002-07-10 Thread Keith C. Ivey

On 10 Jul 2002, at 12:13, Anil Garg wrote:

 One column (name answer)has a string (ok --) in all the rows.(e.g
 ok -- yes we support this.). now i want to remove all these 'ok --'
 in this column..leaving(e.g yes we support this) I tried to do it with
 the replace query but being a newbie to mysql i couldnt find the right
 syntax.

You don't want a REPLACE *query* -- you want to use an UPDATE query 
with the REPLACE *function*.  The two have nothing to do with each 
other.  Have you looked at the documentation?

http://www.mysql.com/doc/U/P/UPDATE.html
http://www.mysql.com/doc/S/t/String_functions.html

So you seem to want something like

   UPDATE table_name SET answer = REPLACE(answer, 'ok -- ', '');


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

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

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




Apache Auth Mod

2002-07-10 Thread Rob Emanuele

Does anyone know of an Apache Module for auth-ing against a MySQL
database?  MySQL lists one on its website and its no longer
supported by the developers.  I found Apache lists one that is
also not supported anymore.

mod-auth-mysql-2.20 from bourbon.netvision.il was one of the ones
not supported.  I'm using it and it works well but I was hoping
there was one that supported Digest authentication instead of
just Basic.

Thanks,

Rob



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

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




Re: slave server in readonly

2002-07-10 Thread Gerald Clark

Well, if it is read only, it won't be able to update from the master.

GRANT your users no write permission.

Pierre Baridon wrote:


 is it possible to start a server in 'read only' mode ?
 so that users cannot write in  my slave server ?

 thanks,

 Pierre






 --sql,query


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

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





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

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




RE: mysql replication

2002-07-10 Thread Nilesh Shah

No. You cann't have one slave connected to more than one master.

Nilesh

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 10:30 PM
To: [EMAIL PROTECTED]
Subject: mysql replication


Hi All,

I have 3 mysql servers with Red Hat 7.2 as the OS (Mysql-3.23.49). I am
naming the 3 PCS as A,B and C. I have a table named files-info in all
the 3
mysql servers. My requiremnet is I want two way replication between A to
B
and A to C. Now I have two way replication between A to B. I want to add
Ato C also. I want to do it in the same data base engine...How can I do
that...

Is it possible for me to run two replication client session in the same
PC,
I mean one client is accessing one database server and other one is
accessing other database server...is that possible...???
Thanks in advance...

regds,




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

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




Error segfault

2002-07-10 Thread Darren Young

I have a small c program that is supposed to run a select query against a
MySQL database. It keeps bombing with a segfault during what I think is the
db connect. I recompiled everything with debug and ran mysql_debug in the
code and am getting the following:

[youngd@fett]:~/src/logit $ ./searchlog -d
Debug set
Parsed config file and got:
DB Host: fett
DB Name: CHANGELOG
DB User: youngd
DB Pass: xx

1: dbug: libmysql.c:  1176:1: mysql_real_connect
2: dbug: libmysql.c:  1178:1: | enter: host: fett  db: CHANGELOG
user: youngd
3: dbug: libmysql.c:  1294:1: | info: Server name: 'fett'.  TCP
sock: 1073830556
4: dbug:  violite.c:   103:2: | vio_new
5: dbug:  violite.c:   104:2: | | enter: sd=3
6: dbug:my_malloc.c:31:3: | | my_malloc
7: dbug:my_malloc.c:32:3: | | | my: Size: 84  MyFlags: 16
8: dbug:my_malloc.c:48:3: | | | exit: ptr: 8072d68
9: dbug:my_malloc.c:49:3: | | my_malloc
   10: dbug:  violite.c:   126:2: | vio_new
   11: dbug: libmysql.c:  1346:1: | error: Got error 111 on connect
to 'fett'
   12: dbug: libmysql.c:  1568:1: | error: message: 2003 (Can't
connect to MySQL server on 'fett' (111))
   13: dbug: libmysql.c:   622:2: | end_server
   14: dbug: libmysql.c:   626:2: | | info: Net: TCP/IP (3)
   15: dbug:  violite.c:   341:3: | | vio_close
   16: dbug:  violite.c:   362:3: | | | vio_error: close() failed,
error: 107
   17: dbug:  violite.c:   367:3: | | vio_close
   18: dbug:my_malloc.c:58:3: | | my_free
   19: dbug:my_malloc.c:59:3: | | | my: ptr: 8072d68
   20: dbug:my_malloc.c:62:3: | | my_free
   21: dbug:my_malloc.c:58:3: | | my_free
   22: dbug:my_malloc.c:59:3: | | | my: ptr: 333a3630
Segmentation fault

If I run a strace on the same binary I get:

connect(3, {sin_family=AF_INET, sin_port=htons(23196),
sin_addr=inet_addr(192.168.5.3)}}, 16) = -1 ECONNREFUSED (Connection
refused)
shutdown(3, 2 /* send and receive */)   = -1 ENOTCONN (Transport endpoint is
not connected)
close(3)= 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

It picks up the connection info from a config file. I have other utils that
use the same config file and parsing code which work ok. The host, db,
username and password are used by other scripts and programs. The only thing
this program does is runs a single select query against the db.

Any ideas what error 111 and/or 2003 is? Other thoughts?

The actual debug used in the code is:
   mysql_debug(d:t:F:L:n:N:P:o:, /tmp/client.trace);

Thanks,

Darren Young
[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: DateTime subtraction question

2002-07-10 Thread Bryan W. Headley

Richard Fox wrote:
 This question relates to both mysql in general and the mysql++ C++ API in 
particular, thus the adressing to both lists.
 
 I have a DateTime object (really a formatted string) say 2002-07-10 11:38:38. I 
want to subtract some variable number of hours (from 0 to 11) from it. How do I 
accomplish this in an elegant manner?
 
 There is quite a bit of logic to handle all the cases where subtracting hours takes 
the date one day back, which can take the month one month back, which can take the 
year one year back! And of couse all the months have different lengths so this can be 
some ugly code. I can do this the hard way, but I was wondering if anyone already has 
a nice solution.  
 

Are you going to be doing this often (e.g., dateroll conventions, 
holiday/weekend avoidance). If so, your object should be smarter than 
just keeping the string. E.g., it might want to have a notion of the 
julian date, time in UTC, etc., etc.

Convert the date to struct tm, call mktime(). You now have number of 
seconds since the epoch of 1970. Subtract x-hours * 60 minutes * 60 
seconds. Convert back to a struct tm, and fire off strftime.

Real cheap: make MySql dope it out, and take the network hit,

SELECT 2002-07-10 11:38:38 - INTERVAL 11 HOUR;


-- 
   .:. 
Bryan W. Headley - [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: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Jeremy Zawodny

On Wed, Jul 10, 2002 at 09:57:56AM -0700, Mark Hughes wrote:
 Thanks, I had a look at that and it seems that slave_net_timeout is the
 variable that should be used and this is set to 3600 seconds - however it
 appears that the net_read_timeout is being used and by changing this from
 30 to 3600 seconds the messages seem to have gone away.
 
 In the 3.23.38 version we are using with our other slaves they never 
 timeout and the slave_new_timeout variable doesn't exist - it would
 seem that some code has been introduced to allow the slave connections to
 timeout but is using the net_read_timeout variable rather than the
 slave_net_timeout variable as I would expect.

Please send in a bug report.  Either the docs are wrong or the code
is.

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

MySQL 3.23.51: up 41 days, processed 921,560,254 queries (255/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




Apache Auth Mod

2002-07-10 Thread Rob Emanuele

Does anyone know of an Apache Module for auth-ing against a MySQL
database?  MySQL lists one on its website and its no longer
supported by the developers.  I found Apache lists one that is
also not supported anymore.

mod-auth-mysql-2.20 from bourbon.netvision.il was one of the ones
not supported.  I'm using it and it works well but I was hoping
there was one that supported Digest authentication instead of
just Basic.

Thanks,

Rob



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

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




FW: calculating inside query

2002-07-10 Thread Luc Foisy

Woops, sent this to support. Sorry Support!

 -Original Message-
 From: Luc Foisy 
 Sent: Wednesday, July 10, 2002 1:37 PM
 To: 'Mysql-Support (E-mail)
 Subject: RE: calculating inside query
 
 
  -Original Message-
  Hi there,
  
  I would like to find out the top 10 of some ratings. There 
  are 2 columns.
  One for the rating and one for the amount of ratings.
  To find out the top 10 I would have to divide those 2 values 
  and sort it.
  
  Somehow this does not work. I do not have a clue why. Maybe 
  someone of you
  guys do see the error:
  
  SELECT
ID,
rating_total / ratings_amount AS top10
  FROM rating
  ORDER BY top10 desc
  LIMIT 10
  
  Thanx for any help,
  
  Andy
  query
 
 Try ORDER BY (rating_total / ratings_amount) desc
 and you may want to quote your alias   AS 'top10'
 

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

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 List

2002-07-10 Thread Darren Young

I've sent a couple of messages to the MySQL list today that didn't seem to
get through. Have there been any problems with the list and/or the manager
today? One of them was returned as being too large to be posted and it
really wasn't all that long. One of them never made it through and was never
returned. This one was originally returned as spam since it didn't contain
any words related to sql, mysql or query. Are the list filters or posting
rules available somewhere to read?

Here's the question I had earlier from the first message that was returned.

I have a small c program that is supposed to run a select query against a
MySQL database. It keeps bombing with a segfault during what I think is the
db connect. I recompiled everything with debug and ran mysql_debug in the
code and am getting the following:

1: dbug: libmysql.c:  1176:1: mysql_real_connect
2: dbug: libmysql.c:  1178:1: | enter: host: fett  db: CHANGELOG
user: youngd
3: dbug: libmysql.c:  1294:1: | info: Server name: 'fett'.  TCP
sock: 1073830556
4: dbug:  violite.c:   103:2: | vio_new
5: dbug:  violite.c:   104:2: | | enter: sd=3
6: dbug:my_malloc.c:31:3: | | my_malloc
7: dbug:my_malloc.c:32:3: | | | my: Size: 84  MyFlags: 16
8: dbug:my_malloc.c:48:3: | | | exit: ptr: 8072d68
9: dbug:my_malloc.c:49:3: | | my_malloc
   10: dbug:  violite.c:   126:2: | vio_new
   11: dbug: libmysql.c:  1346:1: | error: Got error 111 on connect
to 'fett'
   12: dbug: libmysql.c:  1568:1: | error: message: 2003 (Can't
connect to MySQL server on 'fett' (111))
   13: dbug: libmysql.c:   622:2: | end_server
   14: dbug: libmysql.c:   626:2: | | info: Net: TCP/IP (3)
   15: dbug:  violite.c:   341:3: | | vio_close
   16: dbug:  violite.c:   362:3: | | | vio_error: close() failed,
error: 107
   17: dbug:  violite.c:   367:3: | | vio_close
   18: dbug:my_malloc.c:58:3: | | my_free
   19: dbug:my_malloc.c:59:3: | | | my: ptr: 8072d68
   20: dbug:my_malloc.c:62:3: | | my_free
   21: dbug:my_malloc.c:58:3: | | my_free
   22: dbug:my_malloc.c:59:3: | | | my: ptr: 333a3630
Segmentation fault

It doesn't generate a core dump by the way. If I run a strace on the same
binary I get:

connect(3, {sin_family=AF_INET, sin_port=htons(23196),
sin_addr=inet_addr(192.168.5.3)}}, 16) = -1 ECONNREFUSED (Connection
refused)
shutdown(3, 2 /* send and receive */)   = -1 ENOTCONN (Transport endpoint is
not connected)
close(3)= 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

Any ideas what error 111 and/or 2003 is? Other thoughts?

The actual debug used in the code is:
   mysql_debug(d:t:F:L:n:N:P:o:, /tmp/client.trace);

The username/password/host/database all work fine from the mysql client as
well as from other programs that use similar shared code as the one that's
broken.

Thanks,

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




Diagnosing frequent table corruption error 127.

2002-07-10 Thread Kevin Fries

One of our servers (of many running the same software and mysql version) is
frequently getting
ERROR 1030: Got error 127 from table handler

on two of its tables.

mysql version is 3.23.49.


We can not recover with myisamchk -r, but instead have to use myisamchk -o
which ends up wiping out the offending record(s).

We've tried to correlate this to some unix process which might interrupt
writing to the file,
but can't find any pattern.  Does anyone have a good methodology for
diagnosing these corruptions?

We can possibly suspect hardware problems (old rack-mount server) but having
done a lowlevel filesystem check, no errrors come up.

The two tables involved are almost exclusively used with INSERT statements,
and they do contain around 25 rows,

What else can lead to such frequent errors on the same tables?



Thanks for your suggestions,
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: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Jeff Kilbride

Yeah, I'm getting these errors all the time on 3.23.51, also. I agree that
the slave_net_timeout variable is definitely not being paid any attention.
However, I'm not comfortable just upping the net_read_timeout without
knowing what other effects it might have.

--jeff

- Original Message -
From: Mark Hughes [EMAIL PROTECTED]
To: Nilesh Shah [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 9:57 AM
Subject: RE: Replication - Error reading packet from server:
(server_errno=1159)


 Thanks, I had a look at that and it seems that slave_net_timeout is the
 variable that should be used and this is set to 3600 seconds - however it
 appears that the net_read_timeout is being used and by changing this from
 30 to 3600 seconds the messages seem to have gone away.

 In the 3.23.38 version we are using with our other slaves they never
 timeout and the slave_new_timeout variable doesn't exist - it would
 seem that some code has been introduced to allow the slave connections to
 timeout but is using the net_read_timeout variable rather than the
 slave_net_timeout variable as I would expect.


 On Wed, 10 Jul 2002, Nilesh Shah wrote:

  Set variable net_read_timeout to some bigger value.
 
   http://www.mysql.com/doc/S/H/SHOW_VARIABLES.html
 
 
  Nilesh Shah
 
 
 
  -Original Message-
  From: Mark Hughes [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 10, 2002 3:36 AM
  To: [EMAIL PROTECTED]
  Subject: Replication - Error reading packet from server:
  (server_errno=1159)
 
 
  Hi,
 
  We updated one of our slave servers to 3.3.51 from 3.23.38 and in common
  with lots of other posts i've seen we're getting lots of errors where
  the
  slave loses the connection to the master:
 
  020710  7:24:05  Error reading packet from server:  (server_errno=1159)
  020710  7:25:05  Slave: Failed reading log event, reconnecting to retry,
  log 'update.408' position 131306
  020710  7:25:05  Slave: reconnected to master
  '[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
  at
  position 131306
  020710  7:26:12  Error reading packet from server:  (server_errno=1159)
  020710  7:26:12  Slave: Failed reading log event, reconnecting to retry,
  log 'update.408' position 132434
  020710  7:26:12  Slave: reconnected to master
  '[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
  at
  position 132434
  020710  7:26:42  Error reading packet from server:  (server_errno=1159)
  020710  7:27:42  Slave: Failed reading log event, reconnecting to retry,
  log 'update.408' position 132434
  020710  7:27:42  Slave: reconnected to master
  '[EMAIL PROTECTED]:3306',replication resumed in log 'update.408'
  at
  position 132434
 
  These are happening every 60 seconds or so.
 
  Some info on our architecture
 
  System: Linux int04948-2 2.2.19-6.2.16 #1 Wed Mar 13 13:03:05 EST 2002
  i686 unknown
  Architecture: i686
 
  Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
  /usr/bin/cc
  GCC: Reading specs from
  /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
  gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
  Compilation info: CC='gcc'  CFLAGS=' -O3'  CXX='gcc'  CXXFLAGS=' -O3
  -felide-constructors -fno-exceptions -fno-rtti  '
  LDFLAGS=''
  LIBC:
  lrwxrwxrwx   1 root root   13 Jul  9 16:49 /lib/libc.so.6 -
  libc-2.1.3.so
  -rwxr-xr-x   1 root root  4105868 Dec  8  2001
  /lib/libc-2.1.3.so
  -rw-r--r--   1 root root 20299228 Dec  8  2001 /usr/lib/libc.a
  -rw-r--r--   1 root root  178 Dec  8  2001 /usr/lib/libc.so
  Configure command: ./configure --disable-shared
  --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
  --without-berkeley-db --without-innodb --enable-assembler
  --enable-local-infile --with-mysqld-user=mysql
  --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
  --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin
  --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql
  --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man
  '--with-comment=Official MySQL RPM' CC=gcc 'CFLAGS= -O3' 'CXXFLAGS= -O3
  -felide-constructors -fno-exceptions -fno-rtti  '
  CXX=gcc
  Perl: This is perl, version 5.005_03 built for i386-linux
 
  I couldn't find a solution to this, is it a known problem with 3.3.51 ?
 
  Thanks,
  Mark.
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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/   

Mysql certification

2002-07-10 Thread Defryn, Guy




I was wondering if anybody heard about a possible release of books that help you 
prepare for the Mysql certification?

Cheers

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

To 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-DB] Re: subtracting one query from the other

2002-07-10 Thread Harpreet Kaur

Dear Dan,

Thanks for your timely help. Yes, removing the concatenation has reduced the 
running time nearly 10 times . So finally my sql looks like the below,

SELECT distinct 
a.playlist,a.material_id,a.destination_locator,a.destination,a.air_time,a.traffic_duration,a.comment,a.title,a.device_name,a.source_locator,a.source
from
cch_dubber_dublist_view_a1 a left outer join cch_dubber_dublist_view_b1 b ON
a.material_id   = b.material_id AND
a.destination_locator = b.destination_locator AND
a.device_name   = b.device_name
where b.material_id is null

The number of records returned is 3566. The time it takes is 18 seconds.
My boss wants it to run in 4-5 seconds. If the number of records r more like 
4-5000 then it takes even longer. How can i reduce the time even further. 
Can i index the tables or nething will that help.

Help is greatly appreciated.

Thanks,
Regards
Harpreet Kaur



From: [EMAIL PROTECTED] (Dan Kokenge)
To: [EMAIL PROTECTED] (Harpreet Kaur)
Subject: Re: [PHP-DB] Re: subtracting one query from the other
Date: Tue, 02 Jul 2002 00:33:21 -0400


Hi Harpreet

 SELECT distinct a.playlist,a.material_id,a.destination_locator,
 a.destination,a.air_time,a.traffic_duration,a.comment,a.title,
 a.device_name,a.source_locator,a.source from record1 a left outer join
 record2 b on
 
a.material_id+a.destination_locator+a.device_name=b.material_id+b.destination_locator+b.device_name
 where b.material_id+b.destination_locator+b.device_name is null
 

Not sure why you concatenate the fields together. This will take some time 
to bring the fields together before the compare. Why not simply compare the 
separate fields. Also why do you compare all the fields for null. Seems 
like you only need to compare the material_id, that is of course you don't 
have a matching material_id that can be null - and I doubt that.

SELECT DISTINCT
a.playlist,
a.material_id,
a.destination_locator,
a.destination,
a.air_time,
a.traffic_duration,
a.comment,
a.title,
a.device_name,
a.source_locator,
a.source

FROM record1 a

LEFT OUTER JOIN record2 b
ON  a.material_id   = b.material_id
AND a.destination_locator = b.destination_locator
AND a.device_name   = b.device_name

WHERE   b.material_id   is NULL
-
if you need all three you can change the where to:
WHERE   b.material_id   is NULL
AND b.destination_locator is NULL
AMD b.device_name   is null

Actually this is a fairly common type command and I use it a lot. I don't 
know anything about your files. You didn't mention how large the files 
were. If they are huge the time may be ok. If not you may want to see if 
it's it indexed properly. A index on material_id at a minimum. If this file 
is fairly static, with only a few inserts and deletes a minute, then I'd 
index the hell out of it, and put an index on all 3 fields. If it's a vary 
active file with lot of inserts and deletes, then you have to be careful on 
your index scheme. Also if one file is vary large and one very small, then 
it is much faster to read the smaller file id's into arrays, and then read 
the large file and see if it has a matching id in the array. I've been 
called in to consult on problems where I've had to do 6 or 7 joins against 
huge files that I've dropped run time from hours to less than 5 minutes 
doing the array thing.

HTH.. Good luck..
Dan


__
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at 
http://webmail.netscape.com/




_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.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: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Jeff Kilbride

Is there a web-based interface for bug reporting? Or is there a way to use
the mysqlbug program when my database machine isn't connected to the
internet?

Thanks,
--jeff

- Original Message -
From: Jeremy Zawodny [EMAIL PROTECTED]
To: Mark Hughes [EMAIL PROTECTED]
Cc: Nilesh Shah [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 11:39 AM
Subject: Re: Replication - Error reading packet from server:
(server_errno=1159)


 On Wed, Jul 10, 2002 at 09:57:56AM -0700, Mark Hughes wrote:
  Thanks, I had a look at that and it seems that slave_net_timeout is the
  variable that should be used and this is set to 3600 seconds - however
it
  appears that the net_read_timeout is being used and by changing this
from
  30 to 3600 seconds the messages seem to have gone away.
 
  In the 3.23.38 version we are using with our other slaves they never
  timeout and the slave_new_timeout variable doesn't exist - it would
  seem that some code has been introduced to allow the slave connections
to
  timeout but is using the net_read_timeout variable rather than the
  slave_net_timeout variable as I would expect.

 Please send in a bug report.  Either the docs are wrong or the code
 is.

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

 MySQL 3.23.51: up 41 days, processed 921,560,254 queries (255/sec. avg)

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

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



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

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




Mass Delete

2002-07-10 Thread rpruitt

I have about 40,000 email addresses in a MySQL database.

I also have a list of 1500 email addresses that need to be removed.

I am searching for a way to delete these 1500 email addresses en masse,
but I have come up short.

I sure would appreciate a nudge in the right direction from somebody who
might be in the know.

Thanks,
Robert


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

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




can't connect

2002-07-10 Thread Alex Jarvis

So, I had mysql up and running a week ago, but at some point the
system on which it was installed was rebooted.  Now when I try to connect
I get a Cannot connect through socket 'var/lib/mysql/mysql.sock' error
message.  I've read some of the archives and found similar problems.  The
common suggestion seems to be that the server is not running.  And I think
that may be the case.  But apparently I don't know how to start the server
again.  Any help would be appreciated,

-Alex



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

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




Re: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Jeremy Zawodny

On Wed, Jul 10, 2002 at 03:13:55PM -0700, Jeff Kilbride wrote:

 Is there a web-based interface for bug reporting? Or is there a way
 to use the mysqlbug program when my database machine isn't connected
 to the internet?

You can submit a but directly to [EMAIL PROTECTED]  If your
message contains the string How-To-Repeat:, it'll pass the filter.
Just don't tell anyone. :-)

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

MySQL 3.23.51: up 41 days, processed 925,560,632 queries (255/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: can't connect

2002-07-10 Thread Bhavin Vyas

running the script 'safe_mysqld ' should start the server.
- Original Message -
From: Alex Jarvis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 3:21 PM
Subject: can't connect


 So, I had mysql up and running a week ago, but at some point the
 system on which it was installed was rebooted.  Now when I try to connect
 I get a Cannot connect through socket 'var/lib/mysql/mysql.sock' error
 message.  I've read some of the archives and found similar problems.  The
 common suggestion seems to be that the server is not running.  And I think
 that may be the case.  But apparently I don't know how to start the server
 again.  Any help would be appreciated,

 -Alex



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

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



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

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




RE: can't connect

2002-07-10 Thread Chaitanya Diwadkar

You can tell if the server is running by looking at the process list. There
should be at least 1 mysqld process.

You can also do a
'mysql -S /path/to/socket/file' if it cannot find the file.

-Chait 

-Original Message-
From: Alex Jarvis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 3:22 PM
To: [EMAIL PROTECTED]
Subject: can't connect


So, I had mysql up and running a week ago, but at some point the
system on which it was installed was rebooted.  Now when I try to connect
I get a Cannot connect through socket 'var/lib/mysql/mysql.sock' error
message.  I've read some of the archives and found similar problems.  The
common suggestion seems to be that the server is not running.  And I think
that may be the case.  But apparently I don't know how to start the server
again.  Any help would be appreciated,

-Alex



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

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: Mass Delete

2002-07-10 Thread Ralf Narozny

Using Linux/Unix I'd say:

echo SELECT concat('DELETE FROM mailtab WHERE 
mailaddress=',mailaddress,';') FROM mailtab WHERE some strange 
conditions here | mysql db | mysql db

[EMAIL PROTECTED] wrote:

I have about 40,000 email addresses in a MySQL database.

I also have a list of 1500 email addresses that need to be removed.

I am searching for a way to delete these 1500 email addresses en masse,
but I have come up short.

I sure would appreciate a nudge in the right direction from somebody who
might be in the know.

  



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

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




subselect in an insert

2002-07-10 Thread daniel

why is it that this doens't work?

INSERT INTO mytable (column0, column1, column2, column3, column4) values
($value0, (SELECT id from othertable where login='$ENV{REMOTE_USER}'),
$value2, $value3, $value4);

the error i'm getting says that there's an error in my sql syntax near
'select id from othertable...'

i'm user perl with dbi.pm if that's any help.

_
daniel a. g. quinn
starving programmer

in the beginning of a change, the patriot is a scarce man, brave, hated and
scorned. when his cause succeeds, however, the timid join him, for then it
costs nothing to be a patriot.
 - mark twain



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

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




Re: Mass Delete

2002-07-10 Thread daniel

personally, i'd just use perl:


  my @deademails = (long, list, of, emails);

take the output of:

  select email from table

drop that into another array (@allemails)
then do a for loop through all the emails
checking to see if each line of @allemails matches any line of @deademails
if it does
kill it

for (my $i = 0; $i = scalar(@allemails) - 1; $i++) {
for (my $x = 0; $x = scalar(@deademails) - 1; $x++) {
$killit = 1 if $allemails[$i] eq $deademails[$x];
}
if ($killit) {
enter delete query here
}
}


wo
that's way more complicated than it has to be

you could also just loop through all @deademails
and do a delete from table where email='$deademails[$i]'

for (my $i = 0; $i = scalar(@deademails) - 1; $i++) {
delete statement for $deademails[$i]
}



either way should work
i only kept the top one 'cause i spent so long writing it
it would just seem wrong to delete it all now

good luck :)

_
daniel a. g. quinn
starving programmer

corporation, n.
an ingenious device for obtaining individual profit without individual
responsibility.
 - ambrose bierce




- Original Message -
Sent: Wednesday, July 10, 2002 3:20 PM
Subject: Mass Delete


| I have about 40,000 email addresses in a MySQL database.
|
| I also have a list of 1500 email addresses that need to be removed.
|
| I am searching for a way to delete these 1500 email addresses en masse,
| but I have come up short.
|
| I sure would appreciate a nudge in the right direction from somebody who
| might be in the know.
|
| Thanks,
| Robert
|
|
| -
| Before posting, please check:
|http://www.mysql.com/manual.php   (the manual)
|http://lists.mysql.com/   (the list archive)
|
| To request this thread, e-mail [EMAIL PROTECTED]
| To unsubscribe, e-mail
[EMAIL PROTECTED]
| Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
|
|


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

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

2002-07-10 Thread Justin

Both my slave server say they are replicating correctly in the
mysqld.log but they arn't. Any change made to the master is not
reflected to the slaves. I have tried reseting the master and slaves but
didn't change anything. Also tried redumping the databases to the slaves
but that didn't effect anything. Anyone have any ideas?


Justin Best
NOC - Infostations




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

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




Re: Mass Delete

2002-07-10 Thread rpruitt

Not surprisingly, I'm still confused. Could you hold my hand?

Here's what I've got --

This is my table --

CREATE TABLE churchmail (
   email varchar(30) NOT NULL
);

It has one field containing 40,000 email addresses.

I have a text file -- remove.txt, which contains 1,500 email addresses
which need to be removed from the churchmail table. The database is 
named midtn. I think it's the two WHERE clauses that are throwing me. 
Whatever it is, I remain stuck, and would appreciate assistance. I'd 
like to do this on the command line, no PHP.

Thanks,
Robert


Ralf Narozny wrote:

 Using Linux/Unix I'd say:

 echo SELECT concat('DELETE FROM mailtab WHERE
 mailaddress=',mailaddress,';') FROM mailtab WHERE some strange
 conditions here | mysql db | mysql db

 [EMAIL PROTECTED] wrote:

 I have about 40,000 email addresses in a MySQL database.
 
 I also have a list of 1500 email addresses that need to be removed.
 
 I am searching for a way to delete these 1500 email addresses en masse,
 but I have come up short.
 
 I sure would appreciate a nudge in the right direction from somebody who
 might be in the know.
 
 
 

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

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


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

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




help with MySQL SELECT statement

2002-07-10 Thread Kirk Babb

Easy question I hope, relatively new user ( 6 months) here wanting to know
how to fashion a MySQL
select statement based on the following:

there is a list of managers and their email addresses.  This list changes
all the time as we add and subtract different companies from the db.  I
would like to check the domain name of a form submitted email address
against the list of domain names in the db.  But I don't want to select the
entire email list (1000's) when there are probably only 100 max different
domain names (i.e. alltel.com, ualr.edu, etc.).  Is there a way to do this?
It would lighten the server load and the download times for the form page if
possible.

thanks!

Kirk




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

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




RE: help with MySQL SELECT statement

2002-07-10 Thread Matthew Scarrow

Use SELECT DISTINCT.

Matthew Scarrow
ComIT Solutions Inc.
www.comit.ca
Phone: 519-442-0100
Fax:   519-442-0429


-Original Message-
From: Kirk Babb [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 9:59 PM
To: [EMAIL PROTECTED]
Subject: help with MySQL SELECT statement


Easy question I hope, relatively new user ( 6 months) here wanting to know
how to fashion a MySQL
select statement based on the following:

there is a list of managers and their email addresses.  This list changes
all the time as we add and subtract different companies from the db.  I
would like to check the domain name of a form submitted email address
against the list of domain names in the db.  But I don't want to select the
entire email list (1000's) when there are probably only 100 max different
domain names (i.e. alltel.com, ualr.edu, etc.).  Is there a way to do this?
It would lighten the server load and the download times for the form page if
possible.

thanks!

Kirk




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

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



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

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




Re: help with MySQL SELECT statement

2002-07-10 Thread Kirk Babb

wait, how will the MySQL SELECT DISTINCT pick only one between these two
addresses (as an example):

[EMAIL PROTECTED]
[EMAIL PROTECTED]

I only need one email address each for alltel.com, one for ualr.edu, one for
target.com, etc. when there might be 50 email addresses from each of those
domains.  I intend to then parse the adresses leaving only a list of
whatever.coms which I will stick into an array for my validation function
to use.
Or am I making a mountain out of a molehill here?  TIA

-Kirk



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

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

2002-07-10 Thread David Johnston

When running ./configure I am getting the error no termcap libraries but in
/usr/lib/termcap the libs are there.  What should I do?  I have my mysqlbug
file attached.

SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `' and `').
SEND-PR:
From: djohnston
To: [EMAIL PROTECTED]
Subject: [50 character or so descriptive subject here (for reference)]

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:David Johnston
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.51 (Source distribution)

Environment:
machine, os, target, libraries (multiple lines)
System: Linux betty2 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
LIBC:
-rwxr-xr-x1 root root  1394238 Mar 23 13:34 /lib/libc.so.6
-rw-r--r--1 root root 25361424 Mar 23 13:05 /usr/lib/libc.a
-rw-r--r--1 root root  178 Mar 23 13:05 /usr/lib/libc.so
Configure command:
./configure --with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory --
with-mit-threads=yes --without-perl --enable-thread-safe-client --with-berke
ley-db --enable-local-infile --with-innodb CC=gcc CXX=gcc



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

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




RE: help with MySQL SELECT statement

2002-07-10 Thread Matthew Scarrow

I'm not exactly sure if this is the right syntax. I can see that maybe a
couple of domains would get cut out of this if there spelt almost the same.
What you need to find out is the char count of the smallest domain name.
Then replace smallestdomain with that number. What the rest of the select
statement does is only get the last so many chars up to the smallest domain
name and then the distinct will only return those that are not the same. I'm
sure you can work around with this and find something that will do exactly
what you want.

SELECT DISTINCT email, substring(email,LENGTH(email)-smallestdomain,
smallestdomain) as domain from tbl_emails;

Matthew Scarrow
ComIT Solutions Inc.
www.comit.ca
Phone: 519-442-0100
Fax:   519-442-0429


-Original Message-
From: Kirk Babb [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 10:20 PM
To: [EMAIL PROTECTED]
Subject: Re: help with MySQL SELECT statement


wait, how will the MySQL SELECT DISTINCT pick only one between these two
addresses (as an example):

[EMAIL PROTECTED]
[EMAIL PROTECTED]

I only need one email address each for alltel.com, one for ualr.edu, one for
target.com, etc. when there might be 50 email addresses from each of those
domains.  I intend to then parse the adresses leaving only a list of
whatever.coms which I will stick into an array for my validation function
to use.
Or am I making a mountain out of a molehill here?  TIA

-Kirk



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

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




how do I fix corrupt .MYD file?

2002-07-10 Thread Bennett Haselton

I have a database in which one MYD file has apparently been corrupted:

 
mysql use tracerlock;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Didn't find any fields in table 'news_feed_item'
Database changed
mysql select count(*) from news_feed_item;
ERROR 1016: Can't open file: 'news_feed_item.MYD'. (errno: 145)
mysql
 

The other tables in the database still work.  How do I fix this one?  I 
have no idea how it happened.  If I open the file in a text editor, I can 
see the data from some of the records that have been entered.  I've 
rebooted the machine to no avail (I figured that wasn't the problem, but I 
tried).

I have a backup of the table dated last Saturday, but I'd prefer to fix 
this version if possible to preserve the entries entered between Saturday 
and Wednesday.

-Bennett

[EMAIL PROTECTED] http://www.peacefire.org
(425) 649 9024


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

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




Help!

2002-07-10 Thread Frederick Roy Bautista

I had a problem using mysql-max stable versin running
on redhat linux 7.1. The data has been lost every
other day it will come back again. What should I do?



__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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

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




Re: how do I fix corrupt .MYD file?

2002-07-10 Thread Dicky Wahyu Purnomo

Pada Wed, 10 Jul 2002 20:17:51 -0700
Bennett Haselton [EMAIL PROTECTED] menulis :

 I have a database in which one MYD file has apparently been corrupted:
 
  
 mysql use tracerlock;
 Reading table information for completion of table and column names
 You can turn off this feature to get a quicker startup with -A
 
 Didn't find any fields in table 'news_feed_item'
 Database changed
 mysql select count(*) from news_feed_item;
 ERROR 1016: Can't open file: 'news_feed_item.MYD'. (errno: 145)
 mysql
  

repair table newws_feed_item ;-)

-- 
die_if_kernel(Kernel gets FloatingPenguinUnit disabled trap, regs);
2.2.16 /usr/src/linux/arch/sparc/kernel/traps.c
 
MySQL 3.23.51 : up 19 days, Queries : 366.483 per second (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




Query realted to Mysql access.

2002-07-10 Thread Naathan

Hello,

Greetings!

I am trying hard to connect to MySQL database stored on Linux machine
through a
VB program running on windows on another machine.

My problems are ..

Problem No1:

My Windows machine is under a Windows NT domain.
Linux machine is under another Windows NT domain.

I created a database in the MySQL server which is in LINUX server.
I installed the MyODBC and created the DSN also.

I try to connect to MySQL server through a VB coding.

I am getting the following error message like .

 [TCX][MyODBC]Host local id address is not allowed to connect this MySQL
server 

Kindly let me know how to connect the MySQL database stored on LINUX machine
through a VB
coding.

Problem 2:

I have MySQL database stored on Linux machine.
I have LINUX client machine also.
I want to run a application which is created in VB.
I tried to run an VB exe in the Linux machine. I am not able to run the VB
exe.
Can I run the VB exe in  LINUX systems? how?
If yes then what to do for run the VB exe file in Linux?

Kindly give solutions to my above problems.

With best regards,

Naathan. India.



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

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   >