Searching a MySQL database

2003-01-16 Thread Tim Thorburn
Hi,

I've got a script setup to search two tables in a MySQL database.  The 
first page asks the user to select which table they'd like to search, and 
then enter in some key words.

The second page then determines which table the user selected and performs 
the search.  Right now, I'm going through each row with the following 
RowName LIKE .$searchTerm.  but there are 27 rows (it's not the 
largest of sites I'm working on now).  Is there a faster/better way to do this?

Thanks
-Tim



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

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



Java.lang.outofMemoryException while accessing MySQL usingJDBC

2003-01-16 Thread Prasad Budim Ram
Hi,
 I have a JDBC application connecting to MySQL database. It was working
fine for the queries that retrieve small amounts of data. But when the
database contains 600,000 records and the query SELECT * is fired it
gives 
Java.lang.outofMemoryException. Can any of you help me out what could
be the problem?
Thanks,
Ram

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

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




wrong result when perform search of empty string

2003-01-16 Thread Kwok Siang
OS: win XP
mysql : 3.23.54-max

can someone help me with this unexplainable question.

i create this in the mysql database,

CREATE TABLE `foo` (
  `num` int(4) unsigned zerofill NOT NULL default
''
) TYPE=MyISAM; 

after that, i tried to insert a blank data into it,

INSERT INTO foo set num=''; 
*(there's nothing between the quotes)

In the database it display 4 zeros which is , but
when i perform a search of an empty string like this,

SELECT * FROM foo WHERE num='';

The result was , by right it will hav an empty
set.
How could this happen? Please help



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

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

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




rescue data from disk backup

2003-01-16 Thread Henning Heil
hello there!

I have a backup (cd) of my former mysql installtion from an old machine 
and now want to get the data out of it. in the meantime the disk crashed 
and I have no chance to start the old installation again.

does anyone know how to get the data in my current mysql-installation? 
just copy in the files? create the same databases and replace the files? 
has anybody don this before?

thanks for your help,

henning



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

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



index problem

2003-01-16 Thread Prasanth Krishna
hi

i have a database with a single table say tbl1 with an index on a
particular field say col1. when i say 

select * from tbl1;

it doesn't use the index on that table.
but if i say 

select col1 from tbl1;
it uses the index.

how to make mysql use the index on col1 for the first query?

thanks in advance.
Prasanth

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

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




Re: data directory in 4.0.9

2003-01-16 Thread Gelu Gogancea
My dear friend,
I suppose that you already done:
./configure --prefix=PATH_OF_THE_MYSQL_APPLICATION
After compilation you must do:
make install
and after this :
cd /PATH_OF_THE_MYSQL_APPLICATION/bin
and...
./mysql_install_db.

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Defryn, Guy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 4:00 AM
Subject: data directory in 4.0.9


 Where does mysql places the databases in 4.0.9 when installing from
source?
 The var directory does not seem to be there anymore



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

 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: index problem

2003-01-16 Thread Simon Green
In the first statement you are selecting * (ALL the row) from tbl1 with no
restricting comment (e.g. where) so if you are going to select every thing
in the table you do not need to use the index (MySQL uses B-tree).
Simon 

-Original Message-
From: Prasanth Krishna [mailto:[EMAIL PROTECTED]]
Sent: 16 January 2003 09:31
To: [EMAIL PROTECTED]
Subject: index problem


hi

i have a database with a single table say tbl1 with an index on a
particular field say col1. when i say 

select * from tbl1;

it doesn't use the index on that table.
but if i say 

select col1 from tbl1;
it uses the index.

how to make mysql use the index on col1 for the first query?

thanks in advance.
Prasanth

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

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




InnoDB and disks scheme

2003-01-16 Thread JOUANNET, Rodolphe
Hi,

hardware : Sun v880 4 CPUs, 8Go RAM, 3 disks (73Go each ; 1 for the system,
2 for datas, logs and dumps)
software : Solaris 8, mySQL 3.23.54 (+innoDB)
database : approx 40 Go of dataspace (2 or 3 tables of 1 or 2 millions of
rows) ; many selects, inserts and few updates

Question : what is the best disks solution ? 1 for the dataspace and 1 for
the logs and dumps, 1 for the dataspace and logs and 1 for the dumps, disk
stripe, ... ?

Best regards.

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

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




Re: index problem

2003-01-16 Thread Steve Edberg
At 2:31 AM -0700 1/16/03, Prasanth Krishna wrote:

hi

i have a database with a single table say tbl1 with an index on a
particular field say col1. when i say

select * from tbl1;

it doesn't use the index on that table.



In this query, I can't see any reason to use an index...MySQL is 
simply returning all columns from all records in whatever order it 
sees fit.

If you used

	select * from tbl1 order by col1

it *would* use the index.


but if i say

select col1 from tbl1;
it uses the index.



I'm guessing that in this case MySQL is reading col1 directly from 
the index file...it doesn't need to look at the actual data record at 
all. Which is good.


how to make mysql use the index on col1 for the first query?



Give it a reason to do so ;)

-steve


--
++
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
++
| SETI@Home: 1001 Work units on 23 oct 2002  |
| 3.152 years CPU time, 3.142 years SETI user... and STILL no aliens...  |
++

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

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




DBI Question?

2003-01-16 Thread Jeff Snoxell
Hi,

if I call:

my $record = $sth-fetchrow_hashref();

then:

$sth-finish();

How valid is it for me to keep referring to my $record hash pointer? 
Especially if I use $sth in a subsequent transaction.

Thanks,


Jeff Snoxell
Aetherweb Ltd
http://www.aetherweb.co.uk

NB. I know I asked this question before but nobody answered and I've tried 
looking elsewhere but can't find an answer to this anywhere. Thanks.

[SPAM FILTER FODDER: MySQL, 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



replication ignore delete statement

2003-01-16 Thread CheongMeng
 Hi,

is it possible to ignore all sql delete statement while doing
mysql replication?


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

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





The Bitkeeper resositore is down ?

2003-01-16 Thread Dyego Souza do Carmo


Hello guy's 

The bitkeeper repository of MySQL 4.0 and 4.1 are down ? or are moved
to other machine ? I cant access :


scribthree:/temp/mysql-development/mysql-4.1# bk pull
bk://work.mysql.com:7004: Connection refused
scribthree:/temp/mysql-development/mysql-4.1# 


any idea ?

Tanks !!!

SQL,query,h0h0


-
  ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento   
-
 E S C R I B A   I N F O R M A T I C A
-
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
-- 
$ look into my eyes Phone : +55 041 296-2311  r.112
look: cannot open my eyes Fax   : +55 041 296-6640
-
   Reply: [EMAIL PROTECTED]



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

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




Re: --- How to query results of a query?

2003-01-16 Thread harm
On Wed, Jan 15, 2003 at 11:55:44PM +, [EMAIL PROTECTED] wrote:
 
 please look at page 194 of the reference manual...
 
 (and if so how do you ask MySQL to create a temp table from the 
  results of aquery?)
 
 here's an example:
 
 mysql create temporary table tmp (name varchar(20), owner varchar(20, species 
varchar(10));
 
 mysql insert into tmp select name, owner, species from pet where species='Dog';


Or in 1 go:
create temporary table tmp select name, owner, species from pet where species='Dog';

Of it is small:
create temporary table tmp type=heap select name, owner, species from pet where 
species='Dog';
for memory based one.


Harmen
(Sql, select, etc)


-- 
The Moon is Waxing Gibbous (95% of Full)
 tty.nl - 2dehands.nl: 59340

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

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




Re: DBI Question?

2003-01-16 Thread Csongor Fagyal
Csongor Fagyal wrote:


Jeff Snoxell wrote:


Hi,

if I call:

my $record = $sth-fetchrow_hashref();

then:

$sth-finish();

How valid is it for me to keep referring to my $record hash pointer? 
Especially if I use $sth in a subsequent transaction.


It is absolutely legal. Your $record is detached from your DBI 
instance after it has been retrieved - it is just a regular perl hash 
reference, noone will destroy it.

- Cs.

Argh... sql, smallint, bigint, very big int!



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

To 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 on FreeBSD with a NT linked database

2003-01-16 Thread Nicolas
 In the last episode (Jan 15), Nicolas said:
   On Tue, Jan 14, 2003 at 05:49:24PM +0100, Nicolas wrote:
I'm running Freebsd 4.6.2 with mysql server v3.23.49
   
I have a little question about using Mysql on Freebsd and having
a database on a NT 4 linked drive, using Samba (the drive was
mounted on my FreeBSD system with Sharity-light because
smbmount doesn't work on Freebsd) .
   
I can query my database on the linked drive, but I cannot insert
or update anything. I've always the read only error message when
I try to insert a row ..
  
   Have you verified that the drive is mounted read/write?
 
  Hi Jeremy, yes the drive is mounted read-write. I've full acces on it
  and the folder's attribut is archive only. I wonder is this is a
  Sharity-light file locking problem.

 That's possible.  Try starting mysql with --skip-locking and see if
 that helps.


Thanks Dan, it was a good idea but I've tried and it doesn't help. I still
have an error like table 'XX' is read only
: ¬ |



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

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




g++ and mySQL]

2003-01-16 Thread Dileep M. Kumar

Hello friends,

I am  trying to  connect mySQL thru  g++. I  could connect the  db and
execute a query. But I want to get a value from key board and pass the
same inside the query.

ie,

This is the query I am passing.

mysql_query(connection,insert into table-name values
('1','aaa','bbb','ccc'));

But I  want to read  the values  for aaa, bbb,  ccc and pass  into the
query. How can I do it. I am a just a beginner in C/C++

Regards
-- 
 .''`. Dileep M. Kumar [EMAIL PROTECTED]
: :'  :http://www.kumarayil.net
`. `'`
  `-  Debian GNU/Linux - Choice of the Freedom Lovers

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

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




Re[2]: The Bitkeeper resositore is down ?

2003-01-16 Thread Dyego Souza do Carmo
Dobrý den,
quinta-feira, 16 de janeiro de 2003, 08:29:47, napsal jste:

GR On Thursday 16 January 2003 11:30, you wrote:
 Hello guy's 

 The bitkeeper repository of MySQL 4.0 and 4.1 are down ? or are moved
 to other machine ? I cant access :



GR see 
GR http://lists.mysql.com/cgi-ez/ezmlm-cgi?3:mss:6512:200301:lnkeklmolkladnlpnmfk

GR Regards

GR Georg


0hhh... tanks very much !


The Manual on site about this is incorrect. The location specified
in the site is old.



sql,query




-
  ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento   
-
 E S C R I B A   I N F O R M A T I C A
-
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
-- 
$ look into my eyes
look: cannot open my eyes
-
   Reply: [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: g++ and mySQL]

2003-01-16 Thread Gelu Gogancea
Hi,
If i understand well you wish to concatenate different strings.
Are many options but the most handy solution is if you use sprintf.

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Dileep M. Kumar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 1:10 PM
Subject: g++ and mySQL]



 Hello friends,

 I am  trying to  connect mySQL thru  g++. I  could connect the  db and
 execute a query. But I want to get a value from key board and pass the
 same inside the query.

 ie,

 This is the query I am passing.

 mysql_query(connection,insert into table-name values
 ('1','aaa','bbb','ccc'));

 But I  want to read  the values  for aaa, bbb,  ccc and pass  into the
 query. How can I do it. I am a just a beginner in C/C++

 Regards
 --
  .''`. Dileep M. Kumar [EMAIL PROTECTED]
 : :'  :http://www.kumarayil.net
 `. `'`
   `-  Debian GNU/Linux - Choice of the Freedom Lovers

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

 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




Problems running mysql_install_db

2003-01-16 Thread Ada Jimenez Primo
Description:
When i run scripts/mysql_install_db:
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help 
diagnose
the problem, but since we have already crashed, something is definitely 
wrong
and this may fail

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

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

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

The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains
information that should help you find out what is causing the crash
Installation of grant tables failed!

Examine the logs in /usr/local/mysql/var for more information.
You can also try to start the mysqld daemon with:
/usr/local/mysql/libexec/mysqld --skip-grant 
You can use the command line tool
/usr/local/mysql/bin/mysql to connect to the mysql
database and look at the grant tables:

shell /usr/local/mysql/bin/mysql -u root mysql
mysql show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/mysql/var that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running 
mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/local/mysql/bin/mysqlbug 
script!

How-To-Repeat:
   #cd /usr/local/src
   #CFLAGS=-O3 CXX=gcc CXXFLAGS=-O3 -felide-constructors 
-fno-exceptions -fno-rtti ./configure --prefix=/usr/local/mysql 
--enable-assembler --with-mysqld-ldflags=-all-static

   #make
   #make install
   #scripts/mysql_install_db
  
Fix:
   how to correct or work around the problem, if known (multiple 
lines)

Submitter-Id:  ajimpri
Originator:root
Organization:
Universidad Pablo de Olavide-Sevilla (España)
MySQL support: email support
Synopsis:Problems running mysql_install_db
Severity: Critical
Priority:  high
Category:mysql
Class:  sw-bug
Release:  mysql-3.23.54 (Source distribution)

Environment:
   machine, os, target, libraries (multiple lines)
System: Linux snort 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 
i386 GNU/Linux
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC: Leyendo especificaciones de 
/usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configurado con: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --host=i386-redhat-linux --with-system-zlib 
--enable-__cxa_atexit
Modelo de hilos: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Compilation info: CC='gcc'  CFLAGS='-O3'  CXX='gcc'  

MySQL 3.23.51 compilation problem (Mandrake 9.0).

2003-01-16 Thread Rob Nikada
Hello,

I have encountered a problem when trying to compile
MySQL version 3.23.51 on Mandrake version 9.0. I've
been browsing through several pages related to
problems met while compiling that version but didn't
find anything relevant. My nerves are starting to
shake seriously...

The configure part worked well with the command line
:

./configure --prefix=/usr/local/mysql 
--with-named-curses-libs=/usr/lib/libncurses.so.5

But during the make install part, I have the following
Error message :

libmysql.c: In function `mysql_real_connect':
libmysql.c:1325: warning: passing arg 5 of
`gethostbyname_r' from incompatible pointer type
libmysql.c:1325: too few arguments to function
`gethostbyname_r'
libmysql.c:1325: warning: assignment makes pointer
from integer without a cast
make[1]: *** [libmysql.lo] Erreur 1
make[1]: Quitte le répertoire
`/var/tmp/mysql-3.23.51/libmysql'
make: *** [install-recursive] Erreur 1

This version of MySQL has been compiled using gcc
version 3.2 as shown below.

Configured with: ../configure --prefix=/usr
--libdir=/usr/lib --with-slibdir=/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix
--disable-checking --enable-long-long
--enable-__cxa_atexit
--enable-languages=c,c++,ada,f77,objc,java
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)

Any hint, anyone ? Shall I downgrade to GCC 2.95 ?

Thanks very much !




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

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

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




Re: view privileges

2003-01-16 Thread Doug Thompson
SELECT * from mysql.tables_priv where Table_name = 'myTable';
You will probably have to log on as 'root' unless you have created
another user with the same privileges.

The mysql GRANTs system is used to control USER privileges.  This means
that for a given table you can view which users can perform what
operations on that table.  The same holds true of databases and columns
within tables.

If you have never issued table-specific GRANT statements, then there
will be no entries in the mysql.tables_priv table.  That is because you
have been granting database-wide access to all table functions (Select,
Insert, Update, Delete, Create, Drop, Grant, References, Index, Alter)
for all users.  This is not a good idea.  

If you want to find out to which users you have been granting all these
table-wide privileges, look at the mysql.db table,  SELECT * from
mysql.db where db='mydb';

The above is a very superficial description of the mysql Access
Privilege system.  You need to read a lot more in the manual in section
4.2, General Security Issues and the MySQL Access Privilege System.

Doug


On Thu, 16 Jan 2003 01:15:03 -0600, Addison Ellis wrote:

hello,
   how can i view privileges for a table in a db? thank you, addison
sql,query,queries,smallint
-- 



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

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




Lock Tables Query

2003-01-16 Thread Clyde
Hi,

As per a previous thread I have found that when you use  lock Tables MySql will wait 
indefinitely for the lock - No timeout or error message.

Therefore let me explain my question.

Scenario:

User 1 locks files for a long running job. (write lock that prevents any access to the 
files)
User 2 logs on, then try's to lock or use these  files but can't because user 1 
already has the lock. (even a simple select * from xxx will wait forever)

The program for user 2 will just appear to hang. How do I give feed back to user 2 to 
say something like: Unable to lock/use files after waiting 30 seconds, try again 
later or whatever. IE I would like the program to be able to return control after a 
specific amount of time if the lock is not satisfied   in order to give feedback to 
the user, rather than the the program just wait and appearing to hang.

Better still if there is a system variable or something I can check first to see if 
the file is locked - but I can't seem to find this in the docs.

Most other databases I have used have a timeout value (like the record lock for 
innodb) so I am having trouble dealing with this scenario.

Any Ideas.

Thanks
Clyde England


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

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 freezes running under BSDI 4.2

2003-01-16 Thread Dave Granic
Going insane, we have a BSDI 4.2 Version running on an under powered
machine, we are trying to load up a new server with more horsepower also
running BSDI 4.2

We tried several compiled configurations and the binary distribution and the
server hangs after a about 1-2 hours of use (binary within minutes)..

compiles fine
/set threads to 2 in my.cnf
correctly set ld.so.conf


below is what we find in the .err file

BSDI is  patched up

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

key_buffer_size=268431360
record_buffer=1044480
sort_buffer=1048568
max_used_connections=1
max_connections=500
threads_connected=2
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 1284136 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation




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

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




Re: InnoDB Foreign Key Questions

2003-01-16 Thread Heikki Tuuri
Muhammed,

- Original Message -
From: Muhammed Syyid [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday, January 16, 2003 3:06 PM
Subject: Re: InnoDB Foreign Key Questions


 Second the same question :). What does the CONSTRAINT keyword
 regarding FOREIGN KEYS do?

the constraint name is simply ignored.

 Karam Chand, as far as I know, the drop command hasn't been
 implemented yet. So the only way to drop a foreign key is to drop and
 re-create the table.

DROP FOREIGN KEY will come in some 4.1.x version. Since the constraint name
is not stored, and is not required by the FOREIGN KEY syntax, I think that
the syntax could be

ALTER TABLE frobboz DROP FOREIGN KEY (column1) REFERENCES abbaguu (column2);

 Muhammed

Best regards,

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

sql query


 [EMAIL PROTECTED] (Karam Chand) wrote in message
news:avva22$168e$[EMAIL PROTECTED]...
  Hello
 
  I have two tables of InnoDB type.
 
  CREATE TABLE `ledger` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) default NULL,
PRIMARY KEY  (`id`),
KEY `id` (`name`)
  ) TYPE=InnoDB;
 
  CREATE TABLE `voucher` (
`id` int(11) NOT NULL default '0',
`vdate` date NOT NULL default '-00-00',
`amount` decimal(10,0) default '100',
`name` varchar(50) default 'Karam',
PRIMARY KEY  (`id`,`vdate`)
  ) TYPE=InnoDB;
 
  Now I add a Foreign Key reference to ledger.id for
  voucher id by using the following command -
 
  alter table voucher
  add constraint fk_key_1 foreign key (id) references
  ledger (id)
 
  now when i do a query -
 
  show table status like 'voucher'
 
  I am getting the following value in the comment field.
 
  InnoDB free: 23552 kB; (id) REFER rohit/ledger(id)
 
  It shows that foreign key has been made but i had
  specified it to be fk_key_1. Even if I make the
  Foreign Key without the keyword constraint the same
  thing happens ?
 
  So, what is the purpose of CONSTRAINT keyword. How can
  I give a name to a relationship.
 
  Also after reading the MySQL and InnoDB docs I am not
  able to guess how to drop a FOREIGN KEY ?
 
  How can I do that ?
 
  I am using mysql-mx-nt 3.23.54 running as a service in
  WinXP.
 
  Any help will be appreciated. Thanks in advance.
 
  Karam
 
  sql, query ( filteraide )
 
 
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
  http://mailplus.yahoo.com
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



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

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




Re: InnoDB is losing records, there are gaps in autoincrement sequence

2003-01-16 Thread Heikki Tuuri
Hi!

- Original Message -
From: My Deja [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday, January 16, 2003 12:39 PM
Subject: InnoDB is losing records, there are gaps in autoincrement sequence


 InnoDB appears to be losing records.

 The version I am using is 3.32.53 in Windows 2000.

 Gaps are appearing in the autoincrement sequence when
 the application does not permit record deletions.

 Records disappear although they have been retrieved
 for printing earlier.

I have not seen this kind of bug reported. Are you sure you do not roll back
the insertions? Or delete the rows?

The auto-inc sequence will not be continuous if you roll back insertions, or
delete rows.

 Does anyone know how this problem can be fixed?

 I am checking the application code to see if records
 can be deleted, either deliberately or accidentally.

 Has anyone come across such a problem?

 (sql,query,database,odbc - spam block bypass)

Best regards,

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

sql query




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

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




Re: innofb foreign keys problem

2003-01-16 Thread Heikki Tuuri
Natale,

- Original Message -
From: Natale Babbo [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Wednesday, January 15, 2003 9:33 AM
Subject: innofb foreign keys problem


 # - 3rd post - #
 # - PLEASE HELP -- #

 hi to all,

 is it still true that mysql/innodb needs explicit
 index creation on foreign keys?

yes. If you do not have a suitable index, foreign key checks will become
very slow because they have to do a table scan.

In the future, MySQL might do the following: in

CREATE TABLE abbaguu (
...
FOREIGN KEY (column1) REFERENCES frobboz (column2)
) TYPE=InnoDB;

it could check if there is a suitable index in abbaguu. If not, it would
create the index automatically.

But you are still left with the problem that also the table frobboz must
have a suitable index. And I think it is not a good idea to run an implicit
ALTER TABLE frobboz CREATE INDEX (column2). Users will be surprised that a
simple CREATE TABLE can take hours.

Another solution is to drop the requirement of indexes on the foreign key
and on the referenced key. But then users will be surprised that a simple
INSERT or DELETE can take 15 minutes.

Conclusion: for now, it is best to design your database schema bearing in
mind that adequate performance requires an index on the foreign key and on
the referenced key. This holds for all database brands.

Someone could volunteer to write a conversion tool which adds appropriate
indexes to a set of CREATE TABLE statements where foreign keys are declared.

...
 how can i create the database without creating
 explicitly an index on each foreign keys of my
 database?

 any suggestions are appreciated.
 thanks to all.

Best regards,

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

sql query




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

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




[ gamma file ]

2003-01-16 Thread Elby Vaz
--I´m brazilian. Sorry by my english

hello!

I installed

mysql-4.0.9-gamma-win

on my machine.

What means gamma ?

Thanks,
Elby.





_
MSN Hotmail, o maior webmail do Brasil. 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: POSIX Asynchronous I/O in InnoDB?

2003-01-16 Thread Heikki Tuuri
Per,

we are keeping an eye on Posix AIO in Linux as the well as the DIRECT IO
flush option of files. The file os0file.c contains some rudiments for the
Posix AIO use in InnoDB.

Monty had some bitter experiences from Solaris AIO years ago. We have been
waiting for the Linux support of Posix AIO to age a bit.

In Windows NT/2000/XP unbuffered AIO seems to work ok, and provides better
performance than ordinary file IO.

Best regards,

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

sql query

..

Subject: POSIX Asynchronous I/O in InnoDB?
From: Per Andreas Buer
Date: 14 Jan 2003 11:47:55 +0100





Hi.

I see InnoDB uses Asynchronous IO on Windows NT but not on Linux. There
are patches, made by SGI, which enables asynchronous IO on Linux 2.4
(http://oss.sgi.com/projects/kaio/).

Are there any plans to support native asynchronous IO in InnoDB?

Quoted from the project site:

 Preliminary experience with KAIO have shown over 35% improvement in
 database performance tests. Unit tests (which only perform I/O) using
 KAIO and Raw I/O have been successful in achieving 93% saturation with
 12 disks hung off 2 X 40 MB/s Ultra-Wide SCSI channels. We believe that
 these encouraging results are a direct result of implementing a
 significant part of KAIO in the kernel using split-phase I/O while
 avoiding or minimizing the use of any globally contented locks.


--
Per Andreas Buer

sql,query,queries,smallint




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

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




RE: Initiating secure connection to MySQL4 from PHP

2003-01-16 Thread Tonu Samuel
On Mon, 2003-01-13 at 23:48, David Rock wrote:
 Hello,
   This is discouraging after I spent most of the weekend getting OpenSSL
 working with our MySQL 4 server. Unfortunately I can't use Stunnel to secure
 the connection between our website and our MySQL server because our ISP will
 not allow me to run the Stunnel daemon on their servers. They have a web
 server farm and claim that they would need to configure Stunnel for me on
 each of their servers in the farm. How do people typically handle setting up
 Stunnel to secure their connections from a public ISP to their MySQL server?
 Is it possible that I only need to run the Stunnel daemon on my MySQL box?
 Securing the connection between a public ISP and a privately-hosted MySQL
 server seems like something that many people would have overcome by now. Am
 I really at the mercy of my ISP on this?

Usually SSL can be used with separate wrapper program on any side. But
this is usually.

SSL handshake is different in MySQL because compatibility issues. Even
when doing handshake with SSL enabled MySQL client, first packet is sent
without encryption. There is a byte or two having bits named Client
capabilities. If client want to establish SSL connection it raises bit
I want SSL, server responds with similar structure Server
capabilities having server can do SSL.

Only after that all negotiation gets repeated with SSL turned on.

This is why it is impossible to use stunnel on client side only and use
native SSL of MySQL server (or opposite).

In case of serious interest I can develop some separate piece of code
which allows to fake first MySQL handshake packet or handle this issue
somehow but it does not look serious idea to me :).

  Tõnu


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

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




Re: Java.lang.outofMemoryException while accessing MySQL using JDBC

2003-01-16 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Prasad Budim Ram wrote:

Hi,
 I have a JDBC application connecting to MySQL database. It was working
fine for the queries that retrieve small amounts of data. But when the
database contains 600,000 records and the query SELECT * is fired it
gives 
Java.lang.outofMemoryException. Can any of you help me out what could
be the problem?
Thanks,
Ram

By default, the JDBC driver has to cache all of the results in memory 
for every query. If you have 600,000 records, that can easily exceed the 
default heap space in most JVMs of around 16 megabytes. You can either 
extend the heap space (see your JVM docs, most take the '-Xmx64M' type 
of parameter to extend the heap, in the example given, to 64 megabytes), 
or use 'streaming' results (see the README for Connector/J 3.0.x), or 
re-think your solution. 99.99% of developers don't really need to bring 
an entire large table across the wire and work on it in Java. There are 
performance implications all around, and it is a best practice in all 
client/server/distributed computing applications to limit the data 
returned to a remote client to only what is absolutely needed.


	-Mark
- -- 
MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+Jr1mtvXNTca6JD8RAr7HAJ9CMJWvvPiL1J+sYET0PQUjF5jCjQCgnuw4
2CxZcCidBycmgpq5UOvMdXo=
=514Z
-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



Need help with UNION

2003-01-16 Thread Garry Rothert
Hi
I am attempting a simple union.

select cnumber from spouse where fd_status = A
union
select cnumber from members where fd_status = A

When I run this SQL statement I get the following error.

ERROR 1064 : You have are an error in your SQL syntax near 'union 
select cnumber from members where fd_status = A' at line 2.

CNUMBER is smallint in both tables. I know this seems like a silly 
union to try but I've simplified a more complex statement to 
troubleshoot, I can't get any union to work.
Thanks

This email and any files transmitted with it are privileged, confidential, 
subject to 
copyright and intended solely for the use of the individual or entity to 
whom they 
are addressed. Views expressed are those of the user and not 
necessarily those 
of DPH Engineering Inc.. Any unauthorized use, copying, review or 
disclosure is 
prohibited. Please notify the sender immediately if you have received 
this 
communication in error. Thank you for your assistance and co-
operation. 


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

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




Re: innodb foreign keys problem

2003-01-16 Thread Michael T. Babcock
Heikki Tuuri wrote:


In the future, MySQL might do the following: in

CREATE TABLE abbaguu (
...
FOREIGN KEY (column1) REFERENCES frobboz (column2)
) TYPE=InnoDB;

it could check if there is a suitable index in abbaguu. If not, it would
create the index automatically.
 


For what its worth, and I'm sure you've considered this, at least table 
creation is a semi-rare enough event in the life and activity of the 
average database that adding more overhead to the process wouldn't 
affect much.

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



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

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



re: RE: NOT NULL question

2003-01-16 Thread Egor Egorov
On Wednesday 15 January 2003 22:36, Gabe Geisendorfer wrote:

 Thanks, I check it out.. Any idea if this 'deficiency' is scheduled to
 change?

Yes.
http://www.mysql.com/doc/en/TODO_future.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: wrong result when perform search of empty string

2003-01-16 Thread Victoria Reznichenko
On Thursday 16 January 2003 11:00, Kwok Siang wrote:

 OS: win XP
 mysql : 3.23.54-max

 can someone help me with this unexplainable question.

 i create this in the mysql database,

 CREATE TABLE `foo` (
   `num` int(4) unsigned zerofill NOT NULL default
 ''
 ) TYPE=MyISAM;

 after that, i tried to insert a blank data into it,

 INSERT INTO foo set num='';
 *(there's nothing between the quotes)

 In the database it display 4 zeros which is , but
 when i perform a search of an empty string like this,

 SELECT * FROM foo WHERE num='';

 The result was , by right it will hav an empty
 set.
 How could this happen? Please help

'num' has INT(4) UNSIGNED column type. Empty string is not a correct value for 
INT column type.


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





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

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




re: Re: Foreign key in INNODB

2003-01-16 Thread Egor Egorov
On Thursday 16 January 2003 00:12, vinita Vigine Murugiah wrote:

 Rafal Jank wrote:
 On Wed, 15 Jan 2003 11:02:44 +1100
 
 vinita Vigine Murugiah [EMAIL PROTECTED] wrote:
 HI
 I'm not sure what is wrong with my CREATE TABLE syntax, Please advice
 
 There is no index on ifname in table equipment_interfaces.

 Well.. Then how come  Foreign key equipID in table equipment_interfaces
 worked?? There is no INDEX on equipID in table equipment??

equipID is a PRIMARY KEY ;)  

 mysql CREATE TABLE equipment (
 - equipID   CHAR(20)  NOT NULL,
 - assetNumber   CHAR(20),
 - serialNumber   CHAR(50),
 - description   BLOB,
 - barcode   CHAR(20),
 - room   CHAR(20),
 - area   CHAR(20),
 - owner   CHAR(100),
 - createDate   DATE,
 - PRIMARY KEY (equipID)
 - ) TYPE=INNODB;
 Query OK, 0 rows affected (0.00 sec)

[skip]



-- 
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: [ gamma file ]

2003-01-16 Thread Andy Eastham
It's the next step after beta - ie it's release quality, but hasn't been in
release that long.  Therefore it's probably not been deployed in production
by that many people.

Bear in mind that even alpha versions have undergone and completely passed
the full set of regression tests.

After a period of time in gamma, where bug reports have tailed off, it is
finally called Stable.

As a rough comparison, check the following table

Microsoft Label   MySQL label
version 1.0   alpha
Version 2.1a  beta
Version 3.5c  gamma
Version XP Pro .NET SP19stable

Andy
mysql query
 -Original Message-
 From: Elby Vaz [mailto:[EMAIL PROTECTED]]
 Sent: 16 January 2003 13:46
 To: [EMAIL PROTECTED]
 Subject: [ gamma file ]


 --Im brazilian. Sorry by my english

 hello!

 I installed

  mysql-4.0.9-gamma-win

 on my machine.

 What means gamma ?

 Thanks,
 Elby.





 _
 MSN Hotmail, o maior webmail do Brasil. 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





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

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




Re: wrong result when perform search of empty string

2003-01-16 Thread Roger Baklund
* Kwok Siang
 OS: win XP
 mysql : 3.23.54-max

 can someone help me with this unexplainable question.

 i create this in the mysql database,

 CREATE TABLE `foo` (
   `num` int(4) unsigned zerofill NOT NULL default
 ''
 ) TYPE=MyISAM;

 after that, i tried to insert a blank data into it,

hm... a blank data...? The field is defined as an integer, and as NOT
NULL.

 INSERT INTO foo set num='';
 *(there's nothing between the quotes)

This is the same as INSERT INTO foo set num=0; because a string used in a
numeric context is converted to a number: '0' - 0, '1' - 1, '2' - 2 and
so on. Any string not containing digits is converted to 0:

mysql select ''=0,'a'=0,'1'=0,'0'=0;
+--+---+---+---+
| ''=0 | 'a'=0 | '1'=0 | '0'=0 |
+--+---+---+---+
|1 | 1 | 0 | 1 |
+--+---+---+---+
1 row in set (0.00 sec)

 In the database it display 4 zeros which is , but
 when i perform a search of an empty string like this,

 SELECT * FROM foo WHERE num='';

Same problem here, you are actually searching for num=0. Try this to verify:

SELECT * FROM foo WHERE num='whatever';

 The result was , by right it will hav an empty
 set.
 How could this happen? Please help

You should not use the datatype INTEGER if you wish to store strings[1] in
the column. Take a look in the manual at the many different datatypes
supported by mysql:

URL: http://www.mysql.com/doc/en/Column_types.html 

[1] an empty string is still a string... :)

--
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: Need help with UNION

2003-01-16 Thread Victor Pendleton
What version of MySQL are you using? UNION is implemented in MySQL 4.0.0.
Check out http://www.mysql.com/doc/en/UNION.html
for more information.

Victor Pendleton


-Original Message-
From: Garry Rothert [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 8:11 AM
To: [EMAIL PROTECTED]
Subject: Need help with UNION


Hi
I am attempting a simple union.

select cnumber from spouse where fd_status = A
union
select cnumber from members where fd_status = A

When I run this SQL statement I get the following error.

ERROR 1064 : You have are an error in your SQL syntax near 'union 
select cnumber from members where fd_status = A' at line 2.

CNUMBER is smallint in both tables. I know this seems like a silly 
union to try but I've simplified a more complex statement to 
troubleshoot, I can't get any union to work.
Thanks

This email and any files transmitted with it are privileged, confidential, 
subject to 
copyright and intended solely for the use of the individual or entity to 
whom they 
are addressed. Views expressed are those of the user and not 
necessarily those 
of DPH Engineering Inc.. Any unauthorized use, copying, review or 
disclosure is 
prohibited. Please notify the sender immediately if you have received 
this 
communication in error. Thank you for your assistance and co-
operation. 


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

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

2003-01-16 Thread Ivan Hoo
  there seem to be a lack of documentation on this part.

 Mostly because it can't be done (that I'm aware of).

if it can't be done, why is it in the documentation already. i can
understand that if 4.0.x is still in alpha or beta stage. but now it is
almost near release (gamma).

the official mysql documentation
(http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Ad
ministration.html#Replication_Options) actually defines a few variables
pertaining to ssl replication (master-ssl, master-ssl-key, master-ssl-cert).
doesn't this tell you that ssl replication is already supported?

regards,
ivan


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

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




Re: [ gamma file ]

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

Elby --

...and then Elby Vaz said...
% 
% --I´m brazilian. Sorry by my english

I'm sure your English is better than my Portugese!


% 
% hello!

Hi!


% 
% I installed
% 
% mysql-4.0.9-gamma-win
% 
% on my machine.
% 
% What means gamma ?

You don't know what it means and you installed it?? ;-)

It refers to the Greek alphabet letters 'alpha', 'beta', and 'gamma'.  A
software product with 'alpha' is very immature and not at all ready for
release (in the opinion of whoever matters, like the author).  The next
stage is 'beta', like beta testing; it means that things have come
along and are just about done but there can still be some bugs.  Finally
you get to 'gamma', which means approximately is really stable with no
expected bugs and you can start using it now, though we'll probably do
more development and add some features here and there in the MySQL world
as well as for much other software.

I think that Microsoft starts selling their products at about the 'beta'
stage, and 'gamma' is called buy the next beta ;-)


% 
% Thanks,
% Elby.


HTH  HAND

mysql query,
:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+Js4vGb7uCXufRwARAuvmAKDHA4BYjYyQoWPeaMjGuE7JH7sKPACgu6TZ
hYEDTdsvO1lMIZcHX4jDXXM=
=MOSg
-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: MySQL Secure Replication

2003-01-16 Thread Tonu Samuel
On Tue, 2003-01-14 at 20:47, Jeremy Zawodny wrote:

  has anyone been able to setup ssl secure replication for mysql?
 
 I don't believe you can do that yet.  There's now way to specify the
 necessary credentials in the slave setup.
 
  how do i know whether the replication is actually done over ssl?

There are many variables about SSL shown in SHOW STATUS output. They
also include cipher currently in use and other similar stuff. This is
right way to detect SSL usage because SSL has also ciphers which have no
actual encryption at all. Paranoid people must verify if key length in
use is long enough.

Also I must note that using SSL without having appropriate ACL structure
is nonsense. You must use GRANT blahblah REQUIRE SSL CIPHER blahblah.
Then MySQL server just won't allow nonencrpyted connection. Otherwise
default fallback mechanism will work.

 
 You'd have to sniff the network traffic and see.

This is always must be done :)
 
  there seem to be a lack of documentation on this part.
 
 Mostly because it can't be done (that I'm aware of).

I think so too.

  Tõnu




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

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




Re: [ gamma file ]

2003-01-16 Thread Roger Baklund
* Elby Vaz
 I installed

  mysql-4.0.9-gamma-win

 on my machine.

 What means gamma ?

The mysql server is constantly under development. Most people use 3.23.x,
some still use 3.22.x and even 3.21.x, and some (like you) are running the
new version 4.0.x. There is also a version 4.1.x under development, not yet
released.

alfa, beta and gamma are 'stability indicators':

- A release labeled alfa is relatively 'dangerous' to run, a lot of code
have not been thoroughly tested. Version 4.0.0, 4.0.1 and 4.0.2 was alfa.
Not recommended for production systems.

- beta means all code is tested, and new bugs have not been found
recently. Versions 4.0.3, 4.0.4 and 4.0.5 was beta.

- gamma means the beta has proven over time to be bugfree[1]. From
version 4.0.6 mysql4 is labeled gamma.

When this prefix is totally removed, the product is considered stable.
This happened in 3.22.19 and 3.23.32, and will happen for 4.0.x when the
time is right, as decided by MySQL AB.

URL: http://www.mysql.com/doc/en/Which_version.html 
URL: http://www.mysql.com/doc/en/News.html 

[1] ...seems to work fine is the words used in the mysql docs. There is no
such thing as bugfree software.

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




Test

2003-01-16 Thread Steve Kirkham
Sorry, messages from the sql list seem to have ceased. It's all gone very
quiet.

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




A concat_grouped implementation example

2003-01-16 Thread Renald Buter
Hai there,

I have created a concat_grouped implementation as a mysql function. And
I thought it might interest other users too. No guarantees here, but you
might learn from it.

Find it at www.cwts.nl/buter/misc.html

Regards,

Renald

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

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




Re: g++ and mySQL]

2003-01-16 Thread Benjamin Pflugmann
Hi.

On Thu 2003-01-16 at 13:54:14 +0200, [EMAIL PROTECTED] wrote:
 Hi,
 If i understand well you wish to concatenate different strings.
 Are many options but the most handy solution is if you use sprintf.

Well, in C++ you would rather use stringstream, because it has better
type and bounds checking. Something like (untested):


#include sstream
[...]
std::ostringstream query;
query  insert into table-name values (1, 
   '  my_escape(aaa)  ', 
   '  my_escape(bbb)  ', 
   '  my_escape(ccc)  ')
mysql_query( connection, query.str().c_str() );

(where my_escape is some function calling mysql_real_escape_string())


Or alternatively, use the mysqlcpp, the C++-API (which I am not so
fond of).

HTH,

Benjamin.


[...]
  I am  trying to  connect mySQL thru  g++. I  could connect the  db and
  execute a query. But I want to get a value from key board and pass the
  same inside the query.
 
  ie,
 
  This is the query I am passing.
 
  mysql_query(connection,insert into table-name values
  ('1','aaa','bbb','ccc'));
 
  But I  want to read  the values  for aaa, bbb,  ccc and pass  into the
  query. How can I do it. I am a just a beginner in C/C++

-- 
[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: Lock Tables Query

2003-01-16 Thread gerald_clark
I would investigate ways of writing that long running job so
that it does not require locking a table for long periods of time.
Use relative updates, break the procedure down into
smaller lockable steps with pauses for other programs etc.

Clyde wrote:


Hi,

As per a previous thread I have found that when you use  lock Tables MySql will wait indefinitely for the lock - No timeout or error message.

Therefore let me explain my question.

Scenario:

User 1 locks files for a long running job. (write lock that prevents any access to the files)
User 2 logs on, then try's to lock or use these  files but can't because user 1 already has the lock. (even a simple select * from xxx will wait forever)

The program for user 2 will just appear to hang. How do I give feed back to user 2 to say something like: Unable to lock/use files after waiting 30 seconds, try again later or whatever. IE I would like the program to be able to return control after a specific amount of time if the lock is not satisfied   in order to give feedback to the user, rather than the the program just wait and appearing to hang. 

Better still if there is a system variable or something I can check first to see if the file is locked - but I can't seem to find this in the docs. 

Most other databases I have used have a timeout value (like the record lock for innodb) so I am having trouble dealing with this scenario.

Any Ideas.

Thanks
Clyde England


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

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: Password problem

2003-01-16 Thread John Arnold
When connecting from a command line, mysql uses 3 of the columns in the user
table to decide whether or not to grant access.  These are host, user, and
password.  Note that in your results below, there is no
localhost-newsletter-testPass combination.  What the table shows is that
clients from any host other than localhost can log in to a mysql client
using the newsletter and testPass combination.

If you want to login using a client on the same machine that you're running
mysql, you need to add another entry to the user table, i.e.,

GRANT ALL PRIVILIGES ON newsletter.* TO newsletter@localhost IDENTIFIED BY
'testPass'

It took me a while to figure that one out, but it's saved me a lot of
frustration knowing it now.
I guess I don't understand why localhost isn't included in the % wildcard
for the host column in this table.  Anybody?

John Arnold
Director, IT Web Strategies
2k3 Technologies
915.439.1660



-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 11:00 AM
To: Mysql list
Subject: Password problem


Hello:

As the root user, I created a new database and user account:
CREATE DATABASE newsletter;
GRANT ALL PRIVILEGES ON newsletter.* TO newsletter IDENTIFIED BY 'testPass';
FLUSH PRIVILEGES;

I then tried to access the databse via the command-line client:
/usr/local/mysql/bin/mysql -u newsletter -ptestPass newsletter

And I get this error:
ERROR 1045: Access denied for user: 'newsletter@localhost' (Using password:
YES)

I checked that mysql has it set-up correctly in the user and db tables
by logging in as the root account.

select * from user give me this line:
| %  | newsletter | 61fa73f50740c213 | N   |
N   | N   | N   | N   | N | N
| N | N| N | N  | N   |
N  | N

select * from db gives me this line:
| %  | newsletter | newsletter | Y   | Y
| Y   | Y   | Y   | Y | N  | Y
| Y  | Y  |

Any ideas?

Thanks,
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases


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

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


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

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




Re: Avg_row_length

2003-01-16 Thread Keith C. Ivey
On 16 Jan 2003, at 0:37, Stefan Hinz wrote:

  There's a formula to calculate the row length for dynamic MyISAM
  tables here:
 http://www.mysql.com/doc/en/Dynamic_format.html
 
 Thanks for the hint, but this doesn't explain fixed length row
 calculations where char(10) will give an average row length of 11
 (bytes), or does it?

You're right, it doesn't.  I forgot that you were talking about fixed-
length records.  I'm afraid I don't have anything else to add then, 
since I know nothing about the storage format other than what I've 
seen in the documentation.

[Filter fodder: SQL]

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

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

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




Re: Possable bug, remote mysqld crash and DoS

2003-01-16 Thread JC
Hi,

I downloaded and compiled mysql 4.0.9 gamma this morning, and 
still get the same error. This doesn't seem to be related to reverse
DNS. I've got the crash from both types of client hosts (with and without reverse).

The official 4.0.9 binary version seems to work well.

What did I miss ?


My config is:

- HP LH4 server (dual PIII 700 MHz, 1GB RAM, 12 GB MegaRAID HD)
- RedHat Linux 8.0 (kernel 2.4.18)
- Compiler: gcc 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
- configure options:
  ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-user=mysql 
--with-openssl 


Best regards,




Mark Matthews wrote:

Christopher E. Brown wrote
 Description:
 MySQL 4.0.8, both compiled my me and the official release version
 crashes whenever receiving a network connection from a system without a DNS
 entry.  Connecting from a system that resolves on reverse (eithor from DNS
 or a local hosts file entry) works find.  This system is a Slackware 8.1
 install with all currect updates.  I do not know if this is a mysqld
 internal thing or some interaction with the system resolver in glibc 2.2.5,
 as unfort even a staticly compiled glibc binary uses the system resolver.
  This of course concerns me, there is a large potential for remote
 DoS here.
   How-To-Repeat:
 Install 4.0.8, run the install db script and fire it up.  Attempt to
 connect from a host that will not reverse resolve.  Even a telnet to port
 3306 crashed the daemon.  The dump from mysqld is included at the bottom of
 the message.

This was fixed in the source tree last night, and will be in the 4.0.9 
release, which is being built as this is being written, and released ASAP.

   -Mark




--
Jean-Christophe Praud -  http://shub-niggurath.com
Conseil  Développement Informatique  http://www.praud.com
Ph'nglui mglw'nafh Cthulhu n'gah Bill R'lyeh Wgah'nagl fhtagn!

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

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




Authenticating users

2003-01-16 Thread Cesar Aracena
Hi all,

I have this admin site where the administrators can add new ones of
their kind (admin level) and now I'm trying to make a query so no
usernames are duplicated in MySQL.

The query goes like this:

$query1 = SELECT * FROM r2k_admin WHERE adminuser = $user;
$result1 = mysql_query($query1);
$num_rows = mysql_num_rows($result1);

$errors=0;
if ($num_rows == 0)
{
$query = INSERT INTO r2k_admin (adminid, adminname, adminemail,
adminuser, adminpassword) VALUES (NULL, '$name', '$email', '$user',
password('$pass'));
$result = mysql_query($query) or die(mysql_errno());
}
else if ($num_rows  0)
{
$errors++;
}

But the PHP part of the program tells me that I have an error in my
MySQL syntax in the line where $num_rows is declared, right after the
first query. Anyone knows what's this all about?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina


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

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




RE: Re: Password problem

2003-01-16 Thread John Arnold
Nasser wrote:
it looks as though you have created the newsletter user with plain text
password.  mysql will 
compare the user password against the encrypted password and will fail.

Look at the password entry in the results below starting with 61fa

If the password had been stored as plain text, it would show as 'testPass'.
The only way I've been able to get an unencrypted password into this table
(quite unintentionally, I assure you) is to update the table directly as in
update user set password='testPass' where user = 'newsletter';

Of course, this was back when I was scratching my head over the same problem
below...

John Arnold
Director, IT Web Strategies
2k3 Technologies
915.439.1660




=

Hello:

As the root user, I created a new database and user account:
CREATE DATABASE newsletter;
GRANT ALL PRIVILEGES ON newsletter.* TO newsletter IDENTIFIED BY
'testPass';
FLUSH PRIVILEGES;

I then tried to access the databse via the command-line client:
/usr/local/mysql/bin/mysql -u newsletter -ptestPass newsletter

And I get this error:
ERROR 1045: Access denied for user: 'newsletter@localhost' (Using password:
YES)

I checked that mysql has it set-up correctly in the user and db tables
by logging in as the root account.

select * from user give me this line:
| %  | newsletter | 61fa73f50740c213 | N
|
N   | N   | N   | N   | N | N
| N | N| N | N  | N   |
N  | N

select * from db gives me this line:
| %  | newsletter | newsletter | Y   |
Y
| Y   | Y   | Y   | Y | N  | Y
| Y  | Y  |

Any ideas?

Yes.
See Chapter 4.3.5 of the mysql manual.
Note that we must issue GRANT statements for both monty@localhost and
monty@%.

hth,
Doug


Thanks,
   Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases



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

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








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

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

2003-01-16 Thread Paul DuBois
At 23:17 +0800 1/16/03, Ivan Hoo wrote:

   there seem to be a lack of documentation on this part.


 Mostly because it can't be done (that I'm aware of).


if it can't be done, why is it in the documentation already. i can
understand that if 4.0.x is still in alpha or beta stage. but now it is
almost near release (gamma).

the official mysql documentation
(http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Ad
ministration.html#Replication_Options) actually defines a few variables
pertaining to ssl replication (master-ssl, master-ssl-key, master-ssl-cert).
doesn't this tell you that ssl replication is already supported?


No, it cannot be done.  Those options have been added, yes, but they
do nothing at the moment.  You can specify the options and they'll
be parsed, but nothing is done with their values yet.



regards,
ivan



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

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




Winc-Ce

2003-01-16 Thread Arley Carter
Has anybody tried to build mysql for win-ce ?

-arc

Arley Carter   
Tradewinds Technologies, Inc.  [EMAIL PROTECTED]
Charlotte, NC  USA www.tradewindse.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: Lost connection to MySQL server during query

2003-01-16 Thread Egor Egorov
On Thursday 16 January 2003 00:32, Gustavo A. Baratto wrote:

 This old bug reappeared after the upgrading mysql from version 3.23.54a
 (rpm provided by mysql.com) to version 4.0.8-gamma (binary provided by
 mysql.com as well).

 Using redhat 7.1 glibc 2.2.4-31 (which is supposed to fix this problem)
 This server has glibc 2.2.4-31 installed for quite a while, and mysql
 3.23.54a was working just fine with it.

 Mysql 4.0.8 stopped crashing when I added --skip-name-resolve in the
 mysql startup... but some tables are getting corrupted very often, and I
 can't find a reason. It doesn't the tables are getting corrupted because
 of mysql is crashing, because bin-log index is not increasing, and there
 is nothing in the logs saying it was restarted.

 This is one example of check table:
 
 alpgrafik_com_1.kent_session_info warning Not used space is supposed to
 be: 30612 but is: 30404
 alpgrafik_com_1.kent_session_info error   record delete-link-chain corrupted
 alpgrafik_com_1.kent_session_info error   Corrupt
 ---

 I searched for delete-link-chain on google but I didn't have much luck

 Not all clients (eg, php) have been upgraded to version 4, but the mysql
 docs say there shouldn't be a problem if we are not using the new features.

 Ideias?

Please, upgrade to the version 4.0.9.
There was a bug in 4.0.8 when MySQL crashes if he can't resolve remote 
hostname. 



-- 
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: [ gamma file ]

2003-01-16 Thread Victoria Reznichenko
On Thursday 16 January 2003 15:46, Elby Vaz wrote:

 I installed

  mysql-4.0.9-gamma-win

 on my machine.

 What means gamma ?

'gamma' means stability of release. You can read about different levels here:
http://www.mysql.com/doc/en/Which_version.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: Re: view privileges

2003-01-16 Thread Egor Egorov
On Thursday 16 January 2003 09:15, Addison Ellis wrote:

   how can i view privileges for a table in a db?

There is no command to see privileges on the certain table/db etc. 

If you have privileges on database 'mysql' you can search through tables to 
see privileges.





-- 
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: Need help with UNION

2003-01-16 Thread Andy Eastham
Garry,

You are using mysql version 4?  Unions are only supported in version 4.

If so, the only difference I can see from your example to the manual is that
each select is in brackets in the manual.  Try the query:

(select cnumber from spouse where fd_status = A)
union
(select cnumber from members where fd_status = A);

Andy

 -Original Message-
 From: Garry Rothert [mailto:[EMAIL PROTECTED]]
 Sent: 16 January 2003 14:11
 To: [EMAIL PROTECTED]
 Subject: Need help with UNION


 Hi
 I am attempting a simple union.

 select cnumber from spouse where fd_status = A
 union
 select cnumber from members where fd_status = A

 When I run this SQL statement I get the following error.

 ERROR 1064 : You have are an error in your SQL syntax near 'union
 select cnumber from members where fd_status = A' at line 2.

 CNUMBER is smallint in both tables. I know this seems like a silly
 union to try but I've simplified a more complex statement to
 troubleshoot, I can't get any union to work.
 Thanks

 This email and any files transmitted with it are privileged,
 confidential,
 subject to
 copyright and intended solely for the use of the individual or entity to
 whom they
 are addressed. Views expressed are those of the user and not
 necessarily those
 of DPH Engineering Inc.. Any unauthorized use, copying, review or
 disclosure is
 prohibited. Please notify the sender immediately if you have received
 this
 communication in error. Thank you for your assistance and co-
 operation.


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

 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: Possable bug, remote mysqld crash and DoS

2003-01-16 Thread miguel solórzano
At 17:13 16/01/2003 +0100, JC wrote:
Hi,

Hi,

I downloaded and compiled mysql 4.0.9 gamma this morning, and
still get the same error. This doesn't seem to be related to reverse
DNS. I've got the crash from both types of client hosts (with and without 
reverse).

Was found that for some GLIBC systems there is a problem with the
stack size used by MySQL, the current work around is start the
server with the option: --thread_stack=196KB.


--
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Miguel Angel Solórzano [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   São Paulo - Brazil
   ___/   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: Avg_row_length

2003-01-16 Thread Stefan Hinz
Keith,

thanks once again! Well, anyone here from the MySQL developer team? Or
any other guru who can explain why 10 = 11?

Here's the problem once again:

mysql DESCRIBE myrowisam;
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
| col   | char(10) | YES  | MUL | NULL|   |
+---+--+--+-+-+---+
mysql SHOW TABLE STATUS LIKE 'myrowisam';
+---+++--++
| Name  | Type   | Row_format | Rows | Avg_row_length |
+---+++--++
| myrowisam | MyISAM | Fixed  |  109 | 11 |
+---+++--++

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

- Original Message -
From: Keith C. Ivey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Stefan Hinz [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 5:05 PM
Subject: Re: Avg_row_length


 On 16 Jan 2003, at 0:37, Stefan Hinz wrote:

   There's a formula to calculate the row length for dynamic MyISAM
   tables here:
  http://www.mysql.com/doc/en/Dynamic_format.html
 
  Thanks for the hint, but this doesn't explain fixed length row
  calculations where char(10) will give an average row length of 11
  (bytes), or does it?

 You're right, it doesn't.  I forgot that you were talking about fixed-
 length records.  I'm afraid I don't have anything else to add then,
 since I know nothing about the storage format other than what I've
 seen in the documentation.

 [Filter fodder: SQL]

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


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

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




Re: MySQL freezes running under BSDI 4.2

2003-01-16 Thread Ken Menzel
Hi Dave,
   Couple of things: Did you see these notes?  They apply to BSDi also
http://www.mysql.com/doc/en/FreeBSD.html
 Do you have more that 1.2G of free memory?  What version of Mysql?

Ken
P.S.  my compile script
rm config.cache
CC=gcc  CFLAGS=-O3 -DHAVE_BROKEN_REALPATH  CXX=gcc  \
CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti -DHAVE_BR
OKEN_REALPATH \
./configure $DEBUG --enable-large-files --with-innodb \
--enable-assembler
gmake -s

- Original Message -
From: Dave Granic [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 8:17 AM
Subject: MySQL freezes running under BSDI 4.2


 Going insane, we have a BSDI 4.2 Version running on an under powered
 machine, we are trying to load up a new server with more horsepower
also
 running BSDI 4.2

 We tried several compiled configurations and the binary distribution
and the
 server hangs after a about 1-2 hours of use (binary within
minutes)..

 compiles fine
 /set threads to 2 in my.cnf
 correctly set ld.so.conf


 below is what we find in the .err file

 BSDI is  patched up

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

 key_buffer_size=268431360
 record_buffer=1044480
 sort_buffer=1048568
 max_used_connections=1
 max_connections=500
 threads_connected=2
 It is possible that mysqld could use up to
 key_buffer_size + (record_buffer + sort_buffer)*max_connections =
1284136 K
 bytes of memory
 Hope that's ok, if not, decrease some variables in the equation




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

 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




RES: Compiling error 3.23.54a (src)

2003-01-16 Thread Mauricio Bracale

Hi, Aswering my own question, I had solved the problem above
instaling gcc-c++, gcc-java, gcc-f77, and all other packages of gcc.
Then I´ve installed MySQL without any problems.

[]´s 
Mauricio Bracale

-Mensagem original-
De: Mauricio Bracale [mailto:[EMAIL PROTECTED]] 
Enviada em: quarta-feira, 15 de janeiro de 2003 14:03
Para: [EMAIL PROTECTED]
Assunto: RES: Compiling error 3.23.54a (src)


Hi,
I just want to inform that I´m having the same problem in a Red
Hat 8. I´ve installed this linux only with the basic packages, like gcc,
cpp, glibc, ncurses (to recompile the kernel), binutils, make and
glibc-kernel headers. And in one of the foruns I visited, somebody told
to install gpp that will solve the problem, but I cannot find this rpm
package to install in my machine. 
Anybody knows if this is true??

Tks.

-Mensagem original-
De: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] 
Enviada em: quarta-feira, 15 de janeiro de 2003 03:33
Para: Tyler
Cc: [EMAIL PROTECTED]
Assunto: Re: Compiling error 3.23.54a (src)

On Tue, Jan 14, 2003 at 08:58:07PM -0700, Tyler wrote:
 what appropriate forums?

I'm not a Mandrake user, but every Linux distribution I've tried has
had various e-mail and web-base forums in which you can ask
questions.  Furthermore, they have official support channels and ways
of filing bug reports if you've found a but.

Surely the Madrake documentation mentinons *some* of them.  And odds
are that Google could find a few more of them.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 31 days, processed 1,015,781,700 queries (379/sec.
avg)

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

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


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

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


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

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




Re: Authenticating users

2003-01-16 Thread Stefan Hinz, iConnect \(Berlin\)
Cesar,

your PHP problem is here:

$query1 = SELECT * FROM r2k_admin WHERE adminuser = $user;

It's supposed to be WHERE adminuser = '$user' , because $user is a
string.

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

- Original Message -
From: Cesar Aracena [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 5:13 PM
Subject: Authenticating users


Hi all,

I have this admin site where the administrators can add new ones of
their kind (admin level) and now I'm trying to make a query so no
usernames are duplicated in MySQL.

The query goes like this:

$query1 = SELECT * FROM r2k_admin WHERE adminuser = $user;
$result1 = mysql_query($query1);
$num_rows = mysql_num_rows($result1);

$errors=0;
if ($num_rows == 0)
{
$query = INSERT INTO r2k_admin (adminid, adminname, adminemail,
adminuser, adminpassword) VALUES (NULL, '$name', '$email', '$user',
password('$pass'));
$result = mysql_query($query) or die(mysql_errno());
}
else if ($num_rows  0)
{
$errors++;
}

But the PHP part of the program tells me that I have an error in my
MySQL syntax in the line where $num_rows is declared, right after the
first query. Anyone knows what's this all about?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina


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

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: replication ignore delete statement

2003-01-16 Thread James Moore
You could do something like have a process periodically run the non-delete
queries in the logs against another database and replicate the second
database.  Wouldn't be automatic, but you'd have as much control as you like
over what goes in the other db.

Depending on what you're trying to do, it may be enough that the logs
(including the delete statements) end up on the slave.  If your queries
against the no-deletes version are trivial, you may be able to just pipe the
log output through grep.

 - James Moore

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

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




0106 ..2003/1/17 02:55:20

2003-01-16 Thread tyuiopqwrrt166
[2003/1/17 ¤W¤È 02:55:[EMAIL PROTECTED]]
mysql2O01/1702:55:20
³nÅé¦v°tºô01¤ë16¤é·|­û§ó·s³qª¾
-
¥»«H¥ó¥Ñ¨§¨§Às¤u§@«Ç¥Nµo,½Ð¤Åª½±µ¦^«H,³o¼Ë§Ú­Ì·|¦¬¤£¨ìªº
¦p¤£·Q¦¬¨ì,½Ð¤Wºô§iª¾,§Ú­Ì·|±N§Aªº¦W³æ§R°£ªº
-
³nÅé¦v°tºô01¤ë16¤é·|­û§ó·s³qª¾ ¥»¦¸§ó·s288¤ù
¡¹ ¥»¯¸³Ì·s»ù®æ:
5~10¤ù¨C¤ù³£100¤¸ 
11-20¤ù   ¨C¤ù³£85¤¸ 
21-50¤ù   ¨C¤ù³£80¤¸ 
51~100¤ù  ¨C¤ù³£75¤¸ 
101¤ù¥H¤W ¨C¤ù³£70¤¸
201¤ù¥H¤W ¨C¤ù³£65¤¸ 

¡¹¥»¯¸±Ä¥Î¦v°t³q¥N¦¬³f»ùªA°È, 5¤ù¥H¤W¤~¥X³f !¥BµL½×±z­q´X¤ù§¡¶·¥[¦¬¥[¥I¶l¸ê150¤¸, 

¥»¯¸¥Ã¤[ºô§}: 
http://www.vuxyz993.com  
http://0933.to/vuxyz993

2003/01/16 §ó·sªº­«ÂI±j¤ù¡@
CG979-2 ºÑ³·±¡¤Ñ¥~¶Ç¡G¦B³·¶Ç©_  ¤¤¤åª©  ( ¨â¤ù¸Ë )
CG978-4 ®É¥ú¤§Æ_  ¤¤¤åª©  ( ¥|¤ù¸Ë )
CG977   ¤j´I¯Î 6 ¸ê®Æ¤ù¡G¤j®a¨Ó·m¿ú  ¤¤¤åª©  ( »Ý¤j´I¯Î6¥Dµ{¦¡ )
CG976-2 ¥æ³q­^¶¯  ¤¤¤åª©  ( ¨â¤ù¸Ë )
CG973-2 ¤Ñ¤ý  ¤¤¤å²Å骩  ( ¨â¤ù¸Ë ) 
JP079   ¾÷¾¹¤HÄv§Þ³õ  ¤é¤åª©
JP078   ®£Às´_µd  ¤é¤åª©
JP077   Å]¤Û¾Ô°ê¥~¶Ç¤§´I°ì¤Û¹C°O VM JAPAN Mystic Japanese ¤é¤åª© µ¦²¤
DBT2429 THIZLINUX SUPREME OFFICE SUITE v3.03 §Y®É¿ì¤½«Ç 3.03¤¤¤å¥úºÐ¥¿¦¡ª©
DBT2426 ArcSoft Showbiz(´±©ç´±¨q) v1.2.3 ÁcÅ餤¤å¦h°ê»y¨t¥úºÐ¥¿¦¡ª©
DBT2408 IBM WebSphere Application Server V5.0 
ÁcÅ餤¤å/­^¤å/ªk¤å/¼w¤å/¦è¤å/¸q¤å/¤é¤å¥úºÐ¥¿¦¡ª©
DBT2403 IBM ViaVoice V9.0 §Ö¼Ö¹| ÁcÅ餤¤å»¨µØ¥¿¦¡ª©
DBT2402 Adobe Acrobat V5.0.5 ÁcÅ餤¤å¥úºÐ§¹¾ã¥¿¦¡ª©
CAI2356-2   AUTOCAD2002¦h´CÅé±Ðµ{ ²Å餤¤å¥úºÐ¥¿¦¡ª©¡i¨â¤ù¸Ë¡j
CAI2350 «J¤åµú»P½²±d¥ÃªºÅw¼Ö¤T°ê»x¢±¢¯¦^ ¤¤¤å¦³Án®Ñ¥¿¦¡ª©
CAD0884 Dassault Systems CATIA V5R9 SP6 ­^/¤é/ªk/¸q/¼w/²¤»°ê»y¨t¥úºÐ§¹¾ã¥¿¦¡ª©
CAD0883 Dassault Systems CATIA V5R10 SP1 ­^/¤é/ªk/¸q/¼w/²¤»°ê»y¨t¥úºÐ§¹¾ã¥¿¦¡ª©

mysql2O01/1702:55:20
[2003/1/17 ¤W¤È 02:55:[EMAIL PROTECTED]]


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

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




Re: how do i retrieve distinct rows using IN

2003-01-16 Thread Keith C. Ivey
On 15 Jan 2003, at 20:13, Ken Easson wrote:

 SELECT DISTINCT price FROM sys_bld_foo WHERE catNum IN 
 ('item1', 'partA', 'partB', 'partB');

It's possible that the query you want is

   SELECT DISTINCT catNum, price FROM sys_bld_foo
   WHERE catNum IN ('item1', 'partA', 'partB', 'partB');

or

   SELECT catNum, MAX(price) FROM sys_bld_foo
   WHERE catNum IN ('item1', 'partA', 'partB', 'partB')
   GROUP BY catNum;

Maybe MAX() in the second one should be MIN() or AVG(), or maybe it 
doesn't matter.  I still don't understand why your table repeats the 
price each time a catNum appears (rather than having a separate table 
of parts, or whatever the catNum represents, that includes the price 
and other data for each), nor why you say that normalizing would 
require 20 new tables.  But if you don't want to normalize, good 
luck!

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

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

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




re: replication ignore delete statement

2003-01-16 Thread Victoria Reznichenko
On Thursday 16 January 2003 12:16, CheongMeng wrote:

 is it possible to ignore all sql delete statement while doing
 mysql replication?

Nope.



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




MySQL Problem

2003-01-16 Thread steven_joseph_p
030116 14:28:01  MySql: Table 'mysql.host' doesn't
exist
http://www.innodb.com/ibman.html
the InnoDB startup options listed in section 2 at
But to get good performance you should adjust for your
hardware
innodb_data_file_path = ibdata1:10M:autoextend
section, for example,
or my.ini. If you want to use InnoDB tables, add to
the [mysqld]
to the [mysqld] section of init parameters in your
my.cnf
skip-innodb
If you do not want to use transactional InnoDB tables,
add a line
Cannot initialize InnoDB as 'innodb_data_file_path' is
not set.

030116 14:26:51  MySql: Shutdown Complete

030116 14:26:51  MySql: Normal shutdown



I get the above error when starting mySQL and i have
reinstalled it plenty of times now and i have run out
of ideas. I dont know wehat to do nor do i know what
the error means. If you could please help me out on
this

I am running a windows xp machine with php 4.3.0 and
apache 2.x

Thanks much

Steven Pignataro


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

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

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




Re: Avg_row_length

2003-01-16 Thread gerald_clark
It looks to me like 1 bit for deleted, and 1 bit for each column to 
store NULL.
1 byte for 1-7 fields.
2 bytes for 8-15 fields.

Stefan Hinz wrote:

Keith,

thanks once again! Well, anyone here from the MySQL developer team? Or
any other guru who can explain why 10 = 11?

Here's the problem once again:

mysql DESCRIBE myrowisam;
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
| col   | char(10) | YES  | MUL | NULL|   |
+---+--+--+-+-+---+
mysql SHOW TABLE STATUS LIKE 'myrowisam';
+---+++--++
| Name  | Type   | Row_format | Rows | Avg_row_length |
+---+++--++
| myrowisam | MyISAM | Fixed  |  109 | 11 |
+---+++--++

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

- Original Message -
From: Keith C. Ivey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Stefan Hinz [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 5:05 PM
Subject: Re: Avg_row_length


 

On 16 Jan 2003, at 0:37, Stefan Hinz wrote:

   

There's a formula to calculate the row length for dynamic MyISAM
tables here:
  http://www.mysql.com/doc/en/Dynamic_format.html
   

Thanks for the hint, but this doesn't explain fixed length row
calculations where char(10) will give an average row length of 11
(bytes), or does it?
 

You're right, it doesn't.  I forgot that you were talking about fixed-
length records.  I'm afraid I don't have anything else to add then,
since I know nothing about the storage format other than what I've
seen in the documentation.

[Filter fodder: SQL]

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



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

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


 




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

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




Re: Avg_row_length

2003-01-16 Thread Sergei Golubchik
Hi!

On Jan 16, Stefan Hinz wrote:
 Keith,
 
 thanks once again! Well, anyone here from the MySQL developer team? Or
 any other guru who can explain why 10 = 11?
 
 Here's the problem once again:
 
 mysql DESCRIBE myrowisam;
 +---+--+--+-+-+---+
 | Field | Type | Null | Key | Default | Extra |
 +---+--+--+-+-+---+
 | col   | char(10) | YES  | MUL | NULL|   |
 +---+--+--+-+-+---+
 mysql SHOW TABLE STATUS LIKE 'myrowisam';
 +---+++--++
 | Name  | Type   | Row_format | Rows | Avg_row_length |
 +---+++--++
 | myrowisam | MyISAM | Fixed  |  109 | 11 |
 +---+++--++
 
 Regards,
 --
   Stefan Hinz [EMAIL PROTECTED]
   Gesch?ftsf?hrer / CEO iConnect GmbH http://iConnect.de
   Heesestr. 6, 12169 Berlin (Germany)
   Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

It's because of NULLs.
Extra byte is used to mark, if the column is NULL or not.

(in fact it's a bitmap, that is it would be one byte for up to 8
columns, then it'll be 2 bytes, etc.)

Regards,
Sergei

-- 
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/

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

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




Re: g++ and mySQL]

2003-01-16 Thread Gelu Gogancea
Hi Benjamin,
- Original Message -
From: Benjamin Pflugmann [EMAIL PROTECTED]
To: Gelu Gogancea [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 4:23 PM
Subject: Re: g++ and mySQL]


 Hi.

 On Thu 2003-01-16 at 13:54:14 +0200, [EMAIL PROTECTED] wrote:
  Hi,
  If i understand well you wish to concatenate different strings.
  Are many options but the most handy solution is if you use sprintf.

 Well, in C++ you would rather use stringstream, because it has better
 type and bounds checking. Something like (untested):
An object type which is C-style(c_str()) and which is null terminated array
of characters.
In this case i wonder ...if is a better bounds checking or is a little
wasted of memory ?...considering that we never know from the begining the
size of the string.In fact, i think that is the main purpose of the string
type.This is indeed a facility for the programmer.



 #include sstream
 [...]
 std::ostringstream query;
 query  insert into table-name values (1, 
'  my_escape(aaa)  ', 
'  my_escape(bbb)  ', 
'  my_escape(ccc)  ')
 mysql_query( connection, query.str().c_str() );

 (where my_escape is some function calling mysql_real_escape_string())


 Or alternatively, use the mysqlcpp, the C++-API (which I am not so
 fond of).
...on this point we can handshake.


 HTH,

 Benjamin.

Best regards,
Gelu



 [...]
   I am  trying to  connect mySQL thru  g++. I  could connect the  db and
   execute a query. But I want to get a value from key board and pass the
   same inside the query.
  
   ie,
  
   This is the query I am passing.
  
   mysql_query(connection,insert into table-name values
   ('1','aaa','bbb','ccc'));
  
   But I  want to read  the values  for aaa, bbb,  ccc and pass  into the
   query. How can I do it. I am a just a beginner in C/C++

 --
 [EMAIL PROTECTED]

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

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




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

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




Re: Avg_row_length

2003-01-16 Thread Zak Greant
On Thu, Jan 16, 2003 at 06:47:03PM +0100, Stefan Hinz wrote:
 Keith,
 
 thanks once again! Well, anyone here from the MySQL developer team? Or
 any other guru who can explain why 10 = 11?

  Hi Stefan,

  Here is my guess. ;)

  CHAR columns are fixed width. A CHAR column with a width of 10 will
  always require 10 bytes - regardless of what is put into it.

  If the column also allows NULL values, then the length of all columns 
  becomes 10 bytes + 1 byte for the NULL. 

  Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Developing Dynamic Web Applications with MySQL and PHP
  MySQL Training: Nuernburg, June 02-06, 2003
  Visit http://mysql.com/training for more information

Gosh, Batman. The nobility of the almost-human porpoise.
  --Robin, the Boy Wonder

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

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




âÍ¡ÒÈ·Ò§¸ØÃСԨ 17/1/2003 3:22:59

2003-01-16 Thread esoiewfffrl
Dear mysql ,

ÊÅÐàÇÅÒÊÑ¡¹Ô´à¾×èͤسáÅФ¹·Õè¤ÃÑ¡

www.geocities.com/healthclub999/hc076

$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $


¢ÍÍÀÑ ËÒ¡¢éͤÇÒÁ¹Õé¶Ù¡Êè§ä»Âѧ¤Ø³â´ÂºÑ§àÍÔ­
ËÒ¡¤Ø³µéͧ¡ÒÃãËéÃÒª×èͶ١źÍÍ¡¡ÃسÒÊè§ email ¢Í§¤Ø³ÁÒ·Õè
[EMAIL PROTECTED]  â´Âà¢Õ¹ËÑÇ¢éÍÇèÒUnsubscribe



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

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




Re: Authenticating users

2003-01-16 Thread Zak Greant
On Thu, Jan 16, 2003 at 01:13:54PM -0300, Cesar Aracena wrote:
 Hi all,
 
 I have this admin site where the administrators can add new ones of
 their kind (admin level) and now I'm trying to make a query so no
 usernames are duplicated in MySQL.
 
 The query goes like this:
 
 $query1 = SELECT * FROM r2k_admin WHERE adminuser = $user;

  Hello Cesar,

  A general tip for this kind of situation is:

  Try displaying the query you are running and then try to run the
  displayed SQL in the MySQL command line client.
  
  i.e. echo $query1, \n;

  However, for this specific problem, you need to quote $user in your
  query.
  
Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Developing Dynamic Web Applications with MySQL and PHP
  MySQL Training: Nuernburg, June 02-06, 2003
  Visit http://mysql.com/training for more information

AdBusters: Creative Resistance to Consumerism (http://adbusters.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




Host not allowed to connect to server - Help!

2003-01-16 Thread Mark Lundy
All -

Sorry for what is most likely a starter question!  I am a newbie and 
need some help.
I have a mysql DB on server rhserver.mydomain.com running RH7.2  I 
installed mysqlcc on my Win2K
PC to access that DB.  No matter how I try to access the DB from within 
mysqlcc, I get, Host win2kpc.mydomain.com
not allowed to connect to server.
I am able to connect to the DB as root and a regular user using 
passwords while logged into the RH server.
How do I tell the mysql DB to allow access from win2kpc.mydomain.com? 
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



compile c code with mysql calls?

2003-01-16 Thread Nissim Lugasy
I'm trying to compile c code with calls to mysql library (under win2000) 
and I get these linker errors. any idea why?
I'm using nmake from the command line.

Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

codecin.obj : error LNK2001: unresolved external symbol _mysql_errno@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_init@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_close@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_free_result@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_affected_rows@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_field_count@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_fetch_lengths@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_num_fields@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_store_result@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_real_query@12
codecin.obj : error LNK2001: unresolved external symbol _mysql_error@4
codecin.obj : error LNK2001: unresolved external symbol _mysql_real_connect@32
codecin.dll : fatal error LNK1120: 14 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.


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

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



Mysql and Openbsd 3.2

2003-01-16 Thread stablj
I am trying to install Mysql server 3.23.54a on openbsd 3.2 and I downloaded the
source.tar.gz and did “tar –zxvf filename” and I get and unexpected end of
file error.. I have downloaded this 4 times now and all 2 times from different
sources. Any ideas what is wrong? I have been working on finding a solution to 
this for 5 days now. Finding docs for openbsd is the worse thing I have ever
had to deal with on the Inet. All I want to do is install Snort/Acid/Mysql. Any
help on why this error is occurring would be great.


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

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




Re: mysqldump file fails to recreate database

2003-01-16 Thread Lynn David Newton

   It's the first KEY definition it doesn't like. If
   I comment out KEY field(field), it works, except
   of course then the field called 'field' is not set
   as an index. ...

  Daniel I'm pretty sure 'field' is a reserved word.

  Daniel ... My feeling is that MySQL shouldn't allow
  Daniel reserved words / characters like this,
  Daniel whether they are in quotes or not. You can
  Daniel continue to use KEY field(field) if you must
  Daniel by using the -Q option with mysqldump, to
  Daniel quote fieldnames. But I wouldn't.

That was indeed the problem. Furthermore, I agree with
your assessment. Using -Q is a kluge to mask
brokenness.

However, I started working in early October for a
company that has a large legacy of data and Perl code
in which certain templates are used. We have fields
named 'field' in tables through our databases. It would
be a tedious, though doable task to fix them all. What
is *not* fixable as easily is the 150,000 lines or so
of Perl code that creates and manipulates this stuff,
or the data itself, in cases where we have columns
whose contents consist of lists of field names, some of
which may include field. All that stuff would
instantly break for all our clients if we were to start
monkeying with it.

So although I may be annoyed with the programmer who
originally began using the reserved word field for
column names back when MySQL was not as picky about it,
at least I have a viable workaround for now.

I also added -Q to the call to mysqldump in my database
backup script.

Thank you to those who responded. You've been very
helpful.

-- 
Lynn David Newton
Phoenix, AZ

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

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




Disable autocommit by default

2003-01-16 Thread Philip Molter
I want to disable autocommit for all command-line client connections
by default (through the mysql prompt).  I believe I can do this
in the [client] section of the my.cnf config file, but I have no
clue how.  Three questions:

  1) How?
  2) Will it affect other client processes, such as those spawned
 by perl through DBD::mysql?
  3) Is there a list of all the possible config options for the
 my.cnf file somewhere?

Thanks,
Philip

sql, mysql

* Philip Molter
* Texas.net Internet
* http://www.texas.net/
* [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




Name Collision between 9826 9836

2003-01-16 Thread Zengfa Gao
Hi,

I compiled MySQL 3.23.54a on HPUX system, everything
runs fine.

But when I run mysql CLI, I got:

Welcome to the MySQL monitor.  Commands end with ; or
\g.
Your MySQL connection id is 7 to server version:
3.23.54-log

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

Name collision between 9826 9836
Name collision between gsi dtc300s
Name collision between dm1521 dm1520
Name collision between c108 c108
Name collision between ovt100 vt100
Name collision between 300 dtc300s
Name collision between t1061 t3700


What's this problem?


Thanks!

Zengfa

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

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

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




RE: DBI Question?

2003-01-16 Thread James Moore
While Csongor Fagyal (I belive) is correct about current behavior, the DBI
documentation explicitly says that this will break:

   Currently, a new hash reference is returned for each
   row.  This will change in the future to return the
   same hash ref each time, so don't rely on the current
   behaviour.

Since you probably need to make a copy anyway, I wouldn't bother to worry
about what DBI may or may not do after a connection is closed.  Seems much
safer to just assume that DBI owns the hash, and whatever you want needs to
be copied out.

 - James Moore

(sql,query,queries,smallint)

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

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




Re: Avg_row_length

2003-01-16 Thread Stefan Hinz
Sergei,

 any other guru who can explain why 10 = 11?

 It's because of NULLs.
 Extra byte is used to mark, if the column is NULL or not.

Thanks alot for the explanation. Thanks to Gerald Clark, too, who told
me the same.

 (in fact it's a bitmap, that is it would be one byte for up to 8
 columns, then it'll be 2 bytes, etc.)

If so, this table should have an average row length of 92, not 91,
shouldn't it (9 cols * 10 bytes + 2 bytes)?

MySQLDESCRIBE myrowisam;
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
| col1  | char(10) |  | | |   |
| col2  | char(10) |  | | |   |
| col3  | char(10) |  | | |   |
| col4  | char(10) |  | | |   |
| col5  | char(10) |  | | |   |
| col6  | char(10) |  | | |   |
| col7  | char(10) |  | | |   |
| col8  | char(10) |  | | |   |
| col9  | char(10) |  | | |   |
+---+--+--+-+-+---+
MySQLSELECT * FROM myrowisam;
+--+--+--+--+--+--+--+--+--+
| col1 | col2 | col3 | col4 | col5 | col6 | col7 | col8 | col9 |
+--+--+--+--+--+--+--+--+--+
| foo  | foo  | foo  | foo  | foo  | foo  | foo  | foo  | foo  |
+--+--+--+--+--+--+--+--+--+
MySQLSHOW TABLE STATUS LIKE 'myrowisam';
+---+++--++
| Name  | Type   | Row_format | Rows | Avg_row_length |
+---+++--++
| myrowisam | MyISAM | Fixed  |1 | 91 |
+---+++--++

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

- Original Message -
From: Sergei Golubchik [EMAIL PROTECTED]
To: Stefan Hinz [EMAIL PROTECTED]
Cc: Keith C. Ivey [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 9:16 PM
Subject: Re: Avg_row_length


 Hi!

 On Jan 16, Stefan Hinz wrote:
  Keith,
 
  thanks once again! Well, anyone here from the MySQL developer team?
Or
  any other guru who can explain why 10 = 11?
 
  Here's the problem once again:
 
  mysql DESCRIBE myrowisam;
  +---+--+--+-+-+---+
  | Field | Type | Null | Key | Default | Extra |
  +---+--+--+-+-+---+
  | col   | char(10) | YES  | MUL | NULL|   |
  +---+--+--+-+-+---+
  mysql SHOW TABLE STATUS LIKE 'myrowisam';
  +---+++--++
  | Name  | Type   | Row_format | Rows | Avg_row_length |
  +---+++--++
  | myrowisam | MyISAM | Fixed  |  109 | 11 |
  +---+++--++
 
  Regards,
  --
Stefan Hinz [EMAIL PROTECTED]
Gesch?ftsf?hrer / CEO iConnect GmbH http://iConnect.de
Heesestr. 6, 12169 Berlin (Germany)
Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

 It's because of NULLs.
 Extra byte is used to mark, if the column is NULL or not.

 (in fact it's a bitmap, that is it would be one byte for up to 8
 columns, then it'll be 2 bytes, etc.)

 Regards,
 Sergei

 --
 MySQL Development Team
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
 /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
___/


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

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




dynamic table query

2003-01-16 Thread Tarik Kutluca
Hi all,

1. I need to store dynamic sized tables with different row and column sizes,
but all small tables ( like 2*5, 3*1,5*3)
2. For this purpose i created a table to store each value of the dynamic
sized table, also with the row and the column number, so this is something
like

aij for an i*j table in each row storing a, i, j

3. I am trying to figure out the fastest way to obtain the table to a
recordset having i*j size, do you think i may accomplish this with a self
join, i couldn't create this sql query,

any help would be great, for now, i am using something like this:

for i=0 to n
for j=0 to m
set rsa=cn.execute(SELECT col_id,value from ij where
table_id='+cstr(table_no)+' and row='+cstr( i )+' and col='+cstr(
j )+' )
next
next

If i could obtain this matrix with one query from mysql then that would
increase my performance, don't you think so?

thank you,


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

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




Will PhpMyAdmin run on Linux-Apache-MySQL box ?

2003-01-16 Thread Will Standley

I installed PhpMyAdmin on a Windows box using EasyPhp...

Will PhpMyAdmin run on a Linux/Apache/MySQL server? (I've got one on my desk
up 
running)

If so which version should I download?

(.php files)
- Download phpMyAdmin-2.3.3pl1-php.tar.bz2
- Download phpMyAdmin-2.3.3pl1-php.tar.gz
- Download phpMyAdmin-2.3.3pl1-php.zip
(.php3 files)
- Download phpMyAdmin-2.3.3pl1-php3.tar.bz2
- Download phpMyAdmin-2.3.3pl1-php3.tar.gz
- Download phpMyAdmin-2.3.3pl1-php3.zip

(Yes, I'm a Linux newbie.)

Finally, is it a fairly easy install for a Linux newbie?

thanks for any help.

Will





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

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




A little problem with SELECT

2003-01-16 Thread Blaster
Hello, I have a really tough problem here, I can't think of a way to make 
this work

Imagine 2 tables, the first one is the main table where I keep listings 
of companies and general info about them.
In the second table, I keep 1 row for each employee and an field which 
points to the company (using an ID)

main company table
id (int) | company name (varchar) | phone (varchar) | .. more fields that 
doesn't really matter

employee table (company.id = employee.cid)
id (int) | cid (int) | name (varchar) | age (int) | email (varchar)

Now, I want to make a search which can search for 2 names and show me if 
there are any company that
has these names? I tried

SELECT a.* FROM company a, employee b WHERE a.id=b.cid AND b.name='joe' OR 
b.name='bill';

however, this would return any companies that has ONLY one Bill or one Joe 
.. I only want companies that
have BOTH. It also returns one row with the company per name it found, so 
you can imagine I got confused
when it found 2000 rows when my list of companies is 50 rows =) Basically, 
what I'd like to do is find the
company who has both bill and joe

I tried:
SELECT a.* FROM company a, employee b WHERE a.id=b.cid AND b.name='joe' AND 
b.name='bill';

But I realized this is all wrong cause the same cell cannot be both Joe and 
Bill =)

mysql query smallint


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

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



joins in update/delete

2003-01-16 Thread Matthew Phillips
I am running 3.23 and am new to mysql

I would like to do something like this:

delete t1
from t1, t2
where t1.col = t2.col
and ...

basically deleting every row in t1 that has a matching row in t2.

4.x has mechanisms to join 2 or more tables in update and delete
statements, 3.x does not. Without upgrading, what are my options? Would
these confusing left/right join clauses work with update/delete. If so,
could I please get a litlle syntax example. Thanks for the help folks.

Matthew Alan Phillips

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

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




Re: Host not allowed to connect to server - Help!

2003-01-16 Thread Adolfo Bello
 Sorry for what is most likely a starter question!  I am a newbie and 
 need some help.
 I have a mysql DB on server rhserver.mydomain.com running RH7.2  I 
 installed mysqlcc on my Win2K
 PC to access that DB.  No matter how I try to access the DB from within 
 mysqlcc, I get, Host win2kpc.mydomain.com
 not allowed to connect to server.
 I am able to connect to the DB as root and a regular user using 
 passwords while logged into the RH server.
 How do I tell the mysql DB to allow access from win2kpc.mydomain.com? 
  Thanks.
 
 Mark

Have you granted permissions to [EMAIL PROTECTED]?

sql, query
__ 
   / \\  @  ____@   Adolfo Bello [EMAIL PROTECTED]
  /  // // /\  / \\  // \  //   Bello Ingenieria S.A, Presidente
 /  \\ // / \\/  // //  / //cel: +58 416 609-6213
/___ / _/\__\\//__/ // fax: +58 212 952-6797
  www.bisapi.com  //pager: www.tun-tun.com (# 609-6213)


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

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




RE: Will PhpMyAdmin run on Linux-Apache-MySQL box ?

2003-01-16 Thread Jennifer Goodie
Does the box have PHP installed and configured to use MySQL?

I wouldn't go with the php3 extension, as it is outdated, PHP4 has been
stable for a while.


-Original Message-
From: Will Standley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 3:14 PM
To: [EMAIL PROTECTED]
Subject: Will PhpMyAdmin run on Linux-Apache-MySQL box ?



I installed PhpMyAdmin on a Windows box using EasyPhp...

Will PhpMyAdmin run on a Linux/Apache/MySQL server? (I've got one on my desk
up 
running)

If so which version should I download?

(.php files)
- Download phpMyAdmin-2.3.3pl1-php.tar.bz2
- Download phpMyAdmin-2.3.3pl1-php.tar.gz
- Download phpMyAdmin-2.3.3pl1-php.zip
(.php3 files)
- Download phpMyAdmin-2.3.3pl1-php3.tar.bz2
- Download phpMyAdmin-2.3.3pl1-php3.tar.gz
- Download phpMyAdmin-2.3.3pl1-php3.zip

(Yes, I'm a Linux newbie.)

Finally, is it a fairly easy install for a Linux newbie?

thanks for any help.

Will





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

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


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

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




Re: Will PhpMyAdmin run on Linux-Apache-MySQL box ?

2003-01-16 Thread Adolfo Bello

 Will PhpMyAdmin run on a Linux/Apache/MySQL server?

Sure, without any problem.

 If so which version should I download?
 
 (.php files)
 - Download phpMyAdmin-2.3.3pl1-php.tar.bz2
 - Download phpMyAdmin-2.3.3pl1-php.tar.gz
I downloaded this one ^^^

 - Download phpMyAdmin-2.3.3pl1-php.zip
 (.php3 files)
 - Download phpMyAdmin-2.3.3pl1-php3.tar.bz2
 - Download phpMyAdmin-2.3.3pl1-php3.tar.gz
 - Download phpMyAdmin-2.3.3pl1-php3.zip
 
 (Yes, I'm a Linux newbie.)
 
 Finally, is it a fairly easy install for a Linux newbie?
I use with Apache and it is faily easy. Just remember the virtual host
stuff and modify you /etc/hosts if you are going to use it locally.
 
 thanks for any help.
 
 Will
HTH

sql, query
__ 
   / \\  @  ____@   Adolfo Bello [EMAIL PROTECTED]
  /  // // /\  / \\  // \  //   Bello Ingenieria S.A, Presidente
 /  \\ // / \\/  // //  / //cel: +58 416 609-6213
/___ / _/\__\\//__/ // fax: +58 212 952-6797
  www.bisapi.com  //pager: www.tun-tun.com (# 609-6213)


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

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




Re: Will PhpMyAdmin run on Linux-Apache-MySQL box ?

2003-01-16 Thread Brian Lindner
Will,

Thursday, January 16, 2003, 6:14:11 PM, you wrote:

 I installed PhpMyAdmin on a Windows box using EasyPhp...

 Will PhpMyAdmin run on a Linux/Apache/MySQL server? (I've got one on my desk
 up 
 running)

Yes..

 If so which version should I download?

phpMyAdmin-2.3.3pl1 is the latest stable release.
Probably Download phpMyAdmin-2.3.3pl1-php.zip

 (.php files)
 - Download phpMyAdmin-2.3.3pl1-php.tar.bz2
 - Download phpMyAdmin-2.3.3pl1-php.tar.gz
 - Download phpMyAdmin-2.3.3pl1-php.zip
 (.php3 files)
 - Download phpMyAdmin-2.3.3pl1-php3.tar.bz2
 - Download phpMyAdmin-2.3.3pl1-php3.tar.gz
 - Download phpMyAdmin-2.3.3pl1-php3.zip

 (Yes, I'm a Linux newbie.)

 Finally, is it a fairly easy install for a Linux newbie?

to install...  uncompress.. copy to your webroot directory
edit the config file (check the readme for some howto stuff)

set the phpMyAdmin root variable
the username/password info

You will want to be careful about the authetication mode you choose if
your webserver is visible on internet. if its just a home/non-accessible server,
you can just fill in the username / password info in the config file.

Its not too difficult

Brian


 thanks for any help.

 Will





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

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





--
 Brianmailto:[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




root host privlidge

2003-01-16 Thread CyberCub
I have managed using the phpmyadmin for editing the root user to allow
another host to connect (home ip), what ever it did it messed it up, root no
longer aloud to connect to the mysql database at all. Any way to fix this?
Before I go and delete the user.MDY file and re-run the mysql_install_db to
restore it and re-add the usernames/passes and priv's. Any suggestions are
welcomed. Thanks Bill



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

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




Re: A little problem with SELECT

2003-01-16 Thread Adolfo Bello

 SELECT a.* FROM company a, employee b WHERE a.id=b.cid AND b.name='joe' OR 
 b.name='bill';
 however, this would return any companies that has ONLY one Bill or one Joe 
 .. I only want companies that
 have BOTH. It also returns one row with the company per name it found, so 
 you can imagine I got confused
 when it found 2000 rows when my list of companies is 50 rows =) Basically, 
SELECT DISTINCT . will give you just one row per company found.
 
 what I'd like to do is find the
 company who has both bill and joe
 
 I tried:
 SELECT a.* FROM company a, employee b WHERE a.id=b.cid AND b.name='joe' AND 
 b.name='bill';
Try:
SELECT DISTINCT a.* FROM company a, employee b, employee c WHERE
a.id=b.cid AND a.id=c.cid WHERE b.name='joe' AND c.name='bill'
 
 But I realized this is all wrong cause the same cell cannot be both Joe and 
 Bill =)
 
 mysql query smallint
HTH

__ 
   / \\  @  ____@   Adolfo Bello [EMAIL PROTECTED]
  /  // // /\  / \\  // \  //   Bello Ingenieria S.A, Presidente
 /  \\ // / \\/  // //  / //cel: +58 416 609-6213
/___ / _/\__\\//__/ // fax: +58 212 952-6797
  www.bisapi.com  //pager: www.tun-tun.com (# 609-6213)


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

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




Re: g++ and mySQL

2003-01-16 Thread Dileep M. Kumar
On Thu, Jan 16, 2003 at 01:54:14PM +0200, Gelu Gogancea wrote:

If i understand well you wish to concatenate different strings.
Are many options but the most handy solution is if you use sprintf.

Thanks I got the answer.

sprintf(QueryStr,INSERT INTO %s VALUES ('%s', '%s', '%s', '%s'),
table-name, value1, value2, value3, value4);

Regards
-- 
 .''`. Dileep M. Kumar [EMAIL PROTECTED]
: :'  :http://www.kumarayil.net
`. `'`
  `-  Debian GNU/Linux - Choice of the Freedom Lovers

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

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




Re: Foreign key in INNODB

2003-01-16 Thread vinita Vigine Murugiah


vinita Vigine Murugiah wrote:




Egor Egorov wrote:


On Thursday 16 January 2003 00:12, vinita Vigine Murugiah wrote:


Rafal Jank wrote:


On Wed, 15 Jan 2003 11:02:44 +1100

vinita Vigine Murugiah [EMAIL PROTECTED] wrote:


HI
  I'm not sure what is wrong with my CREATE TABLE syntax, Please advice


There is no index on ifname in table equipment_interfaces.


Well.. Then how come  Foreign key equipID in table equipment_interfaces
worked?? There is no INDEX on equipID in table equipment??



equipID is a PRIMARY KEY ;)  

Well!!! ifname also a Primary key!!

ysql CREATE TABLE equipment_interfaces (

- equipID   CHAR(20) NOT NULL,
- ifName   CHAR(20) NOT NULL,
- ifType   ENUM(10Mbs,100Mbs,1Gb,CDDI,FDDI),
- ifNet   CHAR(50),
- ifIPv4addr   CHAR(20),
- INDEX (equipID),
- FOREIGN KEY (equipID) REFERENCES equipment (equipID) ON
DELETE CASCADE,
- PRIMARY KEY (equipID, ifName)
- ) TYPE=INNODB;
Query OK, 0

rows affected (0.01 sec)






mysql CREATE TABLE equipment (
  - equipID   CHAR(20)  NOT NULL,
  - assetNumber   CHAR(20),
  - serialNumber   CHAR(50),
  - description   BLOB,
  - barcode   CHAR(20),
  - room   CHAR(20),
  - area   CHAR(20),
  - owner   CHAR(100),
  - createDate   DATE,
  - PRIMARY KEY (equipID)
  - ) TYPE=INNODB;
Query OK, 0 rows affected (0.00 sec)



[skip]





--


warm regards
Vinita Vigine Murugiah
Email : [EMAIL PROTECTED]			Ph : (03) 8344 1273




--


warm regards
Vinita Vigine Murugiah
Email : [EMAIL PROTECTED]			Ph : (03) 8344 1273




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

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




Re: joins in update/delete

2003-01-16 Thread Paul DuBois
At 17:00 -0700 1/16/03, Matthew Phillips wrote:

I am running 3.23 and am new to mysql

I would like to do something like this:

delete t1
from t1, t2
where t1.col = t2.col
and ...

basically deleting every row in t1 that has a matching row in t2.

4.x has mechanisms to join 2 or more tables in update and delete
statements, 3.x does not. Without upgrading, what are my options?


None, using just SQL.  You'll have to use a program that selects the
relevant t1.col values, then use them to construct DELETE queries.


 Would
these confusing left/right join clauses work with update/delete. If so,
could I please get a litlle syntax example. Thanks for the help folks.

Matthew Alan Phillips



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

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




mysql@lists.mysql.com

2003-01-16 Thread df
mysql:ÄúºÃ!
---
±¾ÐÅΪÉÆÒâÉÌÒµÐÅÏ¢£¬·¢Ë͵ÄÄ¿µÄÊÇΪÁ˹¤×÷µÄÐèÒª£¬Èô¸øÄã´øÀ´·´¸Ð£¬Éî±íǸÒâ,ÀÍÄãɾ³ý.

Ò»ÒÚÎåǧÍòÈ«Çò·ÖÀàÓʼþµØÖ·¹âÅÌ380Ôª£¬ÖÕÉúÃâ·ÑÉý¼¶
²©ÉîµØÖ·×ÊÔ´
ÄãÏëÐû´«ÄúµÄ¹«Ë¾ºÍ²úÆ·Âð£¿Í¨¹ýµç×ÓÓʼþ²»Î½ÊǸöºÜºÃµÄ;¾¶¡£×î´óÈÝÁ¿µÄEMAILµØÖ·¿â,·ÖÀà×îϸµÄEMAILµØÖ·¿â,·þÎñ
×îºÃµÄEMAILµØÖ·¿â¡£ 
http://210.100.152.3/samples/boshen/  
±¾¹«Ë¾ÍƳöзþÎñ£º
 
ÌṩÌض¨Óʼþ·þÎñÆ÷È«²¿ÓʼþÁбíËÑË÷·þÎñ¡£ÊÕ·Ñ380Ôª¡££¨ÀýÈ磺[EMAIL PROTECTED]¡¢[EMAIL PROTECTED]¡¢[EMAIL PROTECTED]µÈµÈ£©Ö»ÒªÄúÐèÒªµÄÎÒÃǾÍÄÜÕҵõ½¡£
[EMAIL PROTECTED]


ÖÂ
Àñ!
   df
   po@com
   2003-01-17

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

To 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 Secure Replication

2003-01-16 Thread Ivan Hoo
is there any way you can implement a secure replication via ssh or sth else?

regards,
ivan

 At 23:17 +0800 1/16/03, Ivan Hoo wrote:
 there seem to be a lack of documentation on this part.
 
   Mostly because it can't be done (that I'm aware of).
 
 if it can't be done, why is it in the documentation already. i can
 understand that if 4.0.x is still in alpha or beta stage. but now it is
 almost near release (gamma).
 
 the official mysql documentation

(http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_A
d
 ministration.html#Replication_Options) actually defines a few variables
 pertaining to ssl replication (master-ssl, master-ssl-key,
master-ssl-cert).
 doesn't this tell you that ssl replication is already supported?

 No, it cannot be done.  Those options have been added, yes, but they
 do nothing at the moment.  You can specify the options and they'll
 be parsed, but nothing is done with their values yet.

 


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

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




index problem

2003-01-16 Thread Prasanth Krishna
i am new to mysql.
i have got a table tab1 in my database.
i am using 4.0.3 version of mysql and the table type is MyISAM.
the tab1 has got 14 fields and about 600,000 records and is indexed on
col1 which is of varchar type

i have used the query

select * from tab1 order by col1;
which does not use the index.

when i used
explain select * from tab1 where col1  'const'; -- (const is a valid
constant for col1)

it gave col1indx in 'key' column but in the 'extra' column i did not
get 'using index' instead i got 'using where' only. does it mean that it
is not using index?
the output of this query is less than 1% of the entire table.

how can i make the queries above to use the index? i have used the use
index and force index but found out that they are not useful.

thanks in advance.
Prasanth


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

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