Problem with permissions on Windows in 4.0.11a Gamma?

2003-03-18 Thread Michael Shulman
Hello, all:

It seems that the 4.0.11a Gamma release on Windows allows all users to
connect, even though they don't have connect permissions in the user table.
Could this be right?

I'm running on WinXP. I apologize - I'm new to MySQL, so please let me know
if I am reading the documentation incorrectly.
http://www.mysql.com/doc/en/Privileges.html

Comment lines are preceded by // in this example

// connect to MySQL without providing a username or password
C:\mysql\binmysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 25 to server version: 4.0.11-gamma-nt

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

// note that MySQL does not know who we are
mysql select current_user();
++
| current_user() |
++
| @127.0.0.1 |
++
1 row in set (0.00 sec)

mysql use mysql;
Database changed

// verify that the user table is completely locked down
mysql select user, host from user;
+--+---+
| user | host  |
+--+---+
| root | localhost |
+--+---+
1 row in set (0.00 sec)

// we're not an authenticated user, but we can create tables
mysql create table a (a char(10));
Query OK, 0 rows affected (0.03 sec)

// we can insert into these tables
mysql insert into a values (abc);
Query OK, 1 row affected (0.00 sec)

mysql select * from a;
+--+
| a|
+--+
| abc  |
+--+
1 row in set (0.00 sec)

// we can even create new users
mysql insert into user (user, host) values (fred, foo);
Query OK, 1 row affected (0.00 sec)

mysql select user, host from user;
+--+---+
| user | host  |
+--+---+
| fred | foo   |
| root | localhost |
+--+---+
2 rows in set (0.00 sec)


Am I doing something wrong, or is this a nasty bug?
-ms
Michael Shulman


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

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



Re: Help with Query

2003-03-18 Thread Jeff Shapiro
OK, attempt number two:

Let's see what you are after is the number of emails that a member 
has received (say 25), and then you also want the number of members 
that have received x-number (say 25) emails. Is this even close to 
what you want?

I think the only way to answer the question(s) is to use more than 
one query (specially since MySQL doesn't support sub-selects).

Here's what I came up with: (it's probably not pretty and more than 
likely not completely correct, but I haven't been playing with MySQL 
than long).

CREATE TEMPORARY TABLE member_counts
SELECT member_id, COUNT(mailing_id) AS mail_count FROM member_mailings
GROUP BY member_id;
This puts the number of mailings into a temp table.

Now we do:

SELECT mail_count, COUNT(member_id) FROM member_counts
GROUP BY mail_count;
I *think* that these to step should give you what you are after.

jeff

At 22:47 -0800 3/17/03, Daren Cotter wrote:
This seems to be doing the same thing as the
previously mentioned query...simply listing all
mailing IDs, along with the # of members it was sent
to. I've included both queries with their results
below.
mysql SELECT COUNT(member_id), COUNT(mailing_id) FROM
member_mailings GROUP BY mailing_id;
+--+---+
| COUNT(member_id) | COUNT(mailing_id) |
+--+---+
|1 | 1 |
|25000 | 25000 |
|1 | 1 |
|25000 | 25000 |
|53855 | 53855 |
|53897 | 53897 |
|53247 | 53247 |
|15000 | 15000 |
|1 | 1 |
|1 | 1 |
|   140901 |140901 |
|1 | 1 |
+--+---+
12 rows in set (0.57 sec)
mysql select mailing_id, count(*) from
member_mailings group by mailing_id;
++--+
| mailing_id | count(*) |
++--+
|  1 |1 |
|  2 |25000 |
|  3 |1 |
|  4 |25000 |
|  6 |53855 |
|  7 |53897 |
|  8 |53247 |
| 11 |15000 |
| 12 |1 |
| 13 |1 |
| 15 |   140901 |
| 16 |1 |
++--+
12 rows in set (0.56 sec)
--- Zak Greant [EMAIL PROTECTED] wrote:
 On Mon, Mar 17, 2003 at 09:52:44PM -0800, Daren
 Cotter wrote:
  Jeff,
 
  That query simply gives me each mailing ID, along
 with
  the # of members associated with that mailing ID.
 
  What I NEED is to return the # of mailings sent to
 a
  member, and the number of members associated with
 that
  number.
 
  I.e., if I do:
 
  SELECT count(*) FROM member_mailings WHERE
 member_id =
  1
 
  That returns the number of mailings for member 1,
 say
  it's 25. That would be one tally in the 25 field
 for
  # of mailings sent.
 
  It's tough to explain, so I'm thinking I won't be
 able
  to accomplish it in one query?
   Hello Daren,

   Assuming that your table looks something like
 this:
   +-+---+-+-+
   | ... | member_id | mail_id | ... |
   +-+---+-+-+
   | ... | 1 |   1 | ... |
   | ... | 2 |   1 | ... |
   | ... | 3 |   1 | ... |
   | ... | 1 |   2 | ... |
   | ... | 2 |   2 | ... |
   | ... | 3 |   3 | ... |
   +-+---+-+-+
   Then this query should return the information that
 you desire:
   SELECT COUNT(member_id), COUNT(mail_id)
FROM member_mailings
GROUP BY mail_id;
   Cheers!
   --
   Zak Greant
   MySQL AB Community Advocate

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.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
--

Jeff Shapiro, Colorado Springs, CO, USA

At work I *have* to use a Windows machine, at home I *get* to use a Mac.

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

Re: Help with Query

2003-03-18 Thread Zak Greant
On Mon, Mar 17, 2003 at 10:47:09PM -0800, Daren Cotter wrote:
 This seems to be doing the same thing as the
 previously mentioned query...simply listing all
 mailing IDs, along with the # of members it was sent
 to. I've included both queries with their results
 below.

  Hi Daren,
  
  Heh. The hazards of writing email a bit late in the evening. :)

  Sorry I can't offer more help. 

  Cheers!
  --zak

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

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



Re: store an array of double to mysql, How?

2003-03-18 Thread Joseph Bueno
Check BLOB data type:
http://www.mysql.com/doc/en/BLOB.html
Regards,
Joseph Bueno
Lai wrote:
Hi.

I am writing a program to do pattern recognition. I decide to use mysql to store the features calculated. The features are stored as an array of double in my c program.

But now I do think about it, I don't know how. I've searched the internet, none really fit my problem.

Is there a way to do this?

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


SELECT DISTINCT returns multiple identical result rows

2003-03-18 Thread mysql
Description:
 SELECT DISTINCT in combination with ORDER BY a non-selected field
 will return multiple identical result rows
 if the WHERE clause eliminates 'other' rows
How-To-Repeat:
 drop table if exists test1;
 create table test1 (
  id1   int PRIMARY KEY,
  name1   varchar(80)
);
  
drop table if exists test2;
create table test2 (
   id2   int PRIMARY KEY,
   id1 int,
   name2varchar(80)
);
   
insert into test1 values (1, 'A');
insert into test1 values (2, 'B');
   
insert into test2 values (1, 1, 'a');
insert into test2 values (2, 2, 'b');
insert into test2 values (3, 1, 'a');
   
select distinct A.id1 as dupl, B.id1 as Bid1
from test1 A, test2 B
where A.id1=B.id1
and B.name2='a'
order by B.id2;

Fix:
add: GROUP BY dupl
or: ask bugfix :-)

Submitter-Id:  submitter ID
Originator:Guido A.J. Stevens
Organization:
NFG Net Facilities Group BV (Coal Connectivity)
MySQL support: licence (certificate serial #51)
Synopsis:  duplicate rows in SELECT DISTINCT
Severity:  non-critical
Priority:  medium
Category:  mysql
Class: sw-bug
Release:   mysql-3.23.49 (Source distribution)

Environment:

System: Linux bohme 2.4.20 #8 Thu Jan 9 09:27:15 CET 2003 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   14 May 16  2002 /lib/libc.so.5 - 
libc.so.5.4.46
-rw-r--r--1 root root   563068 Feb  4  2002 /lib/libc.so.5.4.46
lrwxrwxrwx1 root root   13 Feb 26 13:34 /lib/libc.so.6 - libc-2.2.5.so
-rwxr-xr-x1 root root  1145456 Sep 18 04:50 /lib/libc-2.2.5.so
-rw-r--r--1 root root  2376426 Sep 18 04:51 /usr/lib/libc.a
-rw-r--r--1 root root  178 Sep 18 04:51 /usr/lib/libc.so
Configure command: ./configure  --prefix=/usr --exec-prefix=/usr 
--libexecdir=/usr/sbin --datadir=/usr/share --sysconfdir=/etc/mysql 
--localstatedir=/var/lib/mysql --includedir=/usr/include --infodir=/usr/share/info 
--mandir=/usr/share/man --enable-shared --with-libwrap --enable-assembler 
--with-berkeley-db --with-innodb --enable-static --enable-shared --enable-local-infile 
--with-raid --enable-thread-safe-client --without-readline 
--with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-mysqld-user=mysql 
--without-bench --with-client-ldflags=-lstdc++ --with-extra-charsets=all


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

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/InnoDB-4.0.12 is released

2003-03-18 Thread Heikki Tuuri
Hi!

InnoDB is a MySQL table type which provides transactions, foreign key
constraints, and a non-free Hot Backup tool.

InnoDB is included in all versions of MySQL-4.0, which you can download from
http://www.mysql.com/downloads/mysql-4.0.html.

MySQL-4.0.12 is a bugfix release of the MySQL-4.0 branch, which will soon be
declared stable.

Full changelog:

* In crash recovery InnoDB now prints progress information about the
rollback of large transactions.

* Fixed a bug/feature: if your application program used mysql_use_result(),
and used = 2 connections to send SQL queries, it could deadlock on the
adaptive hash S-latch in btr0sea.c. Now mysqld releases the S-latch whenever
it passes data from a SELECT to the client.

* Fixed a bug: MySQL could erroneously return 'Empty set' if InnoDB
estimated an index range size to 0 records though the range was not empty;
MySQL also failed to do the next-key locking in the case of an empty index
range.

* An outstanding bug: SQL command SET FOREIGN_KEY_CHECKS=0 is not replicated
properly in the MySQL replication.

Best regards,

Heikki
Innobase Oy
http://www.innodb.com - read the up-to-date InnoDB manual at
http://www.innodb.com/ibman.html


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

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



Re: Problem with permissions on Windows in 4.0.11a Gamma?

2003-03-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Shulman wrote:
Hello, all:

It seems that the 4.0.11a Gamma release on Windows allows all users to
connect, even though they don't have connect permissions in the user table.
Could this be right?
I'm running on WinXP. I apologize - I'm new to MySQL, so please let me know
if I am reading the documentation incorrectly.
http://www.mysql.com/doc/en/Privileges.html
Comment lines are preceded by // in this example

// connect to MySQL without providing a username or password
C:\mysql\binmysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 25 to server version: 4.0.11-gamma-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

// note that MySQL does not know who we are
mysql select current_user();
++
| current_user() |
++
| @127.0.0.1 |
++
1 row in set (0.00 sec)
mysql use mysql;
Database changed
// verify that the user table is completely locked down
mysql select user, host from user;
+--+---+
| user | host  |
+--+---+
| root | localhost |
+--+---+
1 row in set (0.00 sec)
// we're not an authenticated user, but we can create tables
mysql create table a (a char(10));
Query OK, 0 rows affected (0.03 sec)
// we can insert into these tables
mysql insert into a values (abc);
Query OK, 1 row affected (0.00 sec)
mysql select * from a;
+--+
| a|
+--+
| abc  |
+--+
1 row in set (0.00 sec)
// we can even create new users
mysql insert into user (user, host) values (fred, foo);
Query OK, 1 row affected (0.00 sec)
mysql select user, host from user;
+--+---+
| user | host  |
+--+---+
| fred | foo   |
| root | localhost |
+--+---+
2 rows in set (0.00 sec)
Am I doing something wrong, or is this a nasty bug?
-ms
Michael Shulman
It's by design, and it is only for local users. See 
http://www.mysql.com/doc/en/Windows_running.html

	-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+dySrtvXNTca6JD8RAsvlAJ9EcfpMuPg5gsP3hKziagOnpS0urwCgl9ZK
pLeETxvpAaxsH6wt/lCwaQM=
=YoM3
-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: Problem with permissions on Windows in 4.0.11a Gamma?

2003-03-18 Thread Michael Shulman
Mark,

Thanks for your note. I did read this page in the manual, especially this
paragraph. 


The default privileges on Windows give all local users full privileges to
all databases without specifying a password. To make MySQL more secure, you
should set a password for all users and remove the row in the mysql.user
table that has Host='localhost' and User=''. 

You should also add a password for the root user. The following example
starts by removing the anonymous user that has all privileges, then sets a
root user password: 

C:\ C:\mysql\bin\mysql mysql
mysql DELETE FROM user WHERE Host='localhost' AND User='';
mysql QUIT
C:\ C:\mysql\bin\mysqladmin reload
C:\ C:\mysql\bin\mysqladmin -u root password your_password


In my example, you will see that I did DELETE FROM user to remove all rows
where username is blank. However, I did not reload the service. When I did,
it now looks like the correct behavior is happening.

-ms


-Original Message-
From: Mark Matthews [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 5:53 AM
To: Michael Shulman
Cc: [EMAIL PROTECTED]
Subject: Re: Problem with permissions on Windows in 4.0.11a Gamma?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Michael Shulman wrote:
 Hello, all:
 
 It seems that the 4.0.11a Gamma release on Windows allows all users to
 connect, even though they don't have connect permissions in the user
table.
 Could this be right?
 
 I'm running on WinXP. I apologize - I'm new to MySQL, so please let me
know
 if I am reading the documentation incorrectly.
 http://www.mysql.com/doc/en/Privileges.html
 
 Comment lines are preceded by // in this example
 
 // connect to MySQL without providing a username or password
 C:\mysql\binmysql
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 25 to server version: 4.0.11-gamma-nt
 
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
 // note that MySQL does not know who we are
 mysql select current_user();
 ++
 | current_user() |
 ++
 | @127.0.0.1 |
 ++
 1 row in set (0.00 sec)
 
 mysql use mysql;
 Database changed
 
 // verify that the user table is completely locked down
 mysql select user, host from user;
 +--+---+
 | user | host  |
 +--+---+
 | root | localhost |
 +--+---+
 1 row in set (0.00 sec)
 
 // we're not an authenticated user, but we can create tables
 mysql create table a (a char(10));
 Query OK, 0 rows affected (0.03 sec)
 
 // we can insert into these tables
 mysql insert into a values (abc);
 Query OK, 1 row affected (0.00 sec)
 
 mysql select * from a;
 +--+
 | a|
 +--+
 | abc  |
 +--+
 1 row in set (0.00 sec)
 
 // we can even create new users
 mysql insert into user (user, host) values (fred, foo);
 Query OK, 1 row affected (0.00 sec)
 
 mysql select user, host from user;
 +--+---+
 | user | host  |
 +--+---+
 | fred | foo   |
 | root | localhost |
 +--+---+
 2 rows in set (0.00 sec)
 
 
 Am I doing something wrong, or is this a nasty bug?
 -ms
 Michael Shulman

It's by design, and it is only for local users. See 
http://www.mysql.com/doc/en/Windows_running.html

-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+dySrtvXNTca6JD8RAsvlAJ9EcfpMuPg5gsP3hKziagOnpS0urwCgl9ZK
pLeETxvpAaxsH6wt/lCwaQM=
=YoM3
-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



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

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



Bug: last_insert_id() not replicated correctly

2003-03-18 Thread Chris Wilson

Hi all!

Using mysql 2.23.54a as both master  slave:

** On master:

mysql CREATE DATABASE repl_test;
Query OK, 1 row affected (0.03 sec)

mysql USE repl_test;
Database changed
mysql CREATE TABLE test (
- a INT UNSIGNED AUTO_INCREMENT NOT NULL ,
- b INT UNSIGNED NOT NULL,
- PRIMARY KEY (a)
- );
Query OK, 0 rows affected (0.02 sec)

mysql INSERT INTO test (b) VALUES (1);
Query OK, 1 row affected (0.01 sec)

mysql INSERT INTO test (b) VALUES (LAST_INSERT_ID());
Query OK, 1 row affected (0.00 sec)

mysql INSERT INTO test (b) VALUES (LAST_INSERT_ID());
Query OK, 1 row affected (0.00 sec)

mysql SELECT * FROM test;
+---+---+
| a | b |
+---+---+
| 1 | 1 |
| 2 | 1 |
| 3 | 2 |
+---+---+
3 rows in set (0.00 sec)

** On slave:

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

Database changed
mysql SELECT * FROM test;
+---+---+
| a | b |
+---+---+
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
+---+---+
3 rows in set (0.00 sec)

Looking at the binlog it appears that the problem is on the master and that 
LAST_INSERT_ID gets set to the same value as INSERT_ID rather than the previous value 
(ie this problem only affects inserts that are inserting into tables with auto 
increment columns).

Relevant bit of binlog is:

# at 472606546
#030313  9:38:05 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
use repl_test;
SET TIMESTAMP=1047548285;
CREATE TABLE test (
a INT UNSIGNED AUTO_INCREMENT NOT NULL ,
b INT UNSIGNED NOT NULL,
PRIMARY KEY (a)
);
# at 472606683
#030313  9:38:05 server id  101 Intvar
SET INSERT_ID = 1;
# at 472606705
#030313  9:38:05 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
SET TIMESTAMP=1047548285;
INSERT INTO test (b) VALUES (1);
# at 472606770
#030313  9:38:05 server id  101 Intvar
SET LAST_INSERT_ID = 2;
# at 472606792
#030313  9:38:05 server id  101 Intvar
SET INSERT_ID = 2;
# at 472606814
#030313  9:38:05 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
SET TIMESTAMP=1047548285;
INSERT INTO test (b) VALUES (LAST_INSERT_ID());
# at 472606894
#030313  9:38:06 server id  101 Intvar
SET LAST_INSERT_ID = 3;
# at 472606916
#030313  9:38:06 server id  101 Intvar
SET INSERT_ID = 3;
# at 472606938
#030313  9:38:06 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
SET TIMESTAMP=1047548286;
INSERT INTO test (b) VALUES (LAST_INSERT_ID());

# at 472606546
#030313  9:38:05 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
use repl_test;
SET TIMESTAMP=1047548285;
CREATE TABLE test (
a INT UNSIGNED AUTO_INCREMENT NOT NULL ,
b INT UNSIGNED NOT NULL,
PRIMARY KEY (a)
);
# at 472606683
#030313  9:38:05 server id  101 Intvar
SET INSERT_ID = 1;
# at 472606705
#030313  9:38:05 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
SET TIMESTAMP=1047548285;
INSERT INTO test (b) VALUES (1);
# at 472606770
#030313  9:38:05 server id  101 Intvar
SET LAST_INSERT_ID = 2;
# at 472606792
#030313  9:38:05 server id  101 Intvar
SET INSERT_ID = 2;
# at 472606814
#030313  9:38:05 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
SET TIMESTAMP=1047548285;
INSERT INTO test (b) VALUES (LAST_INSERT_ID());
# at 472606894
#030313  9:38:06 server id  101 Intvar
SET LAST_INSERT_ID = 3;
# at 472606916
#030313  9:38:06 server id  101 Intvar
SET INSERT_ID = 3;
# at 472606938
#030313  9:38:06 server id  101 Query   thread_id=5122  exec_time=0
error_code=0
SET TIMESTAMP=1047548286;
INSERT INTO test (b) VALUES (LAST_INSERT_ID());


Let me know if any more info needed!


Regards,

Chris


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

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



Re: EMS MySQL Manager for Linux 1.15 released!

2003-03-18 Thread EMS HiTech Team
Hello All,

We are not spammers at all. We just think that our announcements may be
interesting to the MySQL community as our products are directly related to
MySQL server. Thanks to everyone who understands that and supported us in
this discussion.

2Reiner: BTW, one of the Siemens AG branches is an owner of MySQL Manager
site license. :-)

Best Regards,
EMS HiTech Team
http://www.ems-hitech.com

- Original Message -
From: Rusch (ext) Reiner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 9:27 PM
Subject: AW: EMS MySQL Manager for Linux 1.15 released!


 Hi,

 is anyone interested in commercial use/spam of this list?
 If not, I would prefer to throw them out of the list.

 Regards,
 Reiner

  -Ursprungliche Nachricht-
  Von: EMS HiTech Team [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 17. Marz 2003 17:05
  An: [EMAIL PROTECTED]
  Betreff: EMS MySQL Manager for Linux 1.15 released!
 
 
  EMS HiTech company is very glad to announce MySQL Manager for
  Linux 1.15 --
  the next version of our powerful MySQL administration and
  development tool!
 
  You can download the latest version and user's guide from
  http://www.mysqlmanager.com/download.phtml
 
  What's new in version 1.15?
 
  1. Export Data Dialog: export to PDF added. Now you can
  export data to one
  of the most popular document formats as well as to the other supported
  formats.
 
  2. Export Data Dialog - export to HTML: a possibility of customizing
  navigation links for multi-file export and a possibility to define a
  background picture for the result table added.
 
  3. Import Data Wizard: import modes are implemented - now you
  can define an
  action to be executed with the concurrent records in the
  source file and the
  target table. You can either update these records, delete
  them, insert only
  new records, and more. For these purpose you should define
  key columns as
  primary key.
 
  4. Import Data Wizard: added a possibility of defining a way
  to add data to
  the destination table - insert or append.
 
  5. Several small improvements and minor bugfixes.
 
  What is MySQL Manager?
 
  EMS MySQL Manager provides powerful tools for MySQL Server
  administration
  and object management. Its Graphical User Interface (GUI)
  allows you to
  create/edit all MySQL database objects in a simple and direct
  way, run SQL
  scripts, manage users and administer user privileges,
  extract, print, and
  search metadata, create database structure reports in HTML format,
  export/import data, and supplies many more services that will
  make your work
  with the MySQL server as easy as it can be...
 
  Don't forget to check out other our products:
 
  http://www.ems-hitech.com/sqlmanagers
  Powerful database administration tools for
  InterBase/FireBird, MySQL and
  PostgreSQL servers
 
  http://www.ems-hitech.com/sqlutils/
  Cross-platform data management utilities
 
  http://www.ems-hitech.com/components/
  Powerful components for Delphi/C++ Builder developers
 
  We hope you'll like our products.
  Thank you for your attention.
 
  Best Regards,
  EMS HiTech Team
  http://www.ems-hitech.com
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

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

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


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

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



MySQL Users Conference

2003-03-18 Thread Bill Doerrfeld
Do you plan on attending the first MySQL Users Conference to be held 
next month in San Jose, Calif?

Our company is one of the sponsors for this event and we very much 
look forward to meeting many of you.

If you haven't already registered for this important event, we 
strongly encourage you to do so. Check out the following link for a 
special discount on conference passes 
https://order.mysql.com/?sub=pgpg_no=14ref=blw7 .

There will be a wealth of information presented at this event and it 
will be a great opportunity to network and learn from many of the 
leading minds in the MySQL community.

As I haven't really seen much discussed about this event here, I just 
wanted to drum up a little interest to make sure folks here were 
aware of this event.

Of course, this is an official MySQL event hosted by MySQL AB and 
many of the employees of MySQL AB will be on hand.

Look forward to meeting many of you next month in San Jose.

Best,

Bill
--
-
Bill Doerrfeld[EMAIL PROTECTED]
Blue World Communications, Inc.   http://www.blueworld.com/
-
 Build and serve powerful data-driven Web sites
  with Lasso Studio and Lasso Professional.
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Problem with permissions on Windows in 4.0.11a Gamma?

2003-03-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Shulman wrote:
 Mark,

 Thanks for your note. I did read this page in the manual, especially this
 paragraph.

 
 The default privileges on Windows give all local users full privileges to
 all databases without specifying a password. To make MySQL more 
secure, you
 should set a password for all users and remove the row in the mysql.user
 table that has Host='localhost' and User=''.

 You should also add a password for the root user. The following example
 starts by removing the anonymous user that has all privileges, then 
sets a
 root user password:

 C:\ C:\mysql\bin\mysql mysql
 mysql DELETE FROM user WHERE Host='localhost' AND User='';
 mysql QUIT
 C:\ C:\mysql\bin\mysqladmin reload
 C:\ C:\mysql\bin\mysqladmin -u root password your_password


 In my example, you will see that I did DELETE FROM user to remove all 
rows
 where username is blank. However, I did not reload the service. When 
I did,
 it now looks like the correct behavior is happening.

 -ms

If you mess around with the tables in the 'mysql' database, the changes 
don't take effect until you issue a 'FLUSH PRIVILEGES' command, as the 
data is cached in memory for speed (it has to be looked up for _every_ 
query). The 'GRANT' commands due this implicitly.

	-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+dzvAtvXNTca6JD8RAj+fAKDGkQ+WFRQKLbjG7LP+PkOTj8H8qwCdHKh8
z5R5cp2I2bQTcdVxKhrC9V8=
=Hpyp
-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: subselect

2003-03-18 Thread Paul DuBois
At 21:34 -0800 3/17/03, geeta varu wrote:
does subselect work in mySQL 3.23 ...i'm trying to
exceute  the following query ...
No subselects until 4.1.  Perhaps you can rewrite your query as a join.

http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html

Select can_ID from TABLE1 where (designation like
'%sales%' or designation like '%marketing%')
AND can_ID in

(Select can_ID from TABLE1 where (designation like
'%telecom%' or designation like '%software%'))
if no! any solutions please...
its urgent


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


Re[2]: Problem with permissions on Windows in 4.0.11a Gamma?

2003-03-18 Thread Stefan Hinz
Michael,

mysql DELETE FROM user WHERE Host='localhost' AND User='';
mysql QUIT
C:\ C:\mysql\bin\mysqladmin reload

 In my example, you will see that I did DELETE FROM user to remove all rows
 where username is blank. However, I did not reload the service. When I did,
 it now looks like the correct behavior is happening.

Just to make that clear: If you delete users from the grant tables,
this will remove the entries, but it will not take effect until you
tell the server to reload the grant tables. (The server loads a copy
of the grant tables into memory at startup, to speed up lookups.)

You can accomplish the reload as you did above, but a more convenient
way would be:

mysql DELETE FROM user WHERE Host='localhost' AND User='';
mysql FLUSH PRIVILEGES;

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

[filter fodder: sql, 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



Problem with large file support

2003-03-18 Thread Cory Patterson
Hello,

I have been working for the past couple of days trying to get tables 
larger than 2GB on my linux system.

Here is what it is installed:

Linux 2.4.20 i686
glibc-2.3.1
gcc-3.2.2
I am trying to install 3.23.55 from source.  During configure, I get 
the following:

checking for CFLAGS value to request large file support... 
-D_FILE_OFFSET_BITS=64
checking for LDFLAGS value to request large file support...
checking for LIBS value to request large file support...
checking for _FILE_OFFSET_BITS... 64
checking for _LARGEFILE_SOURCE... no
checking for _LARGE_FILES... no

And when it compiles, I and limited to 2GB files.

I can happily create files larger than 2GB outside of mysql.  I have 
also tried running with the --big-tables option.

Any help you could provide would be great.

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


Fulltext Search Problem

2003-03-18 Thread martin.curmi

Hi,

Why does this not work?

SELECT * FROM News WHERE category='sport' AND MATCH
(subcategory,headline,summary) AGAINST ('madrid') LIMIT 1,25

If i remove the category='sport' AND from the WHERE clause it works - yet all 
documents in the db currently have category='sport'. Is it not possible to mix 
a MATCH with another condition?

Any ideas, or is the only solution to run the first query, store the results in 
a temp table, and then run a 2nd query.

Regards
Martin Curmi



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

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



Stalking the wily 8-byte DATETIME !!

2003-03-18 Thread Paul DuBois
Pursuant to last week's discussion of why, if DATE and TIME each take
three bytes, does DATETIME take eight bytes, I found the following in
the internals.texi document:
@strong{DATE}
@itemize @bullet
@item
Storage: fixed-length series of binary integers, always three bytes
long.
@item
Example: a DATE column containing '0001-01-01' looks like:@*
@code{hexadecimal 21 02 00}
@end itemize
@strong{DATETIME}
@itemize @bullet
@item
Storage: eight bytes.
@item
Part 1 is a 32-bit integer containing year*1 + month*100 + day.
@item
Part 2 is a 32-bit integer containing hour*1 + minute*100 + second.
@item
Example: a DATETIME column for '0001-01-01 01:01:01' looks like:@*
@code{hexadecimal B5 2E 11 5A 02 00 00 00}
@end itemize
@strong{TIME}
@itemize @bullet
@item
Storage: a value offset from 8385959, always three bytes long.
@item
Example: a TIME column containing '01:01:01' looks like:@*
@code{hexadecimal 75 27 00}
@end itemize
--
Paul DuBois
http://www.kitebird.com/
sql, query
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: AW: EMS MySQL Manager for Linux 1.15 released!

2003-03-18 Thread Gelu Gogancea
Hi,
- Original Message -
From: Daniel Kasak [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 12:35 AM
Subject: Re: AW: EMS MySQL Manager for Linux 1.15 released!


 Rusch (ext) Reiner wrote:

 Hi,
 
 is anyone interested in commercial use/spam of this list?
 If not, I would prefer to throw them out of the list.
 
 Regards,
 Reiner
 
 
 If it offends you so then set up a filter to deal with it.
 MySQL-related software releases can't be considered spam.
 Focus your attention on real spam. There's plenty to go after without
 taking things out on people providing software for our favourite database.

I agree with this point of viewsubscribe also.

Best regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]


 --
 Daniel Kasak
 IT Developer
 * NUS Consulting Group*
 Level 18, 168 Walker Street
 North Sydney, NSW, Australia 2060
 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
 email: [EMAIL PROTECTED]
 website: www.nusconsulting.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: The error on compiling the MySQL source

2003-03-18 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Mon, 17 Mar 2003, Dyego Souza do Carmo wrote:

 I'm trying to compile MySQl 4.0.12 from BK three... and the error is:


 Making all in libmysql
 make[2]: Entering directory `/temp/mysql-development/mysql-4.0/libmysql'
 source='libmysql.c' object='libmysql.lo' libtool=yes \
 depfile='.deps/libmysql.Plo' tmpdepfile='.deps/libmysql.TPlo' \
 depmode=gcc /bin/sh ../depcomp \
 @LIBTOOL@ --mode=compile gcc -DDEFAULT_CHARSET_HOME=\/usr/local/mysql4\ 
 -DDATADIR=\/usr/local/mysql4/var\ -DSHAREDIR=\/usr/local/mysql4/share/mysql\ 
 -DUNDEF_THREADS_HACK -DDONT_USE_RAID  -DMYSQL_CLIENT -I. -I. -I.. -I./../include 
 -I../include -I./.. -I.. -I.. -g -O -DDBUG_ON -DSAFE_MUTEX -O6 -mpentiumpro  -c 
 -o libmysql.lo `test -f libmysql.c || echo './'`libmysql.c
 ../depcomp: @LIBTOOL@: command not found
 make[2]: *** [libmysql.lo] Error 127
 make[2]: Leaving directory `/temp/mysql-development/mysql-4.0/libmysql'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/temp/mysql-development/mysql-4.0'
 make: *** [all] Error 2

 on make command.

 My system is Linux 2.4.21-pre5-ac3

 The last bk pull is: 16:20 today

Hmm, somehow the configure script seems to have missed to detect libtool
on your system. You should check config.log for errors.

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

iD8DBQE+d0+eSVDhKrJykfIRAhLoAJ4yJpd/uQqGHD8xIFF66MrJ2+i1iACfY8nR
UHhQuikgmMDTnJa9NxaHIjo=
=5xV3
-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



$13.95 Domain Names are here!!

2003-03-18 Thread Web Hosting
Dear mysql:

Register a domain name(.com/.net/.org/.biz/.info/.us) ONLY $13.95 a year, Please 
visit: 
http://www.okdns.net

FREE SERVICES with domain registration: 

- Free change registrant information.

- Free DNS services.
A/MX/CNAME/* your domain name to any IP address or hostname.

- 10 page web site -
Layouts, backgrounds, WYSIWYG (What You See Is What You Get) interface, etc.

- 100 personalized email addresses -
Create up to 100 personalized email addresses and forward them to other email 
addresses.

- Web/URL forwarding -
Forward/redirect/frame your domain name to any other URL/website on the web.

- Name-my-phone -
Give your phone a memorable, meaningful, identity.

- Name-my-map -
Ever want to give someone directions to your home or business, with an easy to 
remember 
name?

- and more -
Domain portfolio management - Parking page - DNS services...



okdns.net
[EMAIL PROTECTED]
http://www.okdns.net
An ICANN Accredited Registrar
2003-03-19



===
You have received this notice because you have ordered a product from an affiliate of 
okdns.net
or signed up to receive offers from an affiliate of okdns.net. If you do not wish to 
receive further 
correspondance Please forward this email to [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: Indices in querys using OR...

2003-03-18 Thread Egor Egorov
On Tuesday 18 March 2003 02:47, dreq jkj wrote:

 I have trouble figuring out how the indices are used when making a query
 that uses OR-operator.

 If I have the following table:

 create table testing(
 id int unsigned not null primary key auto_increment,
 idx1 int unsigned not null,
 idx2 int unsigned not null,
 index(idx1),
 index(idx2));

 In this query i expect mySQL to use one of the two indices to speed up the
 query, but It doesn't.. :(
 select * from testing where idx1=0 or idx2=1;

Yes, MySQL doesn't use indexes in this way:
http://www.mysql.com/doc/en/Searching_on_two_keys.html

 The thing I'm thinking about instead is the following query:
 select * from testing where idx1=0
 UNION
 select * from testing where idx2=1;

 It looks like this does speed up the query, but is this the way to go???
 Is this a weaknes in mySQL or have I forgotten something?





-- 
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: InnoDB Problem

2003-03-18 Thread Egor Egorov
On Tuesday 18 March 2003 02:26, Custódio de Matos Lima wrote:

 Im having some troubles when creating the foreign key
 constraints in a InnoDB database. The problem is, i
 can create the InnoDB table, but im having a little
 difficult to make the connections with other tables.

 The error that apears is like that:

 Erro

 Comando SQL :

  alter table tab3 add constraint foreign key (cod2)
  references tab2
  (cod2) on update cascade on delete cascade;


  Mensagens do MySQL :


  Can't create table '.\ola\#sql-52c_9e.frm' (errno:
 150)

Check that columns are indexed, that columns have the same type.



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



error

2003-03-18 Thread Patrick Geary
Hi 
I am a new user of Mysql and have received an error.
I enter my C drive using the MS-DOS prompt. I then access the mysql\bin
directory.
I then type mysql. which welcomes me to Mysql Monitor.
I then try to create a database called database01 by typing mysqladmin
create database01\g but i get the following error:-
  Error 1064:You have an error in your SQL syntax near
'mysqladmin create database01' at line 1.
 
I would be very grateful if you could get back to me about this as i am
using it for a college project.
 
Thanks
Patrick Geary

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

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



Re: Fulltext Search Problem

2003-03-18 Thread Brian McCain
No, that should work. Do any items in the db have the text 'madrid' in them?
Does it fail with an error or does it simply not return any results? Are you
executing it on the command line? If not, are you checking for errors? What
version of MySQL do you have?

Brian McCain

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 8:33 AM
Subject: Fulltext Search Problem



 Hi,

 Why does this not work?

 SELECT * FROM News WHERE category='sport' AND MATCH
 (subcategory,headline,summary) AGAINST ('madrid') LIMIT 1,25

 If i remove the category='sport' AND from the WHERE clause it works -
yet all
 documents in the db currently have category='sport'. Is it not possible to
mix
 a MATCH with another condition?

 Any ideas, or is the only solution to run the first query, store the
results in
 a temp table, and then run a 2nd query.

 Regards
 Martin Curmi



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

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

2003-03-18 Thread Paul DuBois
At 3:16 + 3/14/03, Patrick Geary wrote:
Hi
I am a new user of Mysql and have received an error.
I enter my C drive using the MS-DOS prompt. I then access the mysql\bin
directory.
I then type mysql. which welcomes me to Mysql Monitor.
I then try to create a database called database01 by typing mysqladmin
create database01\g but i get the following error:-
  Error 1064:You have an error in your SQL syntax near
'mysqladmin create database01' at line 1.
I would be very grateful if you could get back to me about this as i am
using it for a college project.
mysqladmin is not a command that you enter at the mysql prompt from
within the mysql program.  It's a separate program that you invoke
from the DOS prompt.
You can either create the database from within mysql like this:

mysql CREATE DATABASE database01;

or from the command line using mysqladmin like this:

C:\ mysqladmin create database01

Thanks
Patrick Geary


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


Re: error

2003-03-18 Thread Joseph Bueno
Hi,

You should run mysqladmin from DOS prompt, not within mysql client.
If you want to create a database from mysql client, you should use:
create database database01;
Regards,
Joseph Bueno
Patrick Geary wrote:
Hi 
I am a new user of Mysql and have received an error.
I enter my C drive using the MS-DOS prompt. I then access the mysql\bin
directory.
I then type mysql. which welcomes me to Mysql Monitor.
I then try to create a database called database01 by typing mysqladmin
create database01\g but i get the following error:-
  Error 1064:You have an error in your SQL syntax near
'mysqladmin create database01' at line 1.
 
I would be very grateful if you could get back to me about this as i am
using it for a college project.
 
Thanks
Patrick Geary


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


Re: error in crerating a database

2003-03-18 Thread dpgirago


The correct syntax for creating a database is:

mysql  create database databse_name;

mysqladmin is a command line program, not for use inside the mysql client
program.

David



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

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



Re: error

2003-03-18 Thread Brian McCain
You don't want to use any calls to 'mysqladmin' inside of the MySQL Monitor,
as mysqladmin is for command line functions (outside the command line)...you
may want to reread some of the documentation on this, starting here:
http://www.mysql.com/doc/en/Connecting-disconnecting.html

Brian McCain

- Original Message -
From: Patrick Geary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 7:16 PM
Subject: error


 Hi
 I am a new user of Mysql and have received an error.
 I enter my C drive using the MS-DOS prompt. I then access the mysql\bin
 directory.
 I then type mysql. which welcomes me to Mysql Monitor.
 I then try to create a database called database01 by typing mysqladmin
 create database01\g but i get the following error:-
   Error 1064:You have an error in your SQL syntax near
 'mysqladmin create database01' at line 1.

 I would be very grateful if you could get back to me about this as i am
 using it for a college project.

 Thanks
 Patrick Geary

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

 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: Stalking the wily 8-byte DATETIME !!

2003-03-18 Thread Keith C. Ivey
On 18 Mar 2003, at 10:49, Paul DuBois wrote:

 Pursuant to last week's discussion of why, if DATE and TIME each take
 three bytes, does DATETIME take eight bytes, I found the following in
 the internals.texi document:

Thanks for tracking that down.  I spent a little while looking in the 
source and had figured out DATETIME, more or less, but not DATE or 
TIME.
 
 @strong{DATE}
 @itemize @bullet
 @item
 Storage: fixed-length series of binary integers, always three bytes
 long.
 @item
 Example: a DATE column containing '0001-01-01' looks like:@*
 @code{hexadecimal 21 02 00}
 @end itemize

That explanation leaves a little to be desired.  Can anyone explain 
how '0001-01-01' maps to 0x0221 (which is decimal 545)?

 @strong{DATETIME}
 @itemize @bullet
 @item
 Storage: eight bytes.
 @item
 Part 1 is a 32-bit integer containing year*1 + month*100 + day.
 @item
 Part 2 is a 32-bit integer containing hour*1 + minute*100 + second.
 @item
 Example: a DATETIME column for '0001-01-01 01:01:01' looks like:@*
 @code{hexadecimal B5 2E 11 5A 02 00 00 00}
 @end itemize

At first I thought this example made sense, since 0x025a112eb5 is 
decimal 10101010101.  But it's supposed to be two 32-bit integers 
rather than one 64-bit integer, and the two parts would be 0x0002 
and 0x5a112eb5, which don't seem to convert to a date and time.  
Anyway, it appears that the date part of a DATETIME is stored less 
efficiently than a DATE, and the time part is stored less efficiently 
than a TIME (though that's just because 1 byte of the 4 is always 
00).  Presumably that's for ease (and hopefully speed) of 
calculation.
 
 @strong{TIME}
 @itemize @bullet
 @item
 Storage: a value offset from 8385959, always three bytes long.
 @item
 Example: a TIME column containing '01:01:01' looks like:@*
 @code{hexadecimal 75 27 00}
 @end itemize

0x2775 is decimal 10101, so the example doesn't seem to involve an 
offset.

[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: Process Limit on Linux ?

2003-03-18 Thread Philipp
Dear Walt, dear List,


thank you for your reply. Finally a suggestions at all.
I checked both

/proc/sys/kernel/threads-max
/proc/sys/kernel/shmmax

I dont think threads-max will be a problem, because the value is 14336,
and i dont think my system will ever have to handle this number of threads.

But researching shmmax at google i got several hits. Most are dealing with
postgres but perhaps its the same with mysql.

shmmax ist 32 MB. on one page the author suggest to raise this value to 128
MB.

What are your suggestions for the values:

shmall  shmmax  shmmni ?


Thank you very much,
Yours Philipp

- Original Message -
From: walt [EMAIL PROTECTED]
To: Philipp [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 6:48 PM
Subject: Re: Process Limit on Linux ?


 Philipp wrote:
 
  Hi there,
 
  i wrote several times to the list asking for help with a problem
  regarding process limits on linux, but never got an answer.
  today i found this story:
 
  http://www.mysql.com/press/user_stories/handy.de.html
 
  here are the relevant sentences:
 
  We had some process limit problems on our Linux Systems,
  but thanks to your support we where able to patch the linux boxes
  and move the limit to a size that meets our needs (we've got an average
of
  about
  1600 concurrent threads per server).
 
  These people use 2.2 Kernels so i dont know if the mentioned kernel and
  glibc
  patching is also relevant for me, as i am using 2.4 kernels only.
 
  Here is my problem in detail:
 
  i am using mysql-3.23.55 binary packages on linux 2.4.20 and i raised
ulimit
  values and configuration in my.conf to allow more then 1500 threads. but
  when
  there are around 750 threads a new client connecting is told something
like
  that (dont have the errno at the moment, i think its 11):
 
  cant create new thread, perhaps you are out of memory or there is a
  os-depended bug.
 
  The machine only runs apache and mysql and is a Xeon 2x2 2.4 Gz with 2
GB of
  RAM.
  cat /proc/meminfo sais that more then 1 Gig is used for caching, so
memory
  should be no
  problem .
 
  Please, if you have any ideas, let me know. If it is a kernel issue,
tell me
  to go to linux mailing lists
  or if its some kind of secret issue only the support will be able to
  answer let me know that.
 
  Thanks in advance,
  Philipp
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 Philipp,
 Did you check /proc/sys/kernel/threads-max? I know with oracle 8i, you
 are supposed to increase  /proc/sys/kernel/shmmax as well as some other
 values. You might check into that and see if changing those values will
 help.
 Does your syslog say anything when these problems occur?

 walt

 walt



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

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



maximum manageable table sizes for performance

2003-03-18 Thread Murad Nayal


Hi all,

I am in the process of planning for the construction of a very large
database and I wanted to do a reality check before hand. in this
database a typical table would be 100,000,000 rows and some tables could
be as large as 100 times that, 10,000,000,000. I am wondering:

1- is it possible?
2- how do the indices files grow with the number of rows. is it more or
less linear or should I expect some explosion in size as the number of
rows increases.
3- I would need to do joins on as many as 5 tables of that size.
providing that joins are done on appropriately indexed columns. how
would you expect the performance to be like? for my purposes it doesn't
need to be real time. but a response within 15 minutes is probably
necessary.
4- some of these tables might need to sit on an nfsed file system. would
that be a completely crazy thing to do?
5- what sort of server memory you would think be a minimum to handle
this DB.

and lastly:

6-would any other DBMS (than mysql), say commercial ones, be better
equipped to handle such data sizes?

thanks. any relayed experiences the subject of large database is very
much appreciated.

best
Murad

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

To 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, Need extra Cash? - Get Paid in 48hrs - Home Reps Needed.Com home representatives are required!

2003-03-18 Thread John Klein
On Tue, 18 Feb 2003, Virdhagriswaran SHIBATA wrote:

 Mysql, your immediate help is needed.  We are a .com
 corporation that is growing fast (over 1000% per year). We simply cannot
 keep up with demand.

Remind me again why we bother with a spam filter?

--
John Klein
Database Applications Developer
Network Applications Services - Harvard Law School
Omnia Mutantur, Nihil Interit

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

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



Re: Process Limit on Linux ?

2003-03-18 Thread Philipp
Hi Walt,


i am using PHP to generate the connections. The maximum
was around 750 Connections. I am sure it never was more
then 800. At the moment i have queries per second avg: 548.286


Regards,
Philipp

- Original Message -
From: walt [EMAIL PROTECTED]
To: Philipp [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 7:11 PM
Subject: Re: Process Limit on Linux ?


On Tuesday 18 March 2003 01:01 pm, you wrote:
 Dear Walt, dear List,


 thank you for your reply. Finally a suggestions at all.
 I checked both

 /proc/sys/kernel/threads-max
 /proc/sys/kernel/shmmax

 I dont think threads-max will be a problem, because the value is 14336,
 and i dont think my system will ever have to handle this number of
threads.

 But researching shmmax at google i got several hits. Most are dealing with
 postgres but perhaps its the same with mysql.

 shmmax ist 32 MB. on one page the author suggest to raise this value to
128
 MB.

 What are your suggestions for the values:

 shmall  shmmax  shmmni ?
I really couldn't give you good values for these. I just remember Oracle
suggested changes to them.

What are you using to generate the connections (perl, c/c++, php, etc.)?
--
Walter Anthony
System Administrator
National Electronic Attachment
Atlanta, Georgia
1-800-782-5150 ext. 1608
 If it's not broketweak it


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

To 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, Need extra Cash? - Get Paid in 48hrs - Home Reps Needed .Com home representatives are required!

2003-03-18 Thread Roger Davis
Maybe the [EMAIL PROTECTED] address should be changed to
[EMAIL PROTECTED] so people can't pull the Username off the e-mail
address and bypass the filter.

-Original Message-
From: John Klein [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 1:18 PM
To: [EMAIL PROTECTED]
Subject: Re: Mysql, Need extra Cash? - Get Paid in 48hrs - Home Reps
Needed .Com home representatives are required!


On Tue, 18 Feb 2003, Virdhagriswaran SHIBATA wrote:

 Mysql, your immediate help is needed.  We are a .com
 corporation that is growing fast (over 1000% per year). We simply cannot
 keep up with demand.

Remind me again why we bother with a spam filter?

--
John Klein
Database Applications Developer
Network Applications Services - Harvard Law School
Omnia Mutantur, Nihil Interit

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

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


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

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



Mysql, Need extra Cash? - Get Paid in 48hrs - Home Reps Needed .Com home representatives are required!

2003-03-18 Thread Virdhagriswaran SHIBATA
Mysql, your immediate help is needed.  We are a .com corporation that is 
growing fast (over 1000% per year). We simply cannot keep up with demand. 
 We are searching for motivated individuals who are looking to earn a substantial 
income working at home.


mysql This is a real world opportunity to make an excellent income from home. 
No experience is required! We will provide you with any training you may need.
   

We're seeking energetic and self motivated people.  If that is you, then click 
on the link below now to complete our information request form, and one of our 
employment specialist will contact you.
 



http://www.bizoppsuccesss.com/whatifij.htm


So if you are looking to be employed at home, with a career that will provide you vast 
opportunities and a substantial income, please fill out our online information request 
form here now:

~~
Your email address was obtained from an opt-in list. If you wish to be deleted from 
this list, 
please click on the following link:  
http://www.bizoppsuccesss.com/remove/remove8H.html and you will be removed from the 
list.
~~




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

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



optimizer bug in the index used by mysql/Innodb in the search

2003-03-18 Thread rafarife
 Description:

 Hello Peter,

 Have you explained to Heikki this problem?
 Have you fixed it?

 Please, tell me about it.

 Regards, 

 Rafa   


 
How-To-Repeat:
   Select ... from giros ...

Fix:
-

Synopsis:optimizer bug in the index used by mysql/Innodb in the search

Submitter-Id:   submitter ID
Originator: Rafa
Organization:   Pecomark
MySQL support:  none
Severity:   non-critical
Priority:   medium
Category:   mysqld-max-nt
Class:  sw-bug
Release:mysqld 4.0.11 Gamma(InnoDB)

Exectutable:   mysqld-max-nt
Environment:   Pentium III-MMX, 500 MHZ, 540 MB
System:Windows 2000
Compiler:  -
Architecture:  i


__
Try AOL and get 1045 hours FREE for 45 days!
http://free.aol.com/tryaolfree/index.adp?375380

Get AOL Instant Messenger 5.1 for FREE! Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promos=380455

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

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



Selecting only ONCE from multiple tables

2003-03-18 Thread Hal Vaughan
I'm just getting used to SQL/MySQL, so there is likely a name for this or it 
may be well known -- I just haven't either come across it, or haven't made 
the associations between all the parts yet.

I have 2 tables, one a temp table, and they have the same columns.  I'd like 
to be able to select from both tables and get one listing.

Table 1 is Cases, Table 2 is Temp.  They have columns Name, Amount, Zip.

SELECT * FROM Cases AS C, Temp AS T WHERE (C.Amount  500 OR T.Amount  500);

produces a list of 38 rows w/ 6 columns (the first 3 columns from Cases, the 
2nd 3 columns from Temp).  This should select 2 rows from Temp and 4 from 
Cases.  (The 2 rows in Temp are duplicates of the ones in Temp.)

Instead of getting one list with 3 columns, this list iterates through each 
row in Temp once for each row in Cases and also includs the duplicated rows a 
2nd time.  While I expect the duplicated rows to show up twice, how do I 
produce a combined list.

Another way to put it is that I have 2 tables w/ similar columns and want to 
select from the 2 of them and take the results and either output it or put it 
into a new table.

Thanks for any suggestions or help.

Hal

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

To 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] InnoDB - Updating a parent table won't update the child table

2003-03-18 Thread Heikki Tuuri
Paul,

which MySQL version you are using?

http://www.innodb.com/ibman.html#InnoDB_foreign_keys


Corresponding ON UPDATE options are available starting from 4.0.8.


If you are using = 4.0.8, can you create a small repeatable test case?

Best regards,

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

sql query

- Original Message -
From: Paul Larue [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, March 18, 2003 8:02 AM
Subject: [MySQL] InnoDB - Updating a parent table won't update the child
table


 Hi all,
 I created 2 tables in MySQl with the following statements
 ==
 CREATE TABLE employees (
 emp_id INT NOT NULL AUTO_INCREMENT,
 emp_last_name TINYTEXT NOT NULL,
 emp_first_name TINYTEXT NOT NULL,
 emp_nick_name TINYTEXT NOT NULL,
 emp_date_joined DATE NOT NULL,
 emp_date_left DATE,
 emp_title TINYTEXT NOT NULL,
 emp_group CHAR(50),
 emp_address TINYTEXT NOT NULL,
 emp_city TINYTEXT NOT NULL,
 emp_phone CHAR(7) NULL,
 emp_mobile CHAR(7) NULL,
 emp_national_id CHAR(14) NOT NULL,
 emp_social_security CHAR(8) NOT NULL,
 emp_tax_ac CHAR(8) NULL,
 PRIMARY KEY (emp_id),
 KEY (emp_group),
 FOREIGN KEY (emp_group) REFERENCES employee_groups(grp_name)
 ON DELETE SET NULL
 ON UPDATE CASCADE
 )
 TYPE=InnoDB
 COMMENT=Stores information about employees in company

 CREATE TABLE employee_groups (
 grp_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
 grp_name CHAR(50) NOT NULL,
 grp_overtime_paid BOOL NOT NULL,
 PRIMARY KEY (grp_id),
 INDEX (grp_name))
 TYPE=InnoDB
 COMMENT=Stores group names and their properties
 ==
 The field employee_groups.grp_name is 'mapped' to employees.emp_group and
 the referential integrity is set all the associated fileds to NULL when
the
 parent record is DLETED and to CASCADE when the parent record is UPDATED.

 Creating the tables is fine. Inserting data in the tables is fine too. But
 when I try to update a record in employee_groups, MySQL returns the
 following error

 mysql UPDATE employee_groups SET grp_name = FOO WHERE grp_id = 1;
 ERROR 1217: Cannot delete a parent row: a foreign key constraint fails

 Why is it telling me that I'm trying to delete the record when I'm only
 doing a simple update?

 Deleting the records is ok, MySQl sets the associated fields to NULL. But
 the update WON'T work...

 Any clue?

 Thanks in advance

 Paul



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

 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: Selecting only ONCE from multiple tables

2003-03-18 Thread Bruce Feist
Hal Vaughan wrote:

I'd like to be able to select from both tables and get one listing.

Table 1 is Cases, Table 2 is Temp.  They have columns Name, Amount, Zip.

SELECT * FROM Cases AS C, Temp AS T WHERE (C.Amount  500 OR T.Amount  500);

produces a list of 38 rows w/ 6 columns (the first 3 columns from Cases, the 
2nd 3 columns from Temp).  This should select 2 rows from Temp and 4 from 
Cases.  (The 2 rows in Temp are duplicates of the ones in Temp.)
 

You're doing a join (more accurately, what's called a Cartesian Product) 
in the above SQL... it's designed to look at combinations of information 
from each of two tables, and combine them to create a new table with 
individual rows containing data from each.  Instead, you need what's 
called a union.  Since you want to preserve duplicates, you need the 
extra keyword ALL.  Try this:

Select * from Cases C WHERE C.Amount  500
UNION ALL
Select * from Temp T WHERE T.Amount  500;
Warning -- my main expertise is with other RDBMSs, and this syntax might 
be incorrect for MySql.

Bruce Feist



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


Re: Selecting only ONCE from multiple tables

2003-03-18 Thread Brian McCain
UNION is new in MySQL 4. Be careful of that.
http://www.mysql.com/doc/en/UNION.html

If you don't have MySQL 4, your problem becomes a bit tricky, because MySQL
doesn't know that T.Amount and C.Amount are conceptually the same, so it
won't group the columns. Basically, you want to select T.* if T.Amount  500
and C.* if C.Amount  500. Which, without UNION, is only possible through
separate queries, unless I'm missing something.

Brian McCain

- Original Message -
From: Bruce Feist [EMAIL PROTECTED]
To: mysQL List [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 11:49 AM
Subject: Re: Selecting only ONCE from multiple tables


 Hal Vaughan wrote:

 I'd like to be able to select from both tables and get one listing.
 
 Table 1 is Cases, Table 2 is Temp.  They have columns Name, Amount, Zip.
 
 SELECT * FROM Cases AS C, Temp AS T WHERE (C.Amount  500 OR T.Amount 
500);
 
 produces a list of 38 rows w/ 6 columns (the first 3 columns from Cases,
the
 2nd 3 columns from Temp).  This should select 2 rows from Temp and 4 from
 Cases.  (The 2 rows in Temp are duplicates of the ones in Temp.)
 
 
 You're doing a join (more accurately, what's called a Cartesian Product)
 in the above SQL... it's designed to look at combinations of information
 from each of two tables, and combine them to create a new table with
 individual rows containing data from each.  Instead, you need what's
 called a union.  Since you want to preserve duplicates, you need the
 extra keyword ALL.  Try this:

 Select * from Cases C WHERE C.Amount  500
 UNION ALL
 Select * from Temp T WHERE T.Amount  500;

 Warning -- my main expertise is with other RDBMSs, and this syntax might
 be incorrect for MySql.

 Bruce Feist




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

 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: Selecting only ONCE from multiple tables

2003-03-18 Thread Brian McCain
Actually, I just found a tutorial on how to mimic the UNION statement with
MySQL 3.x:
http://www.nstep.net/~mpbailey/programming/tutorials.union.php

- Original Message -
From: Brian McCain [EMAIL PROTECTED]
To: mysQL List [EMAIL PROTECTED]


 UNION is new in MySQL 4. Be careful of that.
 http://www.mysql.com/doc/en/UNION.html

 If you don't have MySQL 4, your problem becomes a bit tricky, because
MySQL
 doesn't know that T.Amount and C.Amount are conceptually the same, so it
 won't group the columns. Basically, you want to select T.* if T.Amount 
500
 and C.* if C.Amount  500. Which, without UNION, is only possible through
 separate queries, unless I'm missing something.

 Brian McCain

 - Original Message -
 From: Bruce Feist [EMAIL PROTECTED]
 To: mysQL List [EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 11:49 AM
 Subject: Re: Selecting only ONCE from multiple tables


  Hal Vaughan wrote:
 
  I'd like to be able to select from both tables and get one listing.
  
  Table 1 is Cases, Table 2 is Temp.  They have columns Name, Amount,
Zip.
  
  SELECT * FROM Cases AS C, Temp AS T WHERE (C.Amount  500 OR T.Amount 
 500);
  
  produces a list of 38 rows w/ 6 columns (the first 3 columns from
Cases,
 the
  2nd 3 columns from Temp).  This should select 2 rows from Temp and 4
from
  Cases.  (The 2 rows in Temp are duplicates of the ones in Temp.)
  
  
  You're doing a join (more accurately, what's called a Cartesian Product)
  in the above SQL... it's designed to look at combinations of information
  from each of two tables, and combine them to create a new table with
  individual rows containing data from each.  Instead, you need what's
  called a union.  Since you want to preserve duplicates, you need the
  extra keyword ALL.  Try this:
 
  Select * from Cases C WHERE C.Amount  500
  UNION ALL
  Select * from Temp T WHERE T.Amount  500;
 
  Warning -- my main expertise is with other RDBMSs, and this syntax might
  be incorrect for MySql.
 
  Bruce Feist
 
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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



replication error writing/creating master.info file

2003-03-18 Thread jehrling
Description:
Attempts to start slave replication fail when MySQL attempts to write
the bin-log location to the master.info file. 
Attempts to manually change master also fail when writing to 
master.info file.
master.info file is created, but has zero length (no info written)

How-To-Repeat:
With valid master.info file:
issue slave start command.

MySQL replies:
Could not initialize master info structure, check permisions on master.info

Removed master.info file restart mysql and issue:
CHANGE MASTER TO MASTER_HOST = '...', MASTER_USER = '...', MASTER_PASSWORD = 
'...', MASTER_PORT = 3306

MySQL replies:  
Could not initialize master info

master.info file 
-rw-rw1 mysqlmysql   0 Mar 18 14:53 
/var/lib/mysql/master.info

Occured in both 4.0.11 and 4.0.12 at least. Load data from master still works 
and transfers data correctly. I just cannot start the slave server.

Fix:
?

Submitter-Id:  
Originator:John Ehrlinger
Organization:
MySQL support: none
Synopsis:  
Severity:  serious
Priority:   high
Category:  mysql
Class: sw-bug
Release:   mysql-4.0.12 (Official MySQL RPM)

C compiler:2.95.3
C++ compiler:  2.95.3
Environment:

System: Linux access5.ccf.org 2.4.18-27.8.0 #1 Fri Mar 14 06:45:49 EST 2003 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: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../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
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Compilation info: CC='gcc'  CFLAGS='-O6 -fno-omit-frame-pointer -mpentium'  CXX='g++'  
CXXFLAGS='-O6 -fno-omit-frame-pointer  -felide-constructors 
-fno-exceptions -fno-rtti -mpentium'  LDFLAGS=''  ASFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   14 Jan  7 12:55 /lib/libc.so.6 - 
libc-2.2.93.so
-rwxr-xr-x1 root root  1235468 Sep  5  2002 /lib/libc-2.2.93.so
-rw-r--r--1 root root  2233342 Sep  5  2002 /usr/lib/libc.a
-rw-r--r--1 root root  178 Sep  5  2002 /usr/lib/libc.so
Configure command: ./configure '--disable-shared' '--with-mysqld-ldflags=-all-static' 
'--with-client-ldflags=-all-static' '--without-berkeley-db' '--with-innodb' 
'--without-vio' '--without-openssl' '--enable-assembler' '--enable-local-infile' 
'--with-mysqld-user=mysql' '--with-unix-socket-path=/var/lib/mysql/mysql.sock' 
'--prefix=/' '--with-extra-charsets=complex' '--exec-prefix=/usr' 
'--libexecdir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' 
'--localstatedir=/var/lib/mysql' '--infodir=/usr/share/info' 
'--includedir=/usr/include' '--mandir=/usr/share/man' '--with-embedded-server' 
'--enable-thread-safe-client' '--with-comment=Official MySQL RPM' 'CFLAGS=-O6 
-fno-omit-frame-pointer -mpentium' 'CXXFLAGS=-O6 -fno-omit-frame-pointer   
 -felide-constructors -fno-exceptions -fno-rtti -mpentium'


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

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



Can it be true?

2003-03-18 Thread Salada, Duncan
Is it possible?  Can it really be true?  I check the website daily and watch
the lists eagerly.  As I looked at the website just now, I saw it...

Database Server
Production: 4.0.12

Did I miss the announcement?  Is the website jumping the gun?  Or am I the
first to find out?
;-)

oh, please let it be true.

(mysql,sql)

Duncan

---
Duncan Salada
Titan Systems Corporation
301-925-3222 x375

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

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



Possible bug in mysql 4.0.12 Install for Win32

2003-03-18 Thread Johnson, Garrett
To replicate:

1.  Start with a machine running Pentium 4, Windows XP Pro.

2.  Map a New Network Place to:
\\somecomputer\C$
  Where \\somecomputer contains an install, in the root directory, (i.e.
C:\mysql,) of mysql already.  The remote install in this case was version
3.23.56.

3.  Attempt to install mysql in the C:\mysql directory of the local machine.
Somehow the installer locates the install at \\somecomputer\C$\mysql and
points the NT service at THAT binary, not the one installed locally.

I woudn't mention this, except that it's SO odd...

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

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



fulltext search

2003-03-18 Thread Sidar Lopez Cruz




when MySQL will support fulltext search on InnoDB tables?

_
Charla con tus amigos en línea mediante MSN Messenger: 
http://messenger.yupimsn.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 4.0.12 has been released

2003-03-18 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

MySQL 4.0.12, a new version of the popular Open Source Database, has been
released. It is now available in source and binary form for a number of
platforms from our download pages at http://www.mysql.com/downloads/ and
mirror sites.

Note that not all mirror sites may be up to date at this point of time -
if you can't find this version on some mirror, please try again later or
choose another download site.

Starting with MySQL 4.0.12, MySQL 4.0 is now labelled as production
instead of gamma.

Users of MySQL 3.23 are encouraged to upgrade, since MySQL 3.23 will now
be phased out slowly. It will still be supported, but only critical bug
and security fixes will be applied to the 3.23 code base.

News from the ChangeLog:

Functionality added or changed:

 * `mysqld' no longer reads options from world-writeable config files.

 * Integer values between 9223372036854775807 and 999
   are now regarded as unsigned longlongs, not as floats. This makes
   these values work similar to values between 1000
   and 18446744073709551615.

 * `SHOW PROCESSLIST' will now include the client TCP port after the
   hostname to make it easier to know from which client the request
   originated.

Bugs fixed:

 * Fixed `mysqld' crash on extremely small values of `sort_buffer'
   variable.

 * `INSERT INTO u SELECT ... FROM t' was written too late to the
   binary log if t was very frequently updated during the execution of
   this query. This could cause a problem with `mysqlbinlog' or
   replication. The master must be upgraded, not the slave. (bug #136).

 * Fixed checking of random part of `WHERE' clause (bug #142).

 * Fixed a bug with `multi-table updates' with `InnoDB' tables. This
   bug occured as, in many cases, `InnoDB' tables can not be updated
   on the fly, but offsets to the records have to be stored in a
   temporary table.

 * Added missing file `mysql_secure_installation' to the `server' RPM
   subpackage (bug #141).

 * Fixed MySQL (and `myisamchk') crash on artificially corrupted
   `.MYI' files.

 * Don't allow `BACKUP TABLE' to overwrite existing files.

 * Fixed a bug with multi-table `UPDATE's when user had all privileges
   on the database where tables are located and there were any
   entries in `tables_priv' table, i.e. `grant_option' was true.

 * Fixed a bug that allowed a user with table or column grants on
   some table, `TRUNCATE' any table in the same database.

 * Fixed deadlock when doing `LOCK TABLE' followed by `DROP TABLE' in
   the same thread.  In this case one could still kill the thread
   with `KILL'.

 * `LOAD DATA LOCAL INFILE' was not properly written to the binary
   log (hence not properly replicated). (bug #82).

 * `RAND()' entries were not read correctly by `mysqlbinlog' from the
   binary log which caused problems when restoring a table that was
   inserted with `RAND()'. `INSERT INTO t1 VALUES(RAND())'. In
   replication this worked ok.

 * `SET SQL_LOG_BIN=0' was ignored for `INSERT DELAYED' queries.
   (bug #104).

 * `SHOW SLAVE STATUS' reported too old positions (columns
   `Relay_Master_Log_File' and `Exec_master_log_pos') for the last
   executed statement from the master, if this statement was the
   `COMMIT' of a transaction. The master must be upgraded for that,
   not the slave. (bug #52).

 * `LOAD DATA INFILE' was not replicated by the slave if
   `replicate_*_table' was set on the slave. (bug #86).

 * After `RESET SLAVE', the coordinates displayed by `SHOW SLAVE
   STATUS' looked un-reset (though they were, but only internally).
   (bug #70).

 * Fixed query cache invalidation on `LOAD DATA'.

 * Fixed memory leak on `ANALYZE' procedure with error.

 * Fixed a bug in handling `CHAR(0)' columns that could cause wrong
   results from the query.

 * Fixed rare bug with wrong initialization of `AUTO_INCREMENT'
   column, as a secondary column in a multi-column key (*note
   `AUTO_INCREMENT' on secondary column in a multi-column key:
   example-AUTO_INCREMENT.), when data was inserted with `INSERT ...
   SELECT' or `LOAD DATA' into an empty table.

 * On windows, `STOP SLAVE' didn't stop the slave until the slave got
   one new command from the master (this bug has been fixed for MySQL
   4.0.11 by releasing updated 4.0.11a windows packages, which
   include this individual fix on top of the 4.0.11 sources).
 (bug #69).

 * Fixed a crash when no database was selected and `LOAD DATA' command
   was issued with full table name specified, including database
   prefix.

 * Fixed a crash when shutting down replication on some platforms
   (e.g. Mac OS X).

 * Fixed a portability bug with `pthread_attr_getstacksize' on
   HP-UX 10.20 (Patch was also included in 4.0.11a sources).

 * Fixed the `bigint' test to not fail on some platforms (e.g. HP-UX
   and Tru64) due to different return values of the `atof()' function.

 * Fixed the `rpl_rotate_logs' test to not fail on certain platforms
 

Re: converting an existing column to auto increment

2003-03-18 Thread Liz Buckley-Geer
Thanks for the speedy reply. I will try it out on some test tables.

Liz

On Mon, 17 Mar 2003, Paul DuBois wrote:

 At 18:08 -0600 3/17/03, Liz Buckley-Geer wrote:
 I have an table with a column
 
 numberINT NOT NULL PRIMARY KEY
 
 This table contains many records and there are gaps in the number 
 sequence. I would like to modify this column to use the AUTO 
 INCREMENT feature but I need to preserve the present numbering 
 sequence (which is monotonically increasing) including the holes. It 
 is not clear from the manual or my MySQL book exactly how to do this.
 
 Is this possible? if so what is the correct ALTER TABLE command?
 
 Interesting question.
 
 My tests suggest that, yes, you can do this.  But make sure you backup
 the table first.
 
 The statement I used was
 
 ALTER TABLE tbl_name MODIFY number INT NOT NULL AUTO_INCREMENT;
 
 
 Thanks Liz
 
 
 

-- 


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

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



Re: Fulltext Search Problem

2003-03-18 Thread martin . curmi
Hi Brian,

Sorry, I was mistaken. It does work! The documents in question, were not 
category='sport'.

Regards
Martin







Brian McCain [EMAIL PROTECTED]
18/03/2003 17:23

 
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
cc: 
Subject:Re: Fulltext Search Problem


No, that should work. Do any items in the db have the text 'madrid' in 
them?
Does it fail with an error or does it simply not return any results? Are 
you
executing it on the command line? If not, are you checking for errors? 
What
version of MySQL do you have?

Brian McCain

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 8:33 AM
Subject: Fulltext Search Problem



 Hi,

 Why does this not work?

 SELECT * FROM News WHERE category='sport' AND MATCH
 (subcategory,headline,summary) AGAINST ('madrid') LIMIT 1,25

 If i remove the category='sport' AND from the WHERE clause it works -
yet all
 documents in the db currently have category='sport'. Is it not possible 
to
mix
 a MATCH with another condition?

 Any ideas, or is the only solution to run the first query, store the
results in
 a temp table, and then run a 2nd query.

 Regards
 Martin Curmi



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

 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



mysqladmin processlist = weird in version 4.0.12

2003-03-18 Thread Andrew Braithwaite
Hi all,

Anyone know why mysqladmin processlist is not showing the host that is
connected, but instead is showing the following in v4.0.12:

truncated excerpt
+-+-+--+--+
| Id  | User| Host | db   | Command
+-+-+--+--+
| 530 | fcgi| 146.101.143.72:48753 | multimap | Sleep 
| 536 | fcgi| 146.101.143.72:48139 | multimap | Sleep 
| 545 | fcgi| 146.101.143.72:45618 | multimap | Sleep
| 556 | fcgi| 146.101.143.72:49311 | multimap | Sleep
| 570 | fcgi| 146.101.143.72:40745 | multimap | Sleep


It used to show:

+-+-+---+--+
| Id  | User| Host  | db   | Command
+-+-+---+--+
| 530 | fcgi| host1 | multimap | Sleep 
| 536 | fcgi| host2 | multimap | Sleep 
| 545 | fcgi| host3 | multimap | Sleep
| 556 | fcgi| host2 | multimap | Sleep
| 570 | fcgi| host3 | multimap | Sleep

Any ideas anyone?

Cheers,

Andrew

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



Re: mysqladmin processlist = weird in version 4.0.12

2003-03-18 Thread R. Hannes Niedner
The change log for 4.012 mentions (Lenz Grimmer just posted this a couple of
messages ago):

Functionality added or changed:

 * `SHOW PROCESSLIST' will now include the client TCP port after the
   hostname to make it easier to know from which client the request
   originated.


I guess whenever the hostname lookup fails you just see the IP address.
HTH/h

On 3/18/03 2:36 PM, Andrew Braithwaite [EMAIL PROTECTED] wrote:

 Hi all,
 
 Anyone know why mysqladmin processlist is not showing the host that is
 connected, but instead is showing the following in v4.0.12:
 
 truncated excerpt
 +-+-+--+--+
 | Id  | User| Host | db   | Command
 +-+-+--+--+
 | 530 | fcgi| 146.101.143.72:48753 | multimap | Sleep
 | 536 | fcgi| 146.101.143.72:48139 | multimap | Sleep
 | 545 | fcgi| 146.101.143.72:45618 | multimap | Sleep
 | 556 | fcgi| 146.101.143.72:49311 | multimap | Sleep
 | 570 | fcgi| 146.101.143.72:40745 | multimap | Sleep
 
 
 It used to show:
 
 +-+-+---+--+
 | Id  | User| Host  | db   | Command
 +-+-+---+--+
 | 530 | fcgi| host1 | multimap | Sleep
 | 536 | fcgi| host2 | multimap | Sleep
 | 545 | fcgi| host3 | multimap | Sleep
 | 556 | fcgi| host2 | multimap | Sleep
 | 570 | fcgi| host3 | multimap | Sleep
 
 Any ideas anyone?
 
 Cheers,
 
 Andrew
 
 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
 


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

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



RE: mysqladmin processlist = weird in version 4.0.12

2003-03-18 Thread Jennifer Goodie
It says in the change log that it added the port to make it easier to see
where the connection is coming from. 146.101.143.72:48753 gives you a lot
more information than host1

From the release announcement --

 * `SHOW PROCESSLIST' will now include the client TCP port after the
   hostname to make it easier to know from which client the request
   originated.

-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: mysqladmin processlist = weird in version 4.0.12


Hi all,

Anyone know why mysqladmin processlist is not showing the host that is
connected, but instead is showing the following in v4.0.12:

truncated excerpt
+-+-+--+--+
| Id  | User| Host | db   | Command
+-+-+--+--+
| 530 | fcgi| 146.101.143.72:48753 | multimap | Sleep
| 536 | fcgi| 146.101.143.72:48139 | multimap | Sleep
| 545 | fcgi| 146.101.143.72:45618 | multimap | Sleep
| 556 | fcgi| 146.101.143.72:49311 | multimap | Sleep
| 570 | fcgi| 146.101.143.72:40745 | multimap | Sleep


It used to show:

+-+-+---+--+
| Id  | User| Host  | db   | Command
+-+-+---+--+
| 530 | fcgi| host1 | multimap | Sleep
| 536 | fcgi| host2 | multimap | Sleep
| 545 | fcgi| host3 | multimap | Sleep
| 556 | fcgi| host2 | multimap | Sleep
| 570 | fcgi| host3 | multimap | Sleep

Any ideas anyone?

Cheers,

Andrew

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



RE: mysqladmin processlist = weird in version 4.0.12

2003-03-18 Thread Andrew Braithwaite
Hi,

I do understand what you're saying and I did read the 4.0.12 changelog and
appreciate the addition of the TCP port in that display, but all the
hostnames in the processlist are displaying as the localhost of the mysql
server that they are connecting to instead of the hostnames of the server
that is connecting.  The /etc/hosts file is fine and is the same as it was
before

Bug or feature?

Cheers,

Andrew

-Original Message-
From: R. Hannes Niedner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday 18 March 2003 22:48
To: Andrew Braithwaite; MySQL Mailinglist
Subject: Re: mysqladmin processlist = weird in version 4.0.12


The change log for 4.012 mentions (Lenz Grimmer just posted this a couple of
messages ago):

Functionality added or changed:

 * `SHOW PROCESSLIST' will now include the client TCP port after the
   hostname to make it easier to know from which client the request
   originated.


I guess whenever the hostname lookup fails you just see the IP address.
HTH/h

On 3/18/03 2:36 PM, Andrew Braithwaite [EMAIL PROTECTED] wrote:

 Hi all,
 
 Anyone know why mysqladmin processlist is not showing the host that 
 is connected, but instead is showing the following in v4.0.12:
 
 truncated excerpt
 +-+-+--+--+
 | Id  | User| Host | db   | Command
 +-+-+--+--+
 | 530 | fcgi| 146.101.143.72:48753 | multimap | Sleep
 | 536 | fcgi| 146.101.143.72:48139 | multimap | Sleep
 | 545 | fcgi| 146.101.143.72:45618 | multimap | Sleep
 | 556 | fcgi| 146.101.143.72:49311 | multimap | Sleep
 | 570 | fcgi| 146.101.143.72:40745 | multimap | Sleep
 
 
 It used to show:
 
 +-+-+---+--+
 | Id  | User| Host  | db   | Command
 +-+-+---+--+
 | 530 | fcgi| host1 | multimap | Sleep
 | 536 | fcgi| host2 | multimap | Sleep
 | 545 | fcgi| host3 | multimap | Sleep
 | 556 | fcgi| host2 | multimap | Sleep
 | 570 | fcgi| host3 | multimap | Sleep
 
 Any ideas anyone?
 
 Cheers,
 
 Andrew
 
 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
 

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

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



Re: access-myodbc-interruption_mode?

2003-03-18 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] schrieb:
access-2000
w2k-prof/xp-prof via
myodbc 3.51
different mysql-servers (win-lin)


everywhere the same, including win9x


if i leave ms-access longer than 25 minutes alone with mysql via myodbc 
3.51
i cannot close ms-access:

- free translation:
this procedure will put the current code back into the interruption 
mode. would you like to stop the execution of the code?

- german-original:
dieser vorgang wird den aktuellen code in den
unterbrechungsmodus zuruecksetzen. moechten sie die
ausfuehrung des codes anhalten?
i have to kill ms-access with the task-manager!

after 24 minutes, no problems.


seems to happen only while closing the table-window,
closing the  database-window  or closing  access_completely  works sometimes

is this a known problem with
myodbc?
access?
how can i prevent this?


than i can only hope that our boss don´t phone longer than 24 minutes ;-)

thanks and bye

--
shrek-m


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


Re: access-myodbc-interruption_mode?

2003-03-18 Thread Daniel Kasak
[EMAIL PROTECTED] wrote:

hi,

access-2000
w2k-prof/xp-prof via
myodbc 3.51
different mysql-servers (win-lin)


if i leave ms-access longer than 25 minutes alone with mysql via 
myodbc 3.51
i cannot close ms-access:

- free translation:
this procedure will put the current code back into the interruption 
mode. would you like to stop the execution of the code?

- german-original:
dieser vorgang wird den aktuellen code in den
unterbrechungsmodus zuruecksetzen. moechten sie die
ausfuehrung des codes anhalten?
i have to kill ms-access with the task-manager!

after 24 minutes, no problems.

my preferred solution would be:
$killall -9 access.exe
#rpm -e ms-office
#rpm -e windows
is this a known problem with
myodbc?
access?
how can i prevent this?

Search back through the archives of this list and the MyODBC list.
The short answer is that Access is f**ked and will crash when left 
unattended.
I had originally thought that it only affected Access 2002, as Venu 
couldn't reproduce my problem under Access 2000. But apparently not.

One dodgy fix which I've considered but not used is to have a hidden 
form with a timer event which opens an ADO connection to MySQL and 
closes it every 3 minutes. I haven't tested it but since the problem 
only happens when there is no activity between Access and MySQL, I 
assume this will work. Personally I prefer to leave it as is and tell 
everybody to direct their complains to [EMAIL PROTECTED]

I would _strongly_ recommend that if you are working on an original 
database that you close it before walking off to get a coffee. I have 
lost almost a full day's work on several occassions because of this.

If you can be bothered, maybe turn on ODBC logging and send a log in to 
the MyODBC list. However I'm pretty sure the problem is with Access and 
not MySQL / MyODBC. Maybe it's even intended...

--
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: www.nusconsulting.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


Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id), KEY (b_id)

2003-03-18 Thread Daevid Vincent
I wouldn't say I was a newbie at all. I've been coding in PHP, mySQL for
like 6 years now. But I just never learned (or maybe had a reason to) why I
would use KEY (a_id, b_id) rather than KEY (a_id) and KEY (b_id).
Would someone be so kind as to point me at an online tutorial or just
explain what the difference is or what the use of KEY (a_id, b_id), and
does it matter if I reverse them like KEY (b_id, a_id)? I mean, I
understand that the key will be a hybrid of the two columns, but why would
you want that? A friend tried to explain it in the case you have a third
table that is what I call a glue table, but I still don't see how this
works.

CREATE TABLE parent
(
  par_id   INT NOT NULL,
  PRIMARY KEY (par_id)
) TYPE = INNODB;

CREATE TABLE child
(
  par_id   INT NOT NULL,
  child_id  INT NOT NULL,
  PRIMARY KEY (par_id, child_id),
  FOREIGN KEY (par_id) REFERENCES parent (par_id) ON DELETE CASCADE
) TYPE = INNODB;

Btw, I saw this here:
http://165.193.123.40/isapi/product_id~%7B60B19985-0F7B-4E72-88ED-C472616E45
D8%7D/element_id~%7BF31998C7-4725-4997-AB4A-09AC0D03A6B3%7D/st~%7B822202F4-E
865-472D-B32F-BE77D3B7ACE1%7D/content/articlex.asp

Which is a great tutorial on mySQL by Paul Dubois.


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

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



Re: Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id), KEY (b_id)

2003-03-18 Thread Dan Nelson
In the last episode (Mar 18), Daevid Vincent said:
 I wouldn't say I was a newbie at all. I've been coding in PHP, mySQL
 for like 6 years now. But I just never learned (or maybe had a reason
 to) why I would use KEY (a_id, b_id) rather than KEY (a_id) and
 KEY (b_id). Would someone be so kind as to point me at an online
 tutorial or just explain what the difference is or what the use of
 KEY (a_id, b_id), and does it matter if I reverse them like KEY
 (b_id, a_id)? I mean, I understand that the key will be a hybrid of
 the two columns, but why would you want that? A friend tried to
 explain it in the case you have a third table that is what I call a
 glue table, but I still don't see how this works.

Mysql will only use one index for a particular table, so a statement
like SELECT * FROM mytable WHERE a_id=123 AND b_id=345 will be able to
use the compound index to filter to exactly the records you're looking
for.  With two separate indices, it'll use the index with the lowest
cardinality, pull all the matching records, and discard the ones where
the other field doesn't match your criteria.

The field order only matters if you also want to be able to do a query
on a_id.  Mysql will be able to use a KEY (a_id,b_id), but not a
(b_id,a_id) one, since the field it's interested in is not the first
one.  most of the time, you'll end up generating two indexes:
(a_id,b_id), and (b_id).

-- 
Dan Nelson
sql,query
[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: Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id), KEY (b_id)

2003-03-18 Thread Daevid Vincent
Ah ha!

So if I had:

CREATE TABLE `rep_table` (
  `rep_id` smallint(5) unsigned auto_increment,
  `rep_login` varchar(15) NOT NULL default '',
  `rep_password` varchar(15) NOT NULL default '',
  `rep_fname` varchar(255) NOT NULL default '',
  `rep_lname` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`rep_id`)
) TYPE=InnoDB;

I would additionally add a 
  KEY  (`rep_login`,`rep_password`)

Instead of 
  KEY `rep_login` (`rep_login`),
  KEY `rep_password` (`rep_password`)
Or even 
  KEY  (`rep_password`, `rep_login`)

Given that the query would most likely be something like:
SELECT * FROM rep_table WHERE rep_login = '$user' AND rep_password =
'$pass';

And I would never really search for just the password, so the 
KEY `rep_password` (`rep_password`)
Is sorta a useless index?

Furthermore, if I understand correctly, if I did the query like so:
SELECT * FROM rep_table WHERE rep_password = '$pass' AND rep_login =
'$user';
I would NOT get the benefit of the index either since I changed the order of
my search, is that true?

 -Original Message-
 From: Bruce Feist [mailto:[EMAIL PROTECTED] 
   
 
 Here's a close analogy for you.  In a library, fiction books are 
 typically sorted first by author's last name, and then by 
 author's first 
 name.  Think KEY (author_last, author_first).  This makes it fast to 
 find all books by an author with a given last name, and even 
 faster to 
 find all books given the author's first and last names... but 
 it doesn't 
 help if you need to find books by author's first name.
 
 Bruce Feist
 

And Dan wrote: 

 -Original Message-
 From: Dan Nelson [mailto:[EMAIL PROTECTED] 
 
 
 Mysql will only use one index for a particular table, so a statement
 like SELECT * FROM mytable WHERE a_id=123 AND b_id=345 will be able to
 use the compound index to filter to exactly the records you're looking
 for.  With two separate indices, it'll use the index with the lowest
 cardinality, pull all the matching records, and discard the ones where
 the other field doesn't match your criteria.
 
 The field order only matters if you also want to be able to do a query
 on a_id.  Mysql will be able to use a KEY (a_id,b_id), but not a
 (b_id,a_id) one, since the field it's interested in is not the first
 one.  most of the time, you'll end up generating two indexes:
 (a_id,b_id), and (b_id).


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

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



CFLAGS=-march=k6 ?

2003-03-18 Thread Daniel Kasak
Anyone know whether this is a bad idea or not (gcc-2.95.3)?
I previously (MySQL-4.0.5 or so) built a server with -march=k6 which 
seemed to run OK apart from crashing when I did a very particular select 
on one table, but I was never sure whether that was because of a damaged 
table or because of my CFLAGS.
So is it safe?

--
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: www.nusconsulting.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: Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id), KEY (b_id)

2003-03-18 Thread Jeff Kilbride
- Original Message -
From: Daevid Vincent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 4:59 PM
Subject: RE: Please tell me why to use KEY (a_id, b_id) rather than KEY
(a_id), KEY (b_id)


 Ah ha!

 So if I had:

 CREATE TABLE `rep_table` (
   `rep_id` smallint(5) unsigned auto_increment,
   `rep_login` varchar(15) NOT NULL default '',
   `rep_password` varchar(15) NOT NULL default '',
   `rep_fname` varchar(255) NOT NULL default '',
   `rep_lname` varchar(255) NOT NULL default '',
   PRIMARY KEY  (`rep_id`)
 ) TYPE=InnoDB;

 I would additionally add a
   KEY  (`rep_login`,`rep_password`)

 Instead of
   KEY `rep_login` (`rep_login`),
   KEY `rep_password` (`rep_password`)
 Or even
   KEY  (`rep_password`, `rep_login`)

 Given that the query would most likely be something like:
 SELECT * FROM rep_table WHERE rep_login = '$user' AND rep_password =
 '$pass';

 And I would never really search for just the password, so the
 KEY `rep_password` (`rep_password`)
 Is sorta a useless index?

Exactly. There's  a bit of an explanation it the manual here:

http://www.mysql.com/doc/en/Multiple-column_indexes.html

I try to think of it this way: if I have a query that *always* uses more
than one column to search for data, it's a great candidate for a multiple
column index. The user/pass query you have above is a good example. I tend
to use multi-column indexes in reporting queries a lot. In sales reports,
for example, I'm almost always querying by date as well as some other
criteria like sales rep id. Having a multi-column index on (sales_rep_id,
date) would help when searching by sales_rep_id alone, or sales_rep_id and a
date range -- but wouldn't help when searching by date alone. In contrast,
having an index on (date, sales_rep_id) would help searching by date alone,
or date and sales_rep_id -- but not on sales_rep_id alone. The order of the
columns in the index really depends on your particular queries. Another
thing to keep in mind is that if all the columns in your query exist in the
index, then mysql can use *just* the index to return the data -- which means
it never even has to open the table. That can be a great optimization for
big tables with lots of columns.

 Furthermore, if I understand correctly, if I did the query like so:
 SELECT * FROM rep_table WHERE rep_password = '$pass' AND rep_login =
 '$user';
 I would NOT get the benefit of the index either since I changed the order
of
 my search, is that true?


No, the mysql query optimizer is smart enough to figure this out. To see it
working, you can always use the EXPLAIN keyword:

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

EXPLAIN will show you which index is being used for your SELECT statement
(or if no index is being used...). Invaluable when trying to optimize your
SELECTs.

--jeff

  -Original Message-
  From: Bruce Feist [mailto:[EMAIL PROTECTED]
  
  
  Here's a close analogy for you.  In a library, fiction books are
  typically sorted first by author's last name, and then by
  author's first
  name.  Think KEY (author_last, author_first).  This makes it fast to
  find all books by an author with a given last name, and even
  faster to
  find all books given the author's first and last names... but
  it doesn't
  help if you need to find books by author's first name.
 
  Bruce Feist
 

 And Dan wrote:

  -Original Message-
  From: Dan Nelson [mailto:[EMAIL PROTECTED]
 
 
  Mysql will only use one index for a particular table, so a statement
  like SELECT * FROM mytable WHERE a_id=123 AND b_id=345 will be able to
  use the compound index to filter to exactly the records you're looking
  for.  With two separate indices, it'll use the index with the lowest
  cardinality, pull all the matching records, and discard the ones where
  the other field doesn't match your criteria.
 
  The field order only matters if you also want to be able to do a query
  on a_id.  Mysql will be able to use a KEY (a_id,b_id), but not a
  (b_id,a_id) one, since the field it's interested in is not the first
  one.  most of the time, you'll end up generating two indexes:
  (a_id,b_id), and (b_id).


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

 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



link error with MyODBC 3.51 on Mac OS X

2003-03-18 Thread Robert van Engelen
Hi,

I found a problem with your binary distribution of MyODBC 3.51 for Mac 
OS X.

I downloaded the binary distribution of MyODBC 3.51 for Mac OS X (I am
currently using Mac OS X 10.2.4 Darwin 6.4). When I tried to use iODBC
I got a dynamic linking problem. More specifically, when running
odbctest, I get:
dyld errors during link edit for file
/Users/mysqldev/venu/local/mysql/lib/mysql/libmysqlclient.10.dylib
dyld: odbctest version mismatch for library:
/Users/mysqldev/venu/local/mysql/lib/mysql/libmysqlclient.10.dylib
(compatibility version of user: 11.0.0 greater than library's version:
4.0.0)
So I checked your driver with otool:

otool -LD libmyodbc3.so
libmyodbc3.so:
 /Users/mysqldev/venu/local/lib/libiodbcinst.2.dylib
(compatibility version 4.0.0, current version 4.6.0)
/Users/mysqldev/venu/local/mysql/lib/mysql/libmysqlclient.10.dylib
(compatibility version 11.0.0, current version 11.0.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 63.0.0)
So at this point I am stuck (unless I rebuild the driver).

I would really appreciate your feedback on this issue. Is there any
quick solution to this problem?
Thanks for this otherwise excellent product!

- Robert van Engelen,

--
Robert van Engelen: Assistant Professor, Computer Science Department
Florida State University, 253 J. Love Bldg., Tallahassee, FL32306-4530
Offices: 162LOV/471DSL, (850)644-9661/645-0309, Fax: (850)644-0058
Email: [EMAIL PROTECTED], URL: http://www.cs.fsu.edu/~engelen
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id),KEY (b_id)

2003-03-18 Thread Bruce Feist
Daevid Vincent wrote:

So if I had:

CREATE TABLE `rep_table` (
 `rep_id` smallint(5) unsigned auto_increment,
 `rep_login` varchar(15) NOT NULL default '',
 `rep_password` varchar(15) NOT NULL default '',
 `rep_fname` varchar(255) NOT NULL default '',
 `rep_lname` varchar(255) NOT NULL default '',
 PRIMARY KEY  (`rep_id`)
) TYPE=InnoDB;
I would additionally add a 
 KEY  (`rep_login`,`rep_password`)

Instead of 
 KEY `rep_login` (`rep_login`),
 KEY `rep_password` (`rep_password`)

Precisely!

Or even 
 KEY  (`rep_password`, `rep_login`)

This would actually be just as good if you were doing a lookup on both
fields.
Given that the query would most likely be something like:
SELECT * FROM rep_table WHERE rep_login = '$user' AND rep_password =
'$pass';
And I would never really search for just the password, so the 
KEY `rep_password` (`rep_password`)
Is sorta a useless index?

Yes.

Furthermore, if I understand correctly, if I did the query like so:
SELECT * FROM rep_table WHERE rep_password = '$pass' AND rep_login =
'$user';
I would NOT get the benefit of the index either since I changed the order of
my search, is that true?
Almost certainly *not*.  Most RDBMSs have optimizers good enough to
realize that the order of the conditions is irrelevant.  I assume that
this is true of MySql.  But, I'm a newcomer to MySql, and I could be wrong.
Bruce Feist



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


Strange problem on the difference of mysql connection between cgi and shell

2003-03-18 Thread Liu Haifeng
Hi,

I am coding a cgi program to query the records from the mysql tables.  When
I execute the sql query (which is a join operation on two tables) in the
mysql shell, the results are shown correctly.  However, if I use cgi script
to execute the same query, the web browser just crashed after a while (5 or
6 minutes which is the same as the query execution time ).   I am guessing
the problem is relevant to the larger result (more than 10,000 records),
because if I execute the query against another two tables which have the
same structure but contain the less records, both cgi script and shell
method can work.

So anybody can help me figure out the problem?  I have adjusted the
configuration of mysqld to be a huge one but still failed.

Regards
Haifeng Liu


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

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 using wrong indexing keys

2003-03-18 Thread Steve Quezadas
I am running this query that is awfully slow. It's a simple query 
between two heap tables with two joins.  I ran a explain statement to 
see why it is running so slow and realized that  mysql was using 
indexing for one of the lesser inefficient joins! I fixed this problem 
by adding a STRAIGHT_JOIN to the SQL statement. However, this seems 
kinda inelegant. Is there a way to specifically specify which index to 
use in the join? I looked it up on google and there seems to be a USE 
KEY command which forces mysql to use a particular index. However, it 
does not seemed to be supported in MySQL 3.2.3 .

Any other thing that can help me besides STRAIGHT_JOIN?

- 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


Fw: problem about bulk insertion

2003-03-18 Thread Hu Qinan
Dear all, 

I intend to write a large volume of records to a table tbl. 

tbl:
fld1, int unsigned not null auto_increment primary key,
fld2, text
fld3, text

The combination of (fld2, fld3) should be be unique, so I need to check for duplicates 
every time when a record is added. 
--Question1: How to speed up insertions to this table in MySQL? 

To speed up the insertion, I try to write all records (with duplicates of fld_2 and 
fld_3) into a temporary table.
 CREATE TEMPORARY TABLE T (
ID INT UNSIGNED NOT NULL AUTO_INCREMENT, 
fld2 TEXT
fld3 TEXT);

Then I try to select distinct fld2 and fld3 from the temproary table. And then insert 
them into tbl.
INSERT INTO tbl SELECT DISTINCT fld1, fld2 FROM T;
But it does not work, since the column counts do not match.

I try to use 
INSERT INTO tbl SELECT DISTINCT * FROM T;
But since all IDs are distinct, all records in T will be inserted into tbl.
--Question2: How to insert records with distinct (fld2 and fld3) into tbl in MySQL?

Thanks a lot.


Re: mysql using wrong indexing keys

2003-03-18 Thread Paul DuBois
At 22:23 -0800 3/18/03, Steve Quezadas wrote:
I am running this query that is awfully slow. It's a simple query 
between two heap tables with two joins.  I ran a explain statement 
to see why it is running so slow and realized that  mysql was using 
indexing for one of the lesser inefficient joins! I fixed this 
problem by adding a STRAIGHT_JOIN to the SQL statement. However, 
this seems kinda inelegant. Is there a way to specifically specify 
which index to use in the join? I looked it up on google and there 
seems to be a USE KEY command which forces mysql to use a 
particular index. However, it does not seemed to be supported in 
MySQL 3.2.3 .

Any other thing that can help me besides STRAIGHT_JOIN?
I'm not sure what you mean by 3.2.3; there is no such version.

USE INDEX/IGNORE INDEX were implemented in 3.23.12.

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


Re: Fw: problem about bulk insertion

2003-03-18 Thread Daniel Kasak
Hu Qinan wrote:

Dear all, 

I intend to write a large volume of records to a table tbl. 

tbl:
fld1, int unsigned not null auto_increment primary key,
fld2, text
fld3, text

The combination of (fld2, fld3) should be be unique, so I need to check for 
duplicates every time when a record is added. 
--Question1: How to speed up insertions to this table in MySQL? 

To speed up the insertion, I try to write all records (with duplicates of fld_2 and 
fld_3) into a temporary table.
 CREATE TEMPORARY TABLE T (
ID INT UNSIGNED NOT NULL AUTO_INCREMENT, 
fld2 TEXT
fld3 TEXT);

Then I try to select distinct fld2 and fld3 from the temproary table. And then insert 
them into tbl.
INSERT INTO tbl SELECT DISTINCT fld1, fld2 FROM T;
But it does not work, since the column counts do not match.

I try to use 
INSERT INTO tbl SELECT DISTINCT * FROM T;
But since all IDs are distinct, all records in T will be inserted into tbl.
--Question2: How to insert records with distinct (fld2 and fld3) into tbl in MySQL?
  

If the number / order of columns differs, you have to specify them.
It should be:

insert into tbl (fld2, fld3) select distinct fld2, fld3 from T;

-- 
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: www.nusconsulting.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



Trouble upgrading to 4.0 on Mandrake Linux

2003-03-18 Thread Hal Vaughan
I am running Mandrake Linux 8.2, with the RPMs upgraded to 9.0.  It had MySQL 
3.23 running on it.

I downloaded the current version of 4.0 from mysql.com tonight and isntalled 
it.  I changed the old files from /usr/share/mysql to /usr/share/mysql3.23 
and /var/lib/mysql to /var/lib/mysql3.23 (where the databases are stored).

I created a new /usr/share/mysql and unpacked the MySQL 4.0.x tarball into the 
directory, then followed the install instructions (basically changing 
/usr/local/ to /usr/share/ in bin/mysqlaccess and running 
scripts/mysql_install_db).  I copied the 4.0 executables to /usr/bin (which I 
did without thinking -- realizing I forgot to backup the original 3.23 
binaries in that directory -- my big mistake).

Now when I type

mysqld_safe --user=mysql 

the daemon starts, but I get another message almost immediately that it is 
exiting.

What's wrong and what do I need to do to get 4.0 working?  Why is the daemon 
quitting on me?

Is anyone else using Mandrake and encountering similar problems?

Thanks!

Hal

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

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



Re: Trouble upgrading to 4.0 on Mandrake Linux

2003-03-18 Thread Daniel Kasak
Hal Vaughan wrote:

I am running Mandrake Linux 8.2, with the RPMs upgraded to 9.0.  It had MySQL 
3.23 running on it.

I downloaded the current version of 4.0 from mysql.com tonight and isntalled 
it.  I changed the old files from /usr/share/mysql to /usr/share/mysql3.23 
and /var/lib/mysql to /var/lib/mysql3.23 (where the databases are stored).

I created a new /usr/share/mysql and unpacked the MySQL 4.0.x tarball into the 
directory, then followed the install instructions (basically changing 
/usr/local/ to /usr/share/ in bin/mysqlaccess and running 
scripts/mysql_install_db).  I copied the 4.0 executables to /usr/bin (which I 
did without thinking -- realizing I forgot to backup the original 3.23 
binaries in that directory -- my big mistake).

Now when I type

mysqld_safe --user=mysql 

the daemon starts, but I get another message almost immediately that it is 
exiting.

What's wrong and what do I need to do to get 4.0 working?  Why is the daemon 
quitting on me?

Is anyone else using Mandrake and encountering similar problems?

Thanks!

Hal
 

There should be an error log. I'm not sure where it goes for a binary 
installation.
Mine is /usr/local/mysql/var/hostname.err
Maybe in /var/lib/mysql somewhere
Anyway, look for your_hostname.err somewhere.
Probably you don't have directory permissions set up properly. See the 
INSTALL-SOURCE file for details of how to set the permissions. It's 
around 20-30% through the file.

--
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: www.nusconsulting.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


RH8 PHP + mySQL not working

2003-03-18 Thread Kelvin Kline
on RedHat 8 installed php-4.2.2-8.0.5.i386.rpm And
php-mysql4.2.2-8.0.5.i386.rpm
but php says undefined function mysql_connect()

Is it worth uninstalling 5 and installing
php-4.2.2-8.0.7.i386.rpm  etc?

I gets weary of all dese Linux version suffices


?php
phpinfo();
?
shows Configure Command has
this...'--with-mysql=shared,/usr' ...

I dont know where mysql is installed
one can see mysql  in /usr/bin862.6k program
mysqladmin in /usr/bin
and mysqld in /usr/lib3.7M program

do I need to do the compile thing? I much prefer rpm,
because almost every make I touch  breaks...

kelvinq


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.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



RH8 PHP + mySQL and the obvious answer is: restart httpd

2003-03-18 Thread Kelvin Kline
obvious fix PHP does work with rpms,
just remember to restart mysql  httpd (what was wrong
with the name Apache?)

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.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



This query shouldn't be wrong, but mysql says it is???

2003-03-18 Thread Lai
Hi.

Here is my table design, my query and the error:

mysql describe poor;
+++--+-+-++
| Field  | Type   | Null | Key | Default | Extra  |
+++--+-+-++
| cc | char(2) binary |  | | ||
| width  | int(1) | YES  | | NULL||
| height | int(1) | YES  | | NULL||
| data   | blob   | YES  | | NULL||
| id | int(11)|  | PRI | NULL| auto_increment |
| target | int(11)| YES  | | NULL||
+++--+-+-++

mysql describe pindex;
+--++--+-+-++
| Field| Type   | Null | Key | Default | Extra  |
+--++--+-+-++
| cc   | char(2) binary | YES  | | NULL||
| count| int(11)| YES  | | NULL||
| contourc | blob   | YES  | | NULL||
| contourv | blob   | YES  | | NULL||
| densityc | blob   | YES  | | NULL||
| densityv | blob   | YES  | | NULL||
| id   | int(11)|  | PRI | NULL| auto_increment |
+--++--+-+-+
mysql update poor, pindex set poor.target=pindex.id where poor.cc=pindex.cc;
ERROR 1064: You have an error in your SQL syntax near ' pindex set 
poor.target=pindex.id where poor.cc=pindex.cc' at line 1

My query is almost exact as the example in mysql document. What is wrong with it?

Thanks.


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

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



Re: This query shouldn't be wrong, but mysql says it is???

2003-03-18 Thread Liu Haifeng
You cannot use update on two tables.  Check the mysql manual on syntax of
update.

Haifeng


- Original Message -
From: Lai [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 1:43 PM
Subject: This query shouldn't be wrong, but mysql says it is???


 Hi.

 Here is my table design, my query and the error:

 mysql describe poor;
 +++--+-+-++
 | Field  | Type   | Null | Key | Default | Extra  |
 +++--+-+-++
 | cc | char(2) binary |  | | ||
 | width  | int(1) | YES  | | NULL||
 | height | int(1) | YES  | | NULL||
 | data   | blob   | YES  | | NULL||
 | id | int(11)|  | PRI | NULL| auto_increment |
 | target | int(11)| YES  | | NULL||
 +++--+-+-++

 mysql describe pindex;
 +--++--+-+-++
 | Field| Type   | Null | Key | Default | Extra  |
 +--++--+-+-++
 | cc   | char(2) binary | YES  | | NULL||
 | count| int(11)| YES  | | NULL||
 | contourc | blob   | YES  | | NULL||
 | contourv | blob   | YES  | | NULL||
 | densityc | blob   | YES  | | NULL||
 | densityv | blob   | YES  | | NULL||
 | id   | int(11)|  | PRI | NULL| auto_increment |
 +--++--+-+-+
 mysql update poor, pindex set poor.target=pindex.id where
poor.cc=pindex.cc;
 ERROR 1064: You have an error in your SQL syntax near ' pindex set
poor.target=pindex.id where poor.cc=pindex.cc' at line 1

 My query is almost exact as the example in mysql document. What is wrong
with it?

 Thanks.


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

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




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

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



access primitives in php

2003-03-18 Thread Joel Rees
We need to set up some primitives in php for mysql, then repeat for
postgresql, so that we bury most of the differences in the primitives.
I'm pretty sure I can do this myself, but would like to avoid
re-inventing the entire wheel, if possible.

I know I'm asking for a handout here, but my searching skills seem weak
this week. Anyone know of some good tutorial material on the subject?

(I am not interested in arguments about which is better, by the way. The
requirements of the current project specify that we do both.)

-- 
Joel Rees [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: This query shouldn't be wrong, but mysql says it is???

2003-03-18 Thread Paul DuBois
At 22:43 -0700 3/18/03, Lai wrote:
Hi.

Here is my table design, my query and the error:

mysql describe poor;
+++--+-+-++
| Field  | Type   | Null | Key | Default | Extra  |
+++--+-+-++
| cc | char(2) binary |  | | ||
| width  | int(1) | YES  | | NULL||
| height | int(1) | YES  | | NULL||
| data   | blob   | YES  | | NULL||
| id | int(11)|  | PRI | NULL| auto_increment |
| target | int(11)| YES  | | NULL||
+++--+-+-++
mysql describe pindex;
+--++--+-+-++
| Field| Type   | Null | Key | Default | Extra  |
+--++--+-+-++
| cc   | char(2) binary | YES  | | NULL||
| count| int(11)| YES  | | NULL||
| contourc | blob   | YES  | | NULL||
| contourv | blob   | YES  | | NULL||
| densityc | blob   | YES  | | NULL||
| densityv | blob   | YES  | | NULL||
| id   | int(11)|  | PRI | NULL| auto_increment |
+--++--+-+-+
mysql update poor, pindex set poor.target=pindex.id where poor.cc=pindex.cc;
ERROR 1064: You have an error in your SQL syntax near ' pindex set 
poor.target=pindex.id where poor.cc=pindex.cc' at line 1

My query is almost exact as the example in mysql document. What is 
wrong with it?
Your version of MySQL, very likely.  What is it?

Thanks.


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


RE: mysqladmin processlist = weird in version 4.0.12

2003-03-18 Thread Andrew Braithwaite
Anyone else notice this, or is it just me?

Andrew

-Original Message-
From: Andrew Braithwaite 
Sent: Tuesday 18 March 2003 23:05
To: 'R. Hannes Niedner'; MySQL Mailinglist
Subject: RE: mysqladmin processlist = weird in version 4.0.12


Hi,

I do understand what you're saying and I did read the 4.0.12 changelog and
appreciate the addition of the TCP port in that display, but all the
hostnames in the processlist are displaying as the localhost of the mysql
server that they are connecting to instead of the hostnames of the server
that is connecting.  The /etc/hosts file is fine and is the same as it was
before

Bug or feature?

Cheers,

Andrew

-Original Message-
From: R. Hannes Niedner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday 18 March 2003 22:48
To: Andrew Braithwaite; MySQL Mailinglist
Subject: Re: mysqladmin processlist = weird in version 4.0.12


The change log for 4.012 mentions (Lenz Grimmer just posted this a couple of
messages ago):

Functionality added or changed:

 * `SHOW PROCESSLIST' will now include the client TCP port after the
   hostname to make it easier to know from which client the request
   originated.


I guess whenever the hostname lookup fails you just see the IP address.
HTH/h

On 3/18/03 2:36 PM, Andrew Braithwaite [EMAIL PROTECTED] wrote:

 Hi all,
 
 Anyone know why mysqladmin processlist is not showing the host that
 is connected, but instead is showing the following in v4.0.12:
 
 truncated excerpt
 +-+-+--+--+
 | Id  | User| Host | db   | Command
 +-+-+--+--+
 | 530 | fcgi| 146.101.143.72:48753 | multimap | Sleep
 | 536 | fcgi| 146.101.143.72:48139 | multimap | Sleep
 | 545 | fcgi| 146.101.143.72:45618 | multimap | Sleep
 | 556 | fcgi| 146.101.143.72:49311 | multimap | Sleep
 | 570 | fcgi| 146.101.143.72:40745 | multimap | Sleep
 
 
 It used to show:
 
 +-+-+---+--+
 | Id  | User| Host  | db   | Command
 +-+-+---+--+
 | 530 | fcgi| host1 | multimap | Sleep
 | 536 | fcgi| host2 | multimap | Sleep
 | 545 | fcgi| host3 | multimap | Sleep
 | 556 | fcgi| host2 | multimap | Sleep
 | 570 | fcgi| host3 | multimap | Sleep
 
 Any ideas anyone?
 
 Cheers,
 
 Andrew
 
 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
 

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

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

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

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



Mysql-max 4.0.12 missing GLIBC 2.2

2003-03-18 Thread Natalino Picone
can anyone tell me why the mysql-max 4.0.12 is not statically linked 
against Glibc 2.2 ? (the standard one is ok)...

Regards
Nat
--
Natalino Picone - [EMAIL PROTECTED]
--
It's a horrible thing to be on top of the world and then to lose it and try 
to get it back.
It's a whole lot harder the second time.
-- 

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


Re: CFLAGS=-march=k6 ?

2003-03-18 Thread Tonu Samuel
On Wed, 2003-03-19 at 03:27, Daniel Kasak wrote:
 Anyone know whether this is a bad idea or not (gcc-2.95.3)?
 I previously (MySQL-4.0.5 or so) built a server with -march=k6 which 
 seemed to run OK apart from crashing when I did a very particular select 
 on one table, but I was never sure whether that was because of a damaged 
 table or because of my CFLAGS.
 So is it safe?

It is safe. At least until you do not hit some compiler bug.

But bad side-effect is that with -march compiler uses non-compatible
optimizations. This code may not work anymore on any other processor.
This is what differs it from -mcpu flag.

If you look into configure scripts of MySQL, you see -march commented
out because same reason.

  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



a conundrum -- php/mysql script

2003-03-18 Thread Nicole Lallande
Dear all,

Have written a wrapper to Christian Novak's excellent biffwriter class 
which writes out excel files based on query to a mysql database.

A for loop, $zz=1; $zz =61; $zz++:
generates the id needed for the WHERE condition:
  $sql = SELECT $arv, DATE_FORMAT(date_rec,'%m-%d-%Y') as nice_date 
from arviContacts WHERE fid=$zz;

which is then passed to a function writeARV($sql);
which then loops through the database for all data pertaining to that 
id,  ($numoffields=mysql_num_fields($result);)
opens a file,
writes out the column heads and then
loops through the data and parses into an excel file.  

1.  The counter is being incremented correctly,
2.  all the files are created correctly,
3.  all the column heads are generated correctly
4.  and the data for  4 specific files do NOT get written in.  
5.  The file id numbers are 47,49,51 and 57 (all odd numbers but only 3 
are in sequence)
6.  These files are generated with NO DATA while all the other files are 
generated with the data.  
7.  If I explicity change the counter to one of these numbers and run 
the script singly, then these specific files get generated correctly 
WITH all the data.

I do not even know how to begin to debug this which is why I posted to 
both lists -- any pointers? clues?

TIA,

Nicole

--

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766



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