Sql Query

2002-07-09 Thread Jenny Christy

Hello all,

I wud like to know one query by which i can
copy/create the same table from existing table.

Rgds,
Jenny

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

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

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




Re: Sql Query

2002-07-09 Thread Roger Baklund

* Jenny Christy 
 I wud like to know one query by which i can
 copy/create the same table from existing table.

CREATE TABLE newtable SELECT * FROM oldtable

URL: http://www.mysql.com/doc/C/R/CREATE_TABLE.html 

-- 
Roger

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

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




RE: Strange behaviour of mysqld after adding/dropping a column

2002-07-09 Thread Cams Ismael

Hello Sinisa,

have you already found the origin of the problem ? How does the bugs get
fixed - are they solved in patch releases or are they solved in a next
release of the MySQL server ?

Kind regards,
Ismaël 

-Original Message-
From: Sinisa Milivojevic [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 1:43 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Strange behaviour of mysqld after adding/dropping a column


Cams Ismael writes:
 Hello Sinisa,
 
 this has nothing to do with services. I have also tried this without
 creating a service and the result is the same. 
 Normally the services are also stopped automatically when logging of, so I
 don't understand why I should stop it manually. Also I have tested this
 constantly by stopping and restarting the service without rebooting the PC
 (as I described in my bug report), with the same result. So this has
nothing
 to do with services or with rebooting your PC (this was only how I found
the
 bug). In my opinion this is a heavily bug, keeping in mind that restarting
 mysql after dropping/adding a column messes up your database ! Can you
 please check this ?
 
 Kind regards,
 Ismaël

Yes, it looks like a bug.

We shall inspect that.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com

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

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




How to use teh FULLTEXT search?

2002-07-09 Thread jusob

Hello
I have created a table:
CREATE TABLE data (no int auto_increment, topic text, author text, date date, 
description text, file text, note longtext, name varchar(15), password (15), 
folder text, key(no), FULLTEXT(topic,author,description,file,note));

Then, I would like to a FULLTEXT SEARCH in ONE (or 2 or 3) field:
ex: SELECT * FROM data WHERE MATCH(note) AGAINTS(text  to find);
error 1191: can't find FULLTEXT index matching the column list

same problem for MATCH(note,author), by example
That works only when I do MATCH(topic,author,description,file,note), so with 
all the fields in fulltext. But that's not what I would like to do.

When I see the error message, I tried to create an other index:
ALTER TABLE data ADD key(note);
error 1170: BLOB column 'note' used in key specification without a key length

I have the same problem with IN BOOLEAN MODE.
I'm using MySQL 3.23.51

What should I do to use the FULLTEXT search in the desired number of fields?

Thank you for your help
Julien Sobrier

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

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




Known bug or just me? Take II

2002-07-09 Thread Judy Simon

Hi all again,

I've been experimenting and would like to know if there is a known bug in
the std function when used with a group by clause?
I'd like to know if others have found this problem or is it just me:

I have a query without a groupby clause and the avg and std functions work
fine.
I add a group by clause on a field brought in from another table and the avg
still works as expected but the std function returns all 0's.

eg: this works:
select count(Test1000.OID) as N,
avg(Accuracy) as AccAvg, std(Accuracy) as AccStd
from Test1000,ROrders
WHERE ROrders.OID=Test1000.OID
---
N AccAvg AccStd
545 91.3133 13.0047

this does NOT:
select count(Test1000.OID) as N,Language,
avg(Accuracy) as AccAvg,std(Accuracy) as AccStd
from Test1000,ROrders
WHERE ROrders.OID=Test1000.OID
Group by Language

N Language AccAvg AccStd
521 1   91.4302 0.
24 2 87.3846 0.

Any thoughts or referals would be greatly appreciated!


Judy Simon
Webmaster  DB Systems Engineer
NeuroTrax Israel LTD, Shilat,  Israel Tel: +972-8-976-3067   Fax:
+972-8-976-3068

Judy Simon
Webmaster  DB Systems Engineer
NeuroTrax Israel LTD, Shilat,  Israel Tel: +972-8-976-3067   Fax:
+972-8-976-3068
Judy Simon
Webmaster  DB Systems Engineer
NeuroTrax Israel LTD, Shilat,  Israel Tel: +972-8-976-3067   Fax:
+972-8-976-3068


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

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 a M$ Access 2000 db with MySql-front - could not open database error

2002-07-09 Thread Chuck Amadi

Hi all im aware this might not be the correct forum but i believe it's 
the same beast and it should be ansewered quite easily .
I have been creating a M$ Access Front-end database with a MySql 
Back-end that im about to upload onto a ISP that supports Mysql/Php thus 
i have just downloaded MySql-Front . My problem is how does one connect 
to a previously created and complete M$ Access 2000 Database as i have a 
fullt functional Access thatis in my C:\My Documents So i have tried 
various notations in accessing ie Database (S); SEPARTED BY SEMICOLON (;)

C:\My Documents\sps mini utility.mdb; 1st attempt  error as below

# Could not open database 'C:\My Documents\sps mini utility.mdb' - will 
be ignored.

C;My Documents;sps mini utility.mdb; 2nd attempt error as below

# Could not open database '# Could not open database 'C' - will be ignored.
# Could not open database 'My Documents' - will be ignored.
# Could not open database 'sps mini utility.mdb' - will be ignored.

Any pointers welcomed Cheers

-- 
Regards 
Chuck Amadi
ICT Dept Systems Programmer
Rhaglenydd Systemau Adran ICT




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

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




# Could not open database 'C:\My Documents\sps mini utility.mdb' with Mysql-frontI have been creating a M$ Access Front-end database with a MySql Back-end that im about to upload onto a ISP that supports Mysql/Php thus i have just downloaded MySql-Front . My problem is how does one connect to a previously created and complete M$ Access 2000 Database as i have a fullt functional Access thatis in my C:\My Documents So i have tried various notations in accessing ie Database (S); SEPARTED BY SEMICOLON (;)C:\My Documents\sps mini utility.mdb; 1st attempt error as below# Could not open database 'C:\My Documents\sps mini utility.mdb' - will be ignored.C;My Documents;sps mini utility.mdb; 2nd attempt error as below# Could not open database '# Could not open database 'C' - will be ignored.# Could not open database 'My Documents' - will be ignored.# Could not open database 'sps mini utility.mdb' - will be ignored.med Cheers

2002-07-09 Thread chuck amadi

Hi all im aware this might not be the correct forum but i believe it's 
the same beast and it should be ansewered quite easily .
I have been creating a M$ Access Front-end database with a MySql 
Back-end that im about to upload onto a ISP that supports Mysql/Php thus 
i have just downloaded MySql-Front . My problem is how does one connect 
to a previously created and complete M$ Access 2000 Database as i have a 
fullt functional Access thatis in my C:\My Documents So i have tried 
various notations in accessing ie Database (S); SEPARTED BY SEMICOLON (;)

C:\My Documents\sps mini utility.mdb; 1st attempt  error as below

# Could not open database 'C:\My Documents\sps mini utility.mdb' - will 
be ignored.

C;My Documents;sps mini utility.mdb; 2nd attempt error as below

# Could not open database '# Could not open database 'C' - will be ignored.
# Could not open database 'My Documents' - will be ignored.
# Could not open database 'sps mini utility.mdb' - will be ignored.

Any pointers welcomed Cheers

-- 
Regards

Chuck Amadi
ICT Dept Systems Programmer
Rhaglenydd Systemau Adran ICT





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

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




SQL select rows conditional on same select

2002-07-09 Thread Carl Franks

Hi,

I have 2 tables, X and Y.

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

I wish to retrieve the X.id and X.title where X.id=Z
and also the X.id and X.title where (X.id=Y.assoc) when (Y.id=X.id)
but I'm trouble trying to express this as a single SQL statement.
Could someone help me out with this, or at least give me a clue as to how to
think this one through?

In case I haven't explained it very well, I'll describe exactly what I'm
doing.
Z is a product number, and I want to retrieve the (table X) data for product
Z and also the (table X) data for any other products associated with it,
represented by table Y.

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

Thanks,
Carl







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

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




RAID

2002-07-09 Thread Ismael Touama

Hi,

This is my first post...
I'm on redhat 7.2, using apache 1.3.23 (patched)
on a PowerEdge 2500 in RAID 1 and I want to install 
MySQL 3.23.51...
Must I set to configure the --with-raid ?
Do you have good link for documentation ?
I reach for in google...i'm late...

thanx
bbsc
ism

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

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




rand() ... limit by .... my retrivals

2002-07-09 Thread toby -



hi guys

im trying to retrieve 5 record each page from my db

my code iz :


$query_nme = SELECT firstName, lastName, title, summary FROM  ctnt_inf 
where ctnt_id ORDER BY RAND() LIMIT 5;
$query_result_handle_nme = mysql_query ($query_nme)
or die ('qry failed !  DA tbl must xixt in DA db specifyd bov ');



echo(pfont align=RIGHT);

for ($cnt=0; $cnt=5; ++$cnt ) {

 $row_nme = mysql_fetch_row ($query_result_handle_nme);
echo (brbr);

$tID =  $row_id[0];
$tName = $row_nme[0];
echo ( $tID  );
echo ( $tName );

  }  // echo (brbr);

echo(/font/p);


problem:
it only displays firstName n nothing else  though 5 random first names 
but
i guess i'll ve to make seperate query fo each field in the table
or will i 



thnx a million .

toby .


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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

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




RE: RAID

2002-07-09 Thread Simon Green

RAID --with-raid splits tables up to stop size problems or put one table on
more than one disk.
So is not required for hardware raid.

Simon

-Original Message-
From: Ismael Touama [mailto:[EMAIL PROTECTED]]
Sent: 09 July 2002 10:26
To: [EMAIL PROTECTED]
Subject: RAID


Hi,

This is my first post...
I'm on redhat 7.2, using apache 1.3.23 (patched)
on a PowerEdge 2500 in RAID 1 and I want to install 
MySQL 3.23.51...
Must I set to configure the --with-raid ?
Do you have good link for documentation ?
I reach for in google...i'm late...

thanx
bbsc
ism

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

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

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

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




RE: RAID

2002-07-09 Thread Ismael Touama

Ok so it's to emulate it following you explanation.
That's OK, I enter the line (without this option).

thx
bbsc
ism

-Message d'origine-
De : Simon Green [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 9 juillet 2002 11:42
À : 'Ismael Touama'; [EMAIL PROTECTED]
Objet : RE: RAID


RAID --with-raid splits tables up to stop size problems or put one table on
more than one disk.
So is not required for hardware raid.

Simon

-Original Message-
From: Ismael Touama [mailto:[EMAIL PROTECTED]]
Sent: 09 July 2002 10:26
To: [EMAIL PROTECTED]
Subject: RAID


Hi,

This is my first post...
I'm on redhat 7.2, using apache 1.3.23 (patched)
on a PowerEdge 2500 in RAID 1 and I want to install
MySQL 3.23.51...
Must I set to configure the --with-raid ?
Do you have good link for documentation ?
I reach for in google...i'm late...

thanx
bbsc
ism

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

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


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

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




Drop keys does not stop indexes being created

2002-07-09 Thread Archer Barrie

Description
Having followed the instructions in section 5.2.8 to create a table using
LOAD
DATA INFILE *without* its indexes, the indexes are *still* created at the
end 
of the LOAD DATA INFILE statement
How-To-Repeat:
The following shell script demonstrates the problem. There are two directory
listings, before and after the load. In the second one BestGuess.MYI should
be unchanged at 1024 bytes but it isn't because the indexes have been
created even though myisamchk -k 0 has been executed

Script assumes:
/tmp is available
databases are in /usr/local/var (line 1)

start script
MYSQLDIR=/usr/local/var

cat /tmp/bgdata EOF
1|1|'Fordham'|'Emma'|344|'12'|'94'|'7ka3hn5qhtDRbPkJ1uWX/A'|''|1|3|'Lexdon 
Winstree'|'N'
2|1|'Fordham'|'Enoch'|625|'22'|'318'|'Daf1Dt+XH3aq47D8gigWDw'|''|1|3|'Wakefi
eld'|'N'
3|1|'Fordham'|'George'|500|'12'|'164'|'i1L5pD8Q8gI+CFfqkkOWzQ'|''|1|3|'Saffr
on Walden'|'N'
4|1|'Fordham'|'Henry'|548|'14'|'144'|'Md3MtuwgcJtjGs5rKcU8pg'|''|1|3|'Saint
Ives'|'N'
5|1|'Fordham'|'Henry'|209|'3'|'43'|'EpyvpR6wK4tXDCg0dUWThA'|''|1|3|'Edmonton
'|'N'
6|1|'Fordham'|'John'|116|'14'|'7'|'SE1U6ewpSZkU0wA0WRe/pg'|''|1|3|'Cambridge
'|'N'
7|1|'Fordham'|'Lewis'|348|'14'|'68'|'JeHwC7Jnhx6VNFabWRCwQA'|''|1|3|'Linton'
|'N'
8|1|'Fordham'|'Stephen'|268|'6'|'359'|'LS/iLpTXxrfqwlfAVoJdyQ'|''|1|3|'Hatfi
eld Welwyn'|'N'
9|1|'Fordham'|'female'|416|'14'|'89'|'s91dCImO+HeyIy6rXxldGA'|''|1|3|'Newmar
ket'|'N'
10|2|'FOTHERGILL'|'ROBERT'|206|'25'|'289'|'UIOL6Q5/8cMoeA/k/DmlZg'|''|1|3|'E
astWard'|'N'
EOF


mysql -D test EOF
drop table BestGuess;
EOF

mysql -D test EOF
create table BestGuess
  (
  RecordNumber INT UNSIGNED NOT NULL AUTO_INCREMENT,
  ChunkNumber INT UNSIGNED NOT NULL,
  Confirmed VARCHAR( 1 ),
  Surname VARCHAR( 50 ) NOT NULL,
  GivenName VARCHAR( 50 ) NOT NULL,
  AgeAtDeath VARCHAR(50),
  DistrictNumber SMALLINT UNSIGNED NOT NULL,
  District VARCHAR( 50 ) NOT NULL,
  DistrictFlag TINYINT UNSIGNED NOT NULL,
  Volume VARCHAR( 50 ) NOT NULL,
  Page VARCHAR( 50 ) NOT NULL,
  Hash CHAR(22) NOT NULL,
  RecordTypeID TINYINT NOT NULL,
  QuarterNumber SMALLINT NOT NULL,
  PRIMARY KEY (RecordNumber),
  INDEX (ChunkNumber),
  INDEX (Surname(10),GivenName(10),QuarterNumber),
  INDEX (Surname(10),GivenName(10),DistrictNumber),
  INDEX (Surname(10),QuarterNumber),
  INDEX (Surname(10),DistrictNumber),
  INDEX (GivenName(10),QuarterNumber),
  INDEX (Volume,Page,QuarterNumber),
  INDEX (DistrictNumber,QuarterNumber)  
  );
EOF

ls -l $MYSQLDIR/test/BestGuess.M*

mysqladmin flush-tables
myisamchk -k 0 -rq $MYSQLDIR/test/BestGuess

mysql -D test EOF
LOAD DATA INFILE '/tmp/bgdata'
IGNORE
INTO TABLE BestGuess
FIELDS TERMINATED BY '|'
ENCLOSED BY '
(RecordNumber, ChunkNumber,Surname,GivenName,
DistrictNumber,Volume,Page,Hash,
AgeAtDeath,RecordTypeID,QuarterNumber,
District,Confirmed)
EOF

ls -l $MYSQLDIR/test/BestGuess.M*

end script
Fix:
Unknown

Submitter-Id:  barrie
Originator:Barrie Archer
Organization:  
FreeBMD (http://freebmd.rootsweb.com)
MySQL support: none
Synopsis:  drop keys does not inhibit creation of indexes on load
Severity:  serious
Priority:  medium
Category:  mysql
Class: sw-bug
Release:   mysql-3.23.51 (Source distribution)
Server: /usr/local/bin/mysqladmin  Ver 8.23 Distrib 3.23.51, for
unknown-freebsdelf4.2 on i386
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.51
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 5 days 6 hours 7 min 19 sec

Threads: 2  Questions: 2215677  Slow queries: 22  Opens: 300  Flush tables:
16  Open tables: 1 Queries per second avg: 4.880
Environment:

System: FreeBSD sump.inv.thebunker.net 4.2-RELEASE FreeBSD 4.2-RELEASE #0:
Wed Feb  7 18:04:50 GMT 2001
[EMAIL PROTECTED]:/usr/src/sys/compile/SUMP  i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
-r--r--r--  1 root  wheel  1169076 Nov 20  2000 /usr/lib/libc.a
lrwxrwxrwx  1 root  wheel  9 Feb  6  2001 /usr/lib/libc.so - libc.so.4
-r--r--r--  1 root  wheel  559196 Nov 20  2000 /usr/lib/libc.so.4
Configure command: ./configure --with-innodb


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

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:
   

Re: RAID

2002-07-09 Thread Roger Baklund

* Ismael Touama
 This is my first post...
 I'm on redhat 7.2, using apache 1.3.23 (patched)
 on a PowerEdge 2500 in RAID 1 and I want to install
 MySQL 3.23.51...
 Must I set to configure the --with-raid ?

No, this is only if you need support for tables with file size bigger than
your OS can support. See the section on RAID_TYPE on this page:

URL: http://www.mysql.com/doc/C/R/CREATE_TABLE.html 

 Do you have good link for documentation ?

URL: http://www.mysql.com/doc/ 

--
Roger


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

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




Re: RAID

2002-07-09 Thread toby -


ismaeel

Do you have good link for documentation ?


http://www.mysql.com/doc/C/o/Configuring_MySQL.html

good luck

toby .

_
Send and receive Hotmail on your mobile device: http://mobile.msn.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 help

2002-07-09 Thread Yung Nguyen

Hi,
   I am a student, I am due to return for my final year where I must 
complete a final year project. I have decided to develop a JSP website 
connected to a database.

I have installed TomCat and have been recommended to use MySQL. I have 
downloaded MySQL but I would like help on how I would go about getting JSP 
to link up to MySQL so it can access data I create.

Your help will be very much appreciated.

Thanks,

Yungster

===

URL: www.yungster.com
 www.yungster.co.uk
===


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


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

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




RE: mysql primary key question!

2002-07-09 Thread Erick Papadakis

if this interests you at all, i found this yesterday on the evolt.org
mailing list. the gentleman who has put this very useful code basically
suggested that i could base36 my auto_increment IDs. i will leave this
here for those of you who are intersted:

http://www.faqts.com/knowledge_base/view.phtml/aid/17710

i use this in the same table. one of the ID fields is auto_incremented.
when an ID is generated, i calculate the base36 of that number and put it
into my other field which i have to use for my purposes. 

php or mysql should consider putting this code in their language itself,
especially mysql because it can be used for alphanumeric sequences! i
dont know if i am making sense, but my problem is solved. 

hope this helps someone! :)

cheers/erick


--- Carl McNamee [EMAIL PROTECTED] wrote:
 Erick,
 
 We did that very thing here.  Our staff wrote a Unique Record
 Identifier
 (URI) program that was called by the programs that actually put the
 data
 into the database.  The generated URI was then used as the primary key.
 However, I must say up front that this type of thing is fraught with
 problems.  Here are the ones we ran into that I'm aware of.
 1.  Performance can stink.  If you ask the URI generator for each
 record
 things are slow.   We got around this somewhat by figuring out how many
 records a program was working with and requresting a block of URI's. 
 So now
 you have to modify your programs too!
 2.  The URI generator must keep track of the URI's it hands out.  So
 you
 need another database table, and its associated overhead, just to keep
 track
 of this.
 3.  If the system crashes and the URI tables were not updated you could
 start handing out duplicate URI's after the system recovers.  How will
 your
 application handle this?  The database will reject the records assuming
 that
 the URI is your primary key but how do you fix the URI database?
 
 If anyone responds with a better way it would be great if you'd post it
 to
 the mysql list.
 
 Carl McNamee
 Systems Administrator
 Billing Concepts
 (210) 949-7282
 
 -Original Message-
 From: Erick Papadakis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 08, 2002 6:30 AM
 To: mysql
 Subject: mysql primary key question!
 
 
 hello, 
 
 i hope some database guru can help me with this! 
 
 i need to set up an auto_increment field inside mysql. for various
 reasons, the maximum size is 3. but i don't want this to be ONLY
 integers
 because that limits me until 999 numbers only.  since i have all
 flexibility for these three digits or letters, i want to include
 numbers
 and some characters into it as well. e.g.,
 
   m78
   23a
   1pt
   1~8
   !76
  
 ...etc can all be valid keys for me. 
 
 how can i generate such numbers on the fly? if not inside mysql, then
 inside php? AND...be sure that the key so generated has not been used
 before as an id field in my data? 
 
 any ideas would be very welcome! 
 
 thanks very much in advance/erick
 



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

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

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




Re:rand() ... limit by .... my retrivals

2002-07-09 Thread Oliver Six

toby - [EMAIL PROTECTED] wrote on 09.07.2002 11:35:40:

Hi Toby,


hi guys

im trying to retrieve 5 record each page from my db

my code iz :


$query_nme = SELECT firstName, lastName, title, summary FROM  ctnt_inf 
 ^^
I think you should include id, to get the row id

where ctnt_id ORDER BY RAND() LIMIT 5;
   $query_result_handle_nme = mysql_query ($query_nme)
   or die ('qry failed !  DA tbl must xixt in DA db specifyd bov ');



echo(pfont align=RIGHT);

   for ($cnt=0; $cnt=5; ++$cnt ) {

$row_nme = mysql_fetch_row ($query_result_handle_nme);
   echo (brbr);

   $tID =  $row_id[0];
   ^^
If you include id in the query this should read $row_nme[0]

   $tName = $row_nme[0];
   ^^
If you include id in the query this should read $row_nme[1]
You can retrieve the other fields by using an increasing index (i.e. 
$row_nme[2], $row_nme[3]...) 

   echo ( $tID  );
   echo ( $tName );

 }  // echo (brbr);

   echo(/font/p);


problem:
it only displays firstName n nothing else  though 5 random first names 
but
i guess i'll ve to make seperate query fo each field in the table
or will i 



thnx a million .

toby .

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

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


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

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




Read-Only MySQL

2002-07-09 Thread Kristian Koehntopp


I want to create a CD-ROM which contains a copy of MySQL (for 
Windows) and a set of MySQL databases. Is it possible to set up 
a read-only MySQL, that is, a MySQL running from a r/o media?

Kristian


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

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




A bug in BDB ALTER TABLE

2002-07-09 Thread Sinisa Milivojevic


Hi!

Thank you for your test case, thanks to which this bug was solved. 

Full fix will appear in the next 3.23 and 4.0 releases. 

This is a patch :

= sql_table.cc 1.101 vs edited =
*** /tmp/sql_table.cc-1.101-460 Mon Feb 11 12:56:48 2002
--- edited/sql_table.cc Mon Jul  8 22:05:06 2002
***
*** 1652,1658 
  VOID(pthread_mutex_unlock(LOCK_open));
  goto err;
}
! 
thd-proc_info=end;
mysql_update_log.write(thd, thd-query,thd-query_length);
if (mysql_bin_log.is_open())
--- 1652,1662 
  VOID(pthread_mutex_unlock(LOCK_open));
  goto err;
}
! #ifdef HAVE_BERKELEY_DB
!   extern bool berkeley_flush_logs(void);
!   if (old_db_type == DB_TYPE_BERKELEY_DB   berkeley_flush_logs())
! goto err;
! #endif
thd-proc_info=end;
mysql_update_log.write(thd, thd-query,thd-query_length);
if (mysql_bin_log.is_open())


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


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

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




RE: Strange behaviour of mysqld after adding/dropping a column

2002-07-09 Thread Sinisa Milivojevic

Cams Ismael writes:
 Hello Sinisa,
 
 have you already found the origin of the problem ? How does the bugs get
 fixed - are they solved in patch releases or are they solved in a next
 release of the MySQL server ?
 
 Kind regards,
 Ismaël 
 

Sorry to have lost your e-mail.

If that is about BDB , thanks for the test case !!

A fix will come in the next 3.23 and 4.0 releases.

This is a patch:


= sql_table.cc 1.101 vs edited =
*** /tmp/sql_table.cc-1.101-460 Mon Feb 11 12:56:48 2002
--- edited/sql_table.cc Mon Jul  8 22:05:06 2002
***
*** 1652,1658 
  VOID(pthread_mutex_unlock(LOCK_open));
  goto err;
}
! 
thd-proc_info=end;
mysql_update_log.write(thd, thd-query,thd-query_length);
if (mysql_bin_log.is_open())
--- 1652,1662 
  VOID(pthread_mutex_unlock(LOCK_open));
  goto err;
}
! #ifdef HAVE_BERKELEY_DB
!   extern bool berkeley_flush_logs(void);
!   if (old_db_type == DB_TYPE_BERKELEY_DB   berkeley_flush_logs())
! goto err;
! #endif
thd-proc_info=end;
mysql_update_log.write(thd, thd-query,thd-query_length);
if (mysql_bin_log.is_open())



-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


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

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




General query log option in my.cnf?

2002-07-09 Thread Håkon Eriksen


Is there a way of turning on the general query log in the my.cnf file
or do I have to edit the init-script?

Personally, I would very much like to have only one place to set all
the configuration options (preferrably my.cnf). Setting datadir and
other options both in the my.cnf file and the init-script seems to me
like a great way of obfuscating the system setup.

-- 
 - håkon

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

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




RE: Strange behaviour of mysqld after adding/dropping a column

2002-07-09 Thread Cams Ismael

Hello Sinisa,

the problem I had was that after I restarted mysqld (after have
dropped/added a column) my data was dissapeared. So if you meant this
problem I am indeed the right person.

How do I apply this patch ? 

Kind regards,
Ismaël

-Original Message-
From: Sinisa Milivojevic [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 3:02 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Strange behaviour of mysqld after adding/dropping a column


Cams Ismael writes:
 Hello Sinisa,
 
 have you already found the origin of the problem ? How does the bugs get
 fixed - are they solved in patch releases or are they solved in a next
 release of the MySQL server ?
 
 Kind regards,
 Ismaël 
 

Sorry to have lost your e-mail.

If that is about BDB , thanks for the test case !!

A fix will come in the next 3.23 and 4.0 releases.

This is a patch:


= sql_table.cc 1.101 vs edited =
*** /tmp/sql_table.cc-1.101-460 Mon Feb 11 12:56:48 2002
--- edited/sql_table.cc Mon Jul  8 22:05:06 2002
***
*** 1652,1658 
  VOID(pthread_mutex_unlock(LOCK_open));
  goto err;
}
! 
thd-proc_info=end;
mysql_update_log.write(thd, thd-query,thd-query_length);
if (mysql_bin_log.is_open())
--- 1652,1662 
  VOID(pthread_mutex_unlock(LOCK_open));
  goto err;
}
! #ifdef HAVE_BERKELEY_DB
!   extern bool berkeley_flush_logs(void);
!   if (old_db_type == DB_TYPE_BERKELEY_DB   berkeley_flush_logs())
! goto err;
! #endif
thd-proc_info=end;
mysql_update_log.write(thd, thd-query,thd-query_length);
if (mysql_bin_log.is_open())



-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com

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

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




Re: Drop keys does not stop indexes being created

2002-07-09 Thread Gerald Clark

You check index files, not table names.
myisamchk -k 0 -rq $MYSQLDIR/test/BestGuess.MYI



Archer Barrie wrote:

Description

Having followed the instructions in section 5.2.8 to create a table using
LOAD
DATA INFILE *without* its indexes, the indexes are *still* created at the
end 
of the LOAD DATA INFILE statement

How-To-Repeat:

The following shell script demonstrates the problem. There are two directory
listings, before and after the load. In the second one BestGuess.MYI should
be unchanged at 1024 bytes but it isn't because the indexes have been
created even though myisamchk -k 0 has been executed

Script assumes:
/tmp is available
databases are in /usr/local/var (line 1)

start script
MYSQLDIR=/usr/local/var

cat /tmp/bgdata EOF
1|1|'Fordham'|'Emma'|344|'12'|'94'|'7ka3hn5qhtDRbPkJ1uWX/A'|''|1|3|'Lexdon 
Winstree'|'N'
2|1|'Fordham'|'Enoch'|625|'22'|'318'|'Daf1Dt+XH3aq47D8gigWDw'|''|1|3|'Wakefi
eld'|'N'
3|1|'Fordham'|'George'|500|'12'|'164'|'i1L5pD8Q8gI+CFfqkkOWzQ'|''|1|3|'Saffr
on Walden'|'N'
4|1|'Fordham'|'Henry'|548|'14'|'144'|'Md3MtuwgcJtjGs5rKcU8pg'|''|1|3|'Saint
Ives'|'N'
5|1|'Fordham'|'Henry'|209|'3'|'43'|'EpyvpR6wK4tXDCg0dUWThA'|''|1|3|'Edmonton
'|'N'
6|1|'Fordham'|'John'|116|'14'|'7'|'SE1U6ewpSZkU0wA0WRe/pg'|''|1|3|'Cambridge
'|'N'
7|1|'Fordham'|'Lewis'|348|'14'|'68'|'JeHwC7Jnhx6VNFabWRCwQA'|''|1|3|'Linton'
|'N'
8|1|'Fordham'|'Stephen'|268|'6'|'359'|'LS/iLpTXxrfqwlfAVoJdyQ'|''|1|3|'Hatfi
eld Welwyn'|'N'
9|1|'Fordham'|'female'|416|'14'|'89'|'s91dCImO+HeyIy6rXxldGA'|''|1|3|'Newmar
ket'|'N'
10|2|'FOTHERGILL'|'ROBERT'|206|'25'|'289'|'UIOL6Q5/8cMoeA/k/DmlZg'|''|1|3|'E
astWard'|'N'
EOF


mysql -D test EOF
drop table BestGuess;
EOF

mysql -D test EOF
create table BestGuess
  (
  RecordNumber INT UNSIGNED NOT NULL AUTO_INCREMENT,
  ChunkNumber INT UNSIGNED NOT NULL,
  Confirmed VARCHAR( 1 ),
  Surname VARCHAR( 50 ) NOT NULL,
  GivenName VARCHAR( 50 ) NOT NULL,
  AgeAtDeath VARCHAR(50),
  DistrictNumber SMALLINT UNSIGNED NOT NULL,
  District VARCHAR( 50 ) NOT NULL,
  DistrictFlag TINYINT UNSIGNED NOT NULL,
  Volume VARCHAR( 50 ) NOT NULL,
  Page VARCHAR( 50 ) NOT NULL,
  Hash CHAR(22) NOT NULL,
  RecordTypeID TINYINT NOT NULL,
  QuarterNumber SMALLINT NOT NULL,
  PRIMARY KEY (RecordNumber),
  INDEX (ChunkNumber),
  INDEX (Surname(10),GivenName(10),QuarterNumber),
  INDEX (Surname(10),GivenName(10),DistrictNumber),
  INDEX (Surname(10),QuarterNumber),
  INDEX (Surname(10),DistrictNumber),
  INDEX (GivenName(10),QuarterNumber),
  INDEX (Volume,Page,QuarterNumber),
  INDEX (DistrictNumber,QuarterNumber)  
  );
EOF

ls -l $MYSQLDIR/test/BestGuess.M*

mysqladmin flush-tables
myisamchk -k 0 -rq $MYSQLDIR/test/BestGuess

mysql -D test EOF
LOAD DATA INFILE '/tmp/bgdata'
IGNORE
INTO TABLE BestGuess
FIELDS TERMINATED BY '|'
ENCLOSED BY '
(RecordNumber, ChunkNumber,Surname,GivenName,
DistrictNumber,Volume,Page,Hash,
AgeAtDeath,RecordTypeID,QuarterNumber,
District,Confirmed)
EOF

ls -l $MYSQLDIR/test/BestGuess.M*

end script

Fix:

Unknown

Submitter-Id: barrie
Originator:   Barrie Archer
Organization:  

FreeBMD (http://freebmd.rootsweb.com)

MySQL support: none
Synopsis: drop keys does not inhibit creation of indexes on load
Severity: serious
Priority: medium
Category: mysql
Class:sw-bug
Release:  mysql-3.23.51 (Source distribution)
Server: /usr/local/bin/mysqladmin  Ver 8.23 Distrib 3.23.51, for

unknown-freebsdelf4.2 on i386
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 3.23.51
Protocol version   10
Connection Localhost via UNIX socket
UNIX socket/tmp/mysql.sock
Uptime:5 days 6 hours 7 min 19 sec

Threads: 2  Questions: 2215677  Slow queries: 22  Opens: 300  Flush tables:
16  Open tables: 1 Queries per second avg: 4.880

Environment:

   
System: FreeBSD sump.inv.thebunker.net 4.2-RELEASE FreeBSD 4.2-RELEASE #0:
Wed Feb  7 18:04:50 GMT 2001
[EMAIL PROTECTED]:/usr/src/sys/compile/SUMP  i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
-r--r--r--  1 root  wheel  1169076 Nov 20  2000 /usr/lib/libc.a
lrwxrwxrwx  1 root  wheel  9 Feb  6  2001 /usr/lib/libc.so - libc.so.4
-r--r--r--  1 root  wheel  559196 Nov 20  2000 /usr/lib/libc.so.4
Configure command: ./configure --with-innodb


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

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




choice of field types and performance

2002-07-09 Thread Marko Djukic

what is generally better to use:
- one field of type 'set' (eg.: 'apples','cherries','pears','bananas')
- or multiple fields of type true/false for each value above?

just to make sure, mysql doesn't store each value selected in the set in each record? 
or does it?

thanks,

marko

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

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

2002-07-09 Thread Tang, Lianhong

Hi guys,
I am trying to install MySql on Linux (Mandrake 8). And everytime 
when I try to start the server. like this
[mysql@127 support-files]# ./mysql.server start
I get the message like:
./mysql.server: @hostname@ command not found
 ./mysql.server: my_print_defaults command not found
[mysql@127 support-files]# Starting mysqld daemon with database 
from  /usr/local/mysql/data
020709 09:07:03 mysqld ended

Anybody can give me a hint?
I really appreciate it!
Tang

---
Tang, Lianhong
Vanderbilt University
Email: [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: possible bug: alter table trashed foreign key constraints in innodb

2002-07-09 Thread Heikki Tuuri

Chuck,

- Original Message -
From: Chuck Simmons [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, July 09, 2002 4:29 AM
Subject: possible bug: alter table trashed foreign key constraints in innodb


 sql query

 In version 3.23.49a when using an innodb table, alter table appears to
 corrupt foreign key constraints.  Try the following test case:

 
 create table test_base (
 base_id int not null,
 primary key (base_id)
 ) type = innodb;

 create table test_ref (
 base_id int not null,
 ref_id int not null,
 primary key (base_id, ref_id),
 foreign key (base_id) references test_base (base_id)
 ) type = innodb;

 insert test_base (base_id) values (1);
 insert test_ref (base_id, ref_id) values (1, 1);

 alter table test_base add column value int not null;

 insert test_ref (base_id, ref_id) values (1, 2);
 

 The final insert fails with
 
 mysql insert test_ref (base_id, ref_id) values (1, 2);
 ERROR 1216: Cannot add a child row: a foreign key constraint fails
 

 which suggests that the foreign key constraint has become hosed?

the fact that ALTER TABLE spoiled foreign key definitions was a documented
bug. It was fixed in 3.23.50.

 Chuck

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



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

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




Re: minor enhancement request -- adding files to innodb

2002-07-09 Thread Heikki Tuuri

Chuck,

- Original Message -
From: Chuck Simmons [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, July 09, 2002 5:24 AM
Subject: minor enhancement request -- adding files to innodb


 As a minor enhancement, the innodb database could look at improving its
 handling of data files.  Specifically:

 1)  Provide mechanisms to allow data and log files to be filled with
 zeroes while normal operations occur,
 thus minimizing downtime when the database is grown.

version 3.23.50 supports an auto-extending last data file. It solves this by
extending the last data file in 8 MB blocks on demand at runtime.

Log files are less critical since they are smaller than data files, and you
do not need to add new log files because InnoDB writes to them in a circular
fashion.

 2)  Don't store the list of data and log files in the my.cnf
 configuration file, but provide separate commands to add
 and remove files or partitions from these lists, and store the list
 within the database.

In Oracle you can do ALTER TABLESPACE and add a new data file at runtime. It
would be a nice feature, but no timetable for it is set yet.

 3)  Provide more robust error recovery so that when we, say, run out of
 disk space while initializing the data and
 log files, we don't have to delete all the files and re-create them.

The auto-extend option fortunately reduces the probability here because much
less disk space needs to be pre-allocated.

 Chuck

 sql query

Best regards,

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





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

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




Re: choice of field types and performance

2002-07-09 Thread Roger Baklund

* Marko Djukic
 what is generally better to use:
 - one field of type 'set' (eg.: 'apples','cherries','pears','bananas')
 - or multiple fields of type true/false for each value above?

Field type SET, because the field types BIT and BOOL are 'fake' (synonyms
for TINYINT), occupying a full byte for each field.

 just to make sure, mysql doesn't store each value selected in the
 set in each record? or does it?

No, only one bit is used for each value in the SET (minimum 8 bits/row,
maximum 64).

URL: http://www.mysql.com/doc/S/E/SET.html 

--
Roger


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

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




Re: hundreds of undefined references from innobase when linking mysql

2002-07-09 Thread Heikki Tuuri

William,

I assume you are compiling with the -O3 gcc flag? Otherwise gcc does not
handle 'extern inline' functions right.

The problem is probably that your gcc/libtool/linker is configured in a way
that it does not do inlining as instructed by the 'extern inline' directive,
or it removes the generated code from the archives.

An easy way to fix the problem is to add

#define UNIV_MUST_NOT_INLINE

to /mysql/innobase/include/univ.i

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

- Original Message -
From: William Barber [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, July 09, 2002 12:40 AM
Subject: hundreds of undefined references from innobase when linking mysql


 Description:
 While attempting to build mysql with Innobase, the final link step
 encounters hundreds (thousands?) of undefined references such
as:

 ../innobase/srv/libsrv.a(srv0srv.o): In function
`srv_get_n_threads':

/home/wbarber/flow/contrib/mysql-3.23.51/innobase/srv/srv0srv.c:520:
 undefined reference to `mutex_enter_func'
 ../innobase/srv/libsrv.a(srv0srv.o): In function `srv_init':

/home/wbarber/flow/contrib/mysql-3.23.51/innobase/srv/srv0srv.c:1614:
 undefined reference to `mem_alloc_func'
 ../innobase/srv/libsrv.a(srv0srv.o): In function
 `srv_suspend_mysql_thread':

/home/wbarber/flow/contrib/mysql-3.23.51/innobase/srv/srv0srv.c:2030:
 undefined reference to `thr_get_trx'
 ../innobase/srv/libsrv.a(srv0start.o): In function
 `srv_parse_data_file_paths_and_sizes':

/home/wbarber/flow/contrib/mysql-3.23.51/innobase/srv/srv0start.c:153:
 undefined reference to `ut_strlen'
 ../innobase/dict/libdict.a(dict0boot.o): In function
`dict_hdr_create':

/home/wbarber/flow/contrib/mysql-3.23.51/innobase/dict/dict0boot.c:132:
 undefined reference to `buf_frame_get_page_no'

 How-To-Repeat:





./configure --prefix=/home/wbarber/mysql --with-debug=full --with-innodb
 --with-low-memory --enable-thread-safe-client --enable-assembler
 --with-mysqld-ldflags=-all-static

 make
 Fix:
 how to correct or work around the problem, if known (multiple
lines)

 Submitter-Id:  submitter ID
 Originator:Bill Barber
 Organization:
 Los Alamos National Laboratory
 MySQL support: [none | licence | email support | extended email support ]
 Synopsis:  undefined reference errors during mysql link step.
 Severity:  serious
 Priority:  [ low | medium | high ] (one line)
 Category:  mysql
 Class: [ sw-bug | doc-bug | change-request | support ] (one
line)
 Release:   mysql-3.23.51 (Source distribution)

 Environment:
 machine, os, target, libraries (multiple lines)
 System: Linux crackerjack 2.4.16-686-smp #1 SMP Wed Nov 28 10:00:01 EST
2001
 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   13 Jun 20 10:38 /lib/libc.so.6 -
 libc-2.2.5.so
 -rwxr-xr-x1 root root  1153784 Apr 28 03:57 /lib/libc-2.2.5.so
 -rw-r--r--1 root root  2390922 Apr 28 03:58 /usr/lib/libc.a
 -rw-r--r--1 root root  178 Apr 28 03:58 /usr/lib/libc.so
 Configure command:
./configure  --prefix=/home/wbarber/mysql --with-debug=full
 --with-innodb --with-low-memory --enable-thread-safe-client --enable-assem
bler
 --with-mysqld-ldflags=-all-static


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

 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




Binding Timestamp Columns with myODBC

2002-07-09 Thread Mateus Begossi

Hi,
 I´ve emailed the list but my problem doesnt seem to have catch much
attention. I guess a re-phrasing might help.. It´s pretty
simple (I´m using myODBC 3.51 and VC++ 6.0 ) : how do I declare and bind
variables/parameters for a TIMESTAMP column?

Here´s what I´ve done so far: I declare my starttime var:
SQLTIMESTAMP starttime = (SQLTIMESTAMP)(LPCTSTR)20020705195302;

Prepare my statement:
retcode = SQLPrepare(hstmt,(unsigned char*)SELECT * FROM datav WHERE
date_time = ?, SQL_NTS);

And bind the parameter:
  retcode = SQLBindParameter(hstmt,1,SQL_PARAM_INPUT, SQL_C_TIMESTAMP,
SQL_TIMESTAMP, 0,0, (void*)starttime, 14, NULL);


The application crashes. I tried setting my starttime var to SQLCHAR and
SQLINTEGER, with the proper column binding, but it wont work either.
Directly executing the statement works, but I my starttime var will change
very frequently.


Is there any hope for me  TIMESTAMP, or should I alter my table and use a
integer column with TIMESTAMP-style values...

Thanks in advance, and sorry for sending the same problem twice to the list,

Mateus Begossi



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

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




Grants UGGH! Not working for some reason ...

2002-07-09 Thread Jay Blanchard

Hi all!

I have a user that I am specifying for one database within the system. I
have granted, reloaded, deleted, re-done, and screamed at the server. None
the less, it still will not allow this user to do mysqlimport, as follows;

mysqlimport --user=rcr_user --password=thepassword -f --fields-terminated-by
=, rcr tblCDR.tmp
mysqlimport: Error: Access denied for user: 'rcr_user@localhost' (Using
password: YES), when using table: tblCDR

I have 3 rcr_users now, one at 'localhost' one at '127.0.0.1' and one at
'theservername'. All have been granted select, insert, update, delete on the
database in question. I also have this user in a PHP script that is able to
do an INSERT INTO from the script that works fine. So, have I lost it
completely? (I knew that this day would come :^) )

Any hints? I have read everything at http://www.mysql.com, I have looked all
through my trusty MySQL book, I have made offerings to the gawds of
database(s). Thanks in advance...

Jay
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




RE: Grants UGGH! Not working for some reason ...

2002-07-09 Thread Don Vu

if you don't restart MySQL after changing the grants priviliges, you have to issue the 
flush privileges command from the MySQL Monitor. If you don't do either one your 
privilege changes will not take affect.

not sure if when you said reloaded you meant flush privileges but if not try it 
and see how it goes.

hope that helps,
Don


-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 12:02 PM
To: [EMAIL PROTECTED]
Subject: Grants UGGH! Not working for some reason ...


Hi all!

I have a user that I am specifying for one database within the system. I
have granted, reloaded, deleted, re-done, and screamed at the server. None
the less, it still will not allow this user to do mysqlimport, as follows;

mysqlimport --user=rcr_user --password=thepassword -f --fields-terminated-by
=, rcr tblCDR.tmp
mysqlimport: Error: Access denied for user: 'rcr_user@localhost' (Using
password: YES), when using table: tblCDR

I have 3 rcr_users now, one at 'localhost' one at '127.0.0.1' and one at
'theservername'. All have been granted select, insert, update, delete on the
database in question. I also have this user in a PHP script that is able to
do an INSERT INTO from the script that works fine. So, have I lost it
completely? (I knew that this day would come :^) )

Any hints? I have read everything at http://www.mysql.com, I have looked all
through my trusty MySQL book, I have made offerings to the gawds of
database(s). Thanks in advance...

Jay
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


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

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: Grants UGGH! Not working for some reason ...

2002-07-09 Thread Jay Blanchard

[snip]
if you don't restart MySQL after changing the grants priviliges, you have to
issue the flush privileges command from the MySQL Monitor. If you don't do
either one your privilege changes will not take affect.

not sure if when you said reloaded you meant flush privileges but if not
try it and see how it goes.
[/snip]

That's what I meant. I have reloaded MySQL, flushed, stopped and started the
server. The killer is that this user is able to access the database just
hunky-dorie, do selects, inserts, deletes, updates.

Thanks!

Jay
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




Re: possible bug: alter table trashed foreign key constraints in innodb

2002-07-09 Thread Victoria Reznichenko

Chuck,
Tuesday, July 09, 2002, 4:26:31 AM, you wrote:

CS In version 3.23.49a when using an innodb table, alter table appears to 
CS corrupt foreign key constraints.  Try the following test case:

It's described in the MySQL manual:

 http://www.mysql.com/doc/S/E/SEC446.html

and fixed since 3.23.50




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




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

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




Re: How to use teh FULLTEXT search?

2002-07-09 Thread Egor Egorov

jusob,
Tuesday, July 09, 2002, 10:20:36 AM, you wrote:

j I have created a table:
j CREATE TABLE data (no int auto_increment, topic text, author text, date date, 
j description text, file text, note longtext, name varchar(15), password (15), 
j folder text, key(no), FULLTEXT(topic,author,description,file,note));

j Then, I would like to a FULLTEXT SEARCH in ONE (or 2 or 3) field:
j ex: SELECT * FROM data WHERE MATCH(note) AGAINTS(text  to find);
j error 1191: can't find FULLTEXT index matching the column list

j same problem for MATCH(note,author), by example
j That works only when I do MATCH(topic,author,description,file,note), so with 
j all the fields in fulltext. But that's not what I would like to do.

Set up FULLTEXT index only on column note or on note and author.

j When I see the error message, I tried to create an other index:
j ALTER TABLE data ADD key(note);
j error 1170: BLOB column 'note' used in key specification without a key length

Please, check our manual. If you want to create index on TEXT ot BLOB
column, you must index only prefix of the column, not the whole
column.
   http://www.mysql.com/doc/I/n/Indexes.html

j I have the same problem with IN BOOLEAN MODE.
j I'm using MySQL 3.23.51

You can use full-text search with IN BOOLEAN MODE in 4.0.1

j What should I do to use the FULLTEXT search in the desired number of fields?

You should create FULLTEXT indexes on those columns that you plan to use in your SQL 
statements:

   http://www.mysql.com/doc/F/u/Fulltext_Search.html





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



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

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




Re: Is this a bug?

2002-07-09 Thread Victoria Reznichenko

Rafal,
Monday, July 08, 2002, 4:44:32 PM, you wrote:

RJ mysql version 3.23.50
RJ Field kwData_wydania is of type date. As you can see, dates are different that
RJ expected. Is this a bug?

Nope. Check the manual:
  You should never have any conditions in the ON part that are
  used to restrict which rows you have in the result set. If you
  want to restrict which rows should be in the result, you have to
  do this in the WHERE clause.

Re-write you query :

SELECT ksiazka_wyd.kwId,kwData_wydania
   FROM ksiazka_wyd
   LEFT JOIN serie ON ksiazka_wyd.srId=serie.srId
   WHERE kwData_Wydania
   BETWEEN '2002-07-01' AND '2002-07-31'
   LIMIT 5;

RJ Select ksiazka_wyd.kwId,kwData_wydania
RJ - from ksiazka_wyd
RJ - LEFT JOIN serie ON ksiazka_wyd.srId=serie.srId and
RJ - kwData_Wydania
RJ - between '2002-07-01' and '2002-07-31'
RJ - limit 5;





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




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

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




Re: minor enhancement request - multiple servers

2002-07-09 Thread Egor Egorov

Chuck,
Tuesday, July 09, 2002, 5:17:49 AM, you wrote:

CS The current mysql interfaces don't support multiple servers in a 
CS fantastic fashion -- either multiple servers on a single machine or 
CS multiple servers on multiple machines.  It may be there is no great way 
CS to do this, but...

You can run several MySQL servers on the same machine:
http://www.mysql.com/doc/M/u/Multiple_servers.html

For managing multiple servers use mysqld_multi.

And you can also run multiple MySQL servers on the several boxes.

CS Sybase provides an interfaces file (that needs to be propagated to at 
CS least every client machine), which basically allows one to specifiy a 
CS server name that is mapped to an ip address and port number.  This 
CS seems slightly easier to use than having individual users build their 
CS own translations.






-- 
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: NEWBIE - trouble creating Databases Acess Denied...

2002-07-09 Thread Victoria Reznichenko

David,
Tuesday, July 09, 2002, 12:04:52 AM, you wrote:

DK I keep getting Access Denied Errors when I try to login to MySql after
DK running mysql_install_db script.  I ran the mysql_install_db script, made
DK suer the mysql process is running(checked it using netstat -a), changed the
DK ownership on the binaries and then tried to gain access using the command:
DK mysql -u root mysql, which didnt work and, I also tried using the command:
DK mysqladmin -u root password new_password which didnt work.  Both commands
DK still prompt me for a password, when I try to enter a password, I then get
DK the Access Denied Error.  Can someone point me in the direction please?  Any
DK insight would be GREATLY appreciate as I have been stuck on this for over a
DK week now!

Did you have installed MySQL server before or you run mysql_install_db
after installation? mysql_install_db doesn't re-create grant tables if
they exist. In this case use your old password. If you install MySQL
at the first time user 'root' doesn't have a password.


Check also the following link, it may help you:
  http://www.mysql.com/doc/A/c/Access_denied.html




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




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

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




RE: Grants UGGH! Not working for some reason ...

2002-07-09 Thread Johnny Withers

The user might need the FILE permission, I'm not sure.

Also might need the LOCK TABLES permission.


http://www.mysql.com/doc/G/R/GRANT.html

-
Johnny Withers
[EMAIL PROTECTED]
p. 601.853.0211
c. 601.209.4985 

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 09, 2002 11:23 AM
To: [EMAIL PROTECTED]
Subject: FW: Grants UGGH! Not working for some reason ...


[snip]
if you don't restart MySQL after changing the grants priviliges, you
have to
issue the flush privileges command from the MySQL Monitor. If you
don't do
either one your privilege changes will not take affect.

not sure if when you said reloaded you meant flush privileges but if
not
try it and see how it goes.
[/snip]

That's what I meant. I have reloaded MySQL, flushed, stopped and started
the
server. The killer is that this user is able to access the database just
hunky-dorie, do selects, inserts, deletes, updates.

Thanks!

Jay
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



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

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




Re: Grants UGGH! Not working for some reason ...

2002-07-09 Thread Gelu Gogancea

Hi,

- Original Message -
From: Jay Blanchard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 7:01 PM
Subject: Grants UGGH! Not working for some reason ...


 Hi all!

 I have a user that I am specifying for one database within the system. I
 have granted, reloaded, deleted, re-done, and screamed at the server. None
 the less, it still will not allow this user to do mysqlimport, as follows;


mysqlimport --user=rcr_user --password=thepassword -f --fields-terminated-by
 =, rcr tblCDR.tmp
 mysqlimport: Error: Access denied for user: 'rcr_user@localhost' (Using
 password: YES), when using table: tblCDR

 I have 3 rcr_users now, one at 'localhost' one at '127.0.0.1' and one at
 'theservername'. All have been granted select, insert, update, delete on
the
...this can be a problem.I think it should be work if you add and -h
'theservername'

 database in question. I also have this user in a PHP script that is able
to
 do an INSERT INTO from the script that works fine. So, have I lost it
 completely? (I knew that this day would come :^) )

 Any hints? I have read everything at http://www.mysql.com, I have looked
all
 through my trusty MySQL book, I have made offerings to the gawds of
 database(s). Thanks in advance...

 Jay
 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




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

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




Re: Setting up hostname

2002-07-09 Thread Desmond Lee

Hi

Thanks for all your help, much appreciated.

I edited my both the /etc/resolv.conf and /etc/hosts to include the line
'hostname 142.135.134.154'

of course, that's not my real ip addy. Am i suppose to edit these files? or 
did you mean to edit the /etc/sysconfig/network file. THe 
/etc/sysconfig/network file already had the proper hostname entry in it, so 
i left it at that.


and after that to do final check, just run : hostname ... till it shows you 
your real_host_name, if it doesn't just mail me :D


when i type, hostname, i still just get my own ip addy shown to me. Do i 
have to reboot, or reinitialize some variables.

THanks a bunch for you help. It's greatly apprecaited.

REgards


Desmond




--
Let's call it an accidental feature.
   -- Larry Wall

MySQL 3.23.51 : up 17 days, Queries : 362.846 per second (avg).








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


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

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




RE: Grants UGGH! Not working for some reason ...

2002-07-09 Thread Luc Foisy

 
 [snip]
 if you don't restart MySQL after changing the grants 
 priviliges, you have to
 issue the flush privileges command from the MySQL Monitor. 
 If you don't do
 either one your privilege changes will not take affect.
 
 not sure if when you said reloaded you meant flush 
 privileges but if not
 try it and see how it goes.
 [/snip]
 
 That's what I meant. I have reloaded MySQL, flushed, stopped 
 and started the
 server. The killer is that this user is able to access the 
 database just
 hunky-dorie, do selects, inserts, deletes, updates.
 
 Thanks!
 
 Jay
 sql, mysql, query


If you use the GRANT command, you don't have to flush privileges. If you 
UPDATE,INSERT your own grant records, then you have to flush.

Try granting FILE privilege. mysqlimport is LOAD DATA INFILE like, which needs the 
FILE privilege

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

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




RE: Grants UGGH! Not working for some reason ...

2002-07-09 Thread Jay Blanchard

[snip]
 I have a user that I am specifying for one database within the system. I
 have granted, reloaded, deleted, re-done, and screamed at the server. None
 the less, it still will not allow this user to do mysqlimport, ...
[/snip]

Figured it out. The user must have FILE privileges in order to execute items
like mysqlimport from the command line or a script that generates command
line like commands.

Thanks!

Jay
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




Error at compilation...can I ingore ?

2002-07-09 Thread Ismael Touama

Oï,

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


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

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

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

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

Thanks for helps,
bbsc
ism


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

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




NEWBIE: Access Denied Errors after Rebooting

2002-07-09 Thread David Kramer

I was able to login and generate a database instance, but then got a little
crazy and tried to automate the starting and stopping of the mysql service.
I copied the mysql.server file to my /etc/init.d directory and then created
the necessary links to the rc0.d and rc3.d directories.  When I rebooted the
mysql were not started, plus when I tried to manually start the services,
trying both mysqld and mysql.server, I get an unable to located the mysql
socket file.  Can anyone explain to my what Im doing wrong here?  Even
though I didnt setup the automation piece correctly shouldnt I still be able
to start the service manually?  Also what is the difference between mysqld
and mysql.server? Are they the same?  Within the my.cnf I noticed the user
assignment is equal to mysql, currently Im logging in as root, could the
problem be that I need to generate a user called mysql?  Sorry for the 20
questions, just trying help someone help me trouble shoot!

Thanks much,

DK

PS Im running Redhat 7.2


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

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




AUTO_INCREMENT problem even worse!

2002-07-09 Thread Steve Hay

Hi,

I've continued trying to solve the problem that I emailed yesterday 
regarding AUTO_INCREMENT, and I just seem to be going backwards.

The sample database/software that I sent yesterday had a UNIQUE 
constraint and a couple of SELECT statements.  I thought that removing 
them bizarrely made it all work, but it turns out that it doesn't -- it 
just takes longer to fail!

I've now reduced the problem to the following simple database/program:

--
CREATE DATABASE test;

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

--
use strict;
use warnings;

use DBI;

my $dbh = DBI-connect(
'dbi:mysql:test', 'root', '',
{AutoCommit = 0, PrintError = 0, RaiseError = 1}
);

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

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

if ($@) {
if ($DBI::err == 1213) {
$deadlocks++;
print $total: $i: $$: Deadlock! ($deadlocks)\n;

eval {
$dbh-rollback();
};

if ($@) {
print Rollback Error! ($@)\n;
last;
}

redo;
}
else {
print $total: $i: $$: Error! ($@)\n;
last;
}
}
else {
$deadlocks = 0;
print $total: $i: $$: Success!\n;
}
}

$dbh-disconnect();
--

If I run two of these program simultaneously then one of them always 
exits before the 50,000 iterations are up with the error:

Duplicate entry '1' for key 1

Can anybody help explain why?

This looks like a bug to me.

- Steve



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

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




RE: NEWBIE - trouble creating Databases Acess Denied...

2002-07-09 Thread David Kramer

Victoria thanks for the response but I was able to solve my issue already.
Yes I needed to run mysql_install_db then I started the safe_mysql
--skip-grant, logged on as root without password and updated the root user's
password on the user table.  Thanks for the help!!!

DK

David

-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 9:23 AM
To: [EMAIL PROTECTED]
Subject: Re: NEWBIE - trouble creating Databases Acess Denied...


David,
Tuesday, July 09, 2002, 12:04:52 AM, you wrote:

DK I keep getting Access Denied Errors when I try to login to MySql after
DK running mysql_install_db script.  I ran the mysql_install_db script,
made
DK suer the mysql process is running(checked it using netstat -a), changed
the
DK ownership on the binaries and then tried to gain access using the
command:
DK mysql -u root mysql, which didnt work and, I also tried using the
command:
DK mysqladmin -u root password new_password which didnt work.  Both
commands
DK still prompt me for a password, when I try to enter a password, I then
get
DK the Access Denied Error.  Can someone point me in the direction please?
Any
DK insight would be GREATLY appreciate as I have been stuck on this for
over a
DK week now!

Did you have installed MySQL server before or you run mysql_install_db
after installation? mysql_install_db doesn't re-create grant tables if
they exist. In this case use your old password. If you install MySQL
at the first time user 'root' doesn't have a password.


Check also the following link, it may help you:
  http://www.mysql.com/doc/A/c/Access_denied.html




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




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

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

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

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




Re: BLOB insert problem used ' '

2002-07-09 Thread Mark Worsdall

Hi all,

Sorry should have got my mind around the  LOAD_FILE('./image.tiff') 
method.

M.

In message [EMAIL PROTECTED], Mark Worsdall 
[EMAIL PROTECTED] writes
Hi,

After a good old slurp of an image I am trying to stick it into my
table.


# Slurp file
foreach (@image_list) {
  my $image = /usr/home/shadow/Vision/$_;

  # Load image into memory
  my $imagePIC = do
  {
  local ($/, *PIC); # slurp mode, local file handle
  open PIC, $image or die can't open '$image': $!;
  binmode PIC;
  PIC
  };


And this is how I am sticking it in, but I get an error reported in my
sql code.

my $prep = INSERT INTO object (object) VALUES ('$image');

see anything wrong?

I tried:
my $prep = INSERT INTO object (count) VALUES (1);

to check I can insert, and I can.

M.


-- 
Work:- postmasterAThinwick.demon.co.uk

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

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




Re: General query log option in my.cnf?

2002-07-09 Thread Myk Melez

Håkon Eriksen wrote:

Is there a way of turning on the general query log in the my.cnf file
or do I have to edit the init-script?
  

Yes, all command-line options can be specified in my.cnf.  Read the 
following page for more info:

http://www.mysql.com/doc/O/p/Option_files.html

-myk



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

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




Database documentation

2002-07-09 Thread Gigi Di Leo

Hello list.

At the end of a db programming job (using php) I have been asked for a document 
describing in details the structure of a MySQL database.
The purpose of the document is to make other DB people able to manage and interface 
the database (I can figure out that there is also the intent to impress the customer 
by graphic and heavy paper).
Could you please suggest me some source where I could learn about the best standard 
methods to describe a DB structure ?
Is there any tool which is able to produce this kind of document semi/automatically ?

gg


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

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




C API: mysql_data_seek

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


Hi,

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

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

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

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

Thanks in advance.

wv




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

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




RE: Access a M$ Access 2000 db with MySql-front - could not open database error

2002-07-09 Thread Wouter van Vliet

I'm not very sure of myself ... but maybe you'd try to use quotes around the
file path?


--
Alle door mij verzonden email is careware. Dit houdt in dat het alleen
herlezen en bewaard mag worden als je goed omgaat met al het leven op aarde
en daar buiten. Als je het hier niet mee eens bent dien je mijn mailtje
binnen 24 uur terug te sturen, met opgaaf van reden van onenigheid.

All email sent by me is careware. This means that it can only be reread and
kept if you are good for all the life here on earth and beyond. If you don't
agree to these terms, you should return this email in no more than 24 hours
stating the reason of disagreement.


-Oorspronkelijk bericht-
Van: Chuck Amadi [mailto:[EMAIL PROTECTED]]
Verzonden: dinsdag 9 juli 2002 10:38
Aan: [EMAIL PROTECTED]
Onderwerp: Access a M$ Access 2000 db with MySql-front - could not open
database error


Hi all im aware this might not be the correct forum but i believe it's
the same beast and it should be ansewered quite easily .
I have been creating a M$ Access Front-end database with a MySql
Back-end that im about to upload onto a ISP that supports Mysql/Php thus
i have just downloaded MySql-Front . My problem is how does one connect
to a previously created and complete M$ Access 2000 Database as i have a
fullt functional Access thatis in my C:\My Documents So i have tried
various notations in accessing ie Database (S); SEPARTED BY SEMICOLON (;)

C:\My Documents\sps mini utility.mdb; 1st attempt  error as below

# Could not open database 'C:\My Documents\sps mini utility.mdb' - will
be ignored.

C;My Documents;sps mini utility.mdb; 2nd attempt error as below

# Could not open database '# Could not open database 'C' - will be ignored.
# Could not open database 'My Documents' - will be ignored.
# Could not open database 'sps mini utility.mdb' - will be ignored.

Any pointers welcomed Cheers

--
Regards
Chuck Amadi
ICT Dept Systems Programmer
Rhaglenydd Systemau Adran ICT




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

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




job spam

2002-07-09 Thread Jeffrey Lomas

List,
I'm looking for a developer in eastern Massachusetts with the following
skills to work on some ongoing projects:

MySQL
Oracle
CGI
Perl
PHP
Java
JSP
C++

This is a contract position. Resumes can be sent 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




Basic Q's: Numerical Sorting

2002-07-09 Thread CVIOG at UGA

I have a fairly basic question: How do I sort
numerically?  Normally when I query using ORDER BY
(field), it orders by the first digit (i.e. 1, 10, 2,
21, 3, 32) rather than by number (1, 2, 3, 10, 21,
32).

Thanks for any help
Dave

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

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

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




Lost connection to MySQL server during query

2002-07-09 Thread Steve Mertz

Hi.

I keep getting Lost connection to MySQL server during query

marcos:mysql-3.23.51 {117} mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Lost connection to MySQL server during query'

Server timeout is set for 8 hours (default) and I have been trying
to hit the server all within a couple of minutes.

Sometimes it works, sometimes it doesn't. (below is a repeat of the
command 2 minutes after the first one was issued.)


marcos:mysql-3.23.51 {120} !!
mysqladmin version
mysqladmin  Ver 8.23 Distrib 3.23.51, for unknown-openbsd3.1 on i386
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.51-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 10 min 57 sec

Threads: 2  Questions: 108  Slow queries: 0  Opens: 34  Flush tables: 1
Open tables: 28 Queries per second avg: 0.164

marcos:mysql-3.23.51 {121} uname -a
OpenBSD marcos 3.1 marcos#5 i386

What should I start looking for?  (below is mysqladmin variables)

Thanks!
-- Steve

marcos:mysql-3.23.51 {131} mysqladmin variables
+-+-

--+
| Variable_name   | Value
|
+-+-

--+
| back_log| 50
|
| basedir | /usr/local/mysql-3.23.51/
|
| binlog_cache_size   | 32768
|
| character_set   | latin1
|
| character_sets  | latin1 dec8 dos german1 hp8 koi8_ru
latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr
win1251ukr greek win1250 croat cp1257 latin5 |
| concurrent_insert   | ON
|
| connect_timeout | 5
|
| datadir | /usr/local/mysql-3.23.51/var/
|
| delay_key_write | ON
|
| delayed_insert_limit| 100
|
| delayed_insert_timeout  | 300
|
| delayed_queue_size  | 1000
|
| flush   | OFF
|
| flush_time  | 0
|
| have_bdb| NO
|
| have_gemini | NO
|
| have_innodb | NO
|
| have_isam   | YES
|
| have_raid   | NO
|
| have_openssl| NO
|
| init_file   |
|
| interactive_timeout | 28800
 |
| join_buffer_size| 131072
|
| key_buffer_size | 8388600
|
| language|
/usr/local/mysql-3.23.51/share/mysql/english/
|
| large_files_support | ON
|
| locked_in_memory| OFF
|
| log | ON
|
| log_update  | OFF
|
| log_bin | OFF
|
| log_slave_updates   | OFF
|
| log_long_queries| OFF
|
| long_query_time | 10

|
| low_priority_updates| OFF
|
| lower_case_table_names  | 0
|
| max_allowed_packet  | 1048576
|
| max_binlog_cache_size   | 4294967295
|
| max_binlog_size | 1073741824
|
| max_connections | 100
|
| max_connect_errors  | 10
|
| max_delayed_threads | 20
|
| max_heap_table_size | 16777216
|
| max_join_size   | 4294967295
|
| max_sort_length | 1024
|
| max_user_connections| 0
|
| max_tmp_tables  | 32
|
| max_write_lock_count| 4294967295
|
| myisam_max_extra_sort_file_size | 256
|
| myisam_max_sort_file_size   | 2047
|
| myisam_recover_options  | 0
|
| myisam_sort_buffer_size | 8388608
|
| net_buffer_length   | 16384
|
| net_read_timeout| 30
|
| net_retry_count | 10
 |
| net_write_timeout   | 60
|
| open_files_limit| 0
|
| pid_file| /usr/local/mysql-3.23.51/var/marcos.pid
|
| port| 3306
|
| protocol_version| 10
|
| record_buffer   | 131072
|
| record_rnd_buffer   | 131072
|
| query_buffer_size   | 0
|
| safe_show_database  | OFF
|
| server_id   | 0
|
| slave_net_timeout   | 3600
|
| skip_locking| OFF
|
| skip_networking | 

Re: Basic Q's: Numerical Sorting

2002-07-09 Thread Serge Paquin

It looks like your field is a text field rather than BIGINT or some
numerical field.  Changing the field type should solve your problem.

Serge.

- Original Message -
From: CVIOG at UGA [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 4:22 PM
Subject: Basic Q's: Numerical Sorting


 I have a fairly basic question: How do I sort
 numerically?  Normally when I query using ORDER BY
 (field), it orders by the first digit (i.e. 1, 10, 2,
 21, 3, 32) rather than by number (1, 2, 3, 10, 21,
 32).

 Thanks for any help
 Dave

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

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

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



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

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




RE: Basic Q's: Numerical Sorting

2002-07-09 Thread Luc Foisy

Here is the solution I posted about t months ago. I would also add, this solution can 
handle both text and numbers in the same field...:

my boss figured out a nice solution to this

ORDER BY IF(ABS(Item)  0,LPAD(Item,9,'0'),Item)

This will pad numbers ( ok it might not do so hot with DECIMAL, but it can be fixed to 
work I supposed) with 0

So it should sort 

1
2
00010
00022
00050
00230

instead of

1
10
2
22
230
50

And it will skip padding text cause I guess the ABS of text is 0, and the numbers 
and words will appear separated from each other

My boss is smart :)

 -Original Message-
 From: CVIOG at UGA [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 4:22 PM
 To: [EMAIL PROTECTED]
 Subject: Basic Q's: Numerical Sorting
 
 
 I have a fairly basic question: How do I sort
 numerically?  Normally when I query using ORDER BY
 (field), it orders by the first digit (i.e. 1, 10, 2,
 21, 3, 32) rather than by number (1, 2, 3, 10, 21,
 32).
 
 Thanks for any help
 Dave
 

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

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




Re: Basic Q's: Numerical Sorting

2002-07-09 Thread Dan Nelson

In the last episode (Jul 09), CVIOG at UGA said:
 I have a fairly basic question: How do I sort
 numerically?  Normally when I query using ORDER BY
 (field), it orders by the first digit (i.e. 1, 10, 2,
 21, 3, 32) rather than by number (1, 2, 3, 10, 21,
 32).

Either alter the table to make that field an INTEGER column, or ORDER
BY field+0 to force mysql to internally convert the field to a number
before sorting.

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




Re: Lost connection to MySQL server during query

2002-07-09 Thread Michael Bacarella

Is there anything in the error log?

See mysql/data/hostname.err

-M

On Tue, Jul 09, 2002 at 03:26:17PM -0500, Steve Mertz wrote:
 I keep getting Lost connection to MySQL server during query
 
 marcos:mysql-3.23.51 {117} mysqladmin version
 mysqladmin: connect to server at 'localhost' failed
 error: 'Lost connection to MySQL server during query'
 
 Server timeout is set for 8 hours (default) and I have been trying
 to hit the server all within a couple of minutes.
 
 Sometimes it works, sometimes it doesn't. (below is a repeat of the
 command 2 minutes after the first one was issued.)
 
 
 marcos:mysql-3.23.51 {120} !!
 mysqladmin version
 mysqladmin  Ver 8.23 Distrib 3.23.51, for unknown-openbsd3.1 on i386
 Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
 This software comes with ABSOLUTELY NO WARRANTY. This is free software,
 and you are welcome to modify and redistribute it under the GPL license
 
 Server version  3.23.51-log
 Protocol version10
 Connection  Localhost via UNIX socket
 UNIX socket /tmp/mysql.sock
 Uptime: 10 min 57 sec
 
 Threads: 2  Questions: 108  Slow queries: 0  Opens: 34  Flush tables: 1
 Open tables: 28 Queries per second avg: 0.164
 
 marcos:mysql-3.23.51 {121} uname -a
 OpenBSD marcos 3.1 marcos#5 i386
 
 What should I start looking for?  (below is mysqladmin variables)

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

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




Re: Lost connection to MySQL server during query

2002-07-09 Thread Steve Mertz

No, nothing other than the startup and shutdown messages.

And every once and a while:
020708 21:00:46  Error in accept: Bad file descriptor

But this doesn't happen all the time after restarting the database and I
still
have problems so I don't think that this is related.

Thanks!
-- Steve



- Original Message -
From: Michael Bacarella [EMAIL PROTECTED]
To: Steve Mertz [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 3:43 PM
Subject: Re: Lost connection to MySQL server during query


 Is there anything in the error log?

 See mysql/data/hostname.err

 -M

 On Tue, Jul 09, 2002 at 03:26:17PM -0500, Steve Mertz wrote:
  I keep getting Lost connection to MySQL server during query
 
  marcos:mysql-3.23.51 {117} mysqladmin version
  mysqladmin: connect to server at 'localhost' failed
  error: 'Lost connection to MySQL server during query'
 
  Server timeout is set for 8 hours (default) and I have been trying
  to hit the server all within a couple of minutes.
 
  Sometimes it works, sometimes it doesn't. (below is a repeat of the
  command 2 minutes after the first one was issued.)
 
 
  marcos:mysql-3.23.51 {120} !!
  mysqladmin version
  mysqladmin  Ver 8.23 Distrib 3.23.51, for unknown-openbsd3.1 on i386
  Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
  This software comes with ABSOLUTELY NO WARRANTY. This is free software,
  and you are welcome to modify and redistribute it under the GPL license
 
  Server version  3.23.51-log
  Protocol version10
  Connection  Localhost via UNIX socket
  UNIX socket /tmp/mysql.sock
  Uptime: 10 min 57 sec
 
  Threads: 2  Questions: 108  Slow queries: 0  Opens: 34  Flush tables: 1
  Open tables: 28 Queries per second avg: 0.164
 
  marcos:mysql-3.23.51 {121} uname -a
  OpenBSD marcos 3.1 marcos#5 i386
 
  What should I start looking for?  (below is mysqladmin variables)





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

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




New tool

2002-07-09 Thread Alexander Burbello

People,


there is a new tool on the site:

http://geocities.yahoo.com.br/burbello/

it's worthwhile.



sql, query



___
Yahoo! Encontros
O lugar certo para encontrar a sua alma gêmea.
http://br.encontros.yahoo.com/

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

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




Re: C API: mysql_data_seek

2002-07-09 Thread Gelu Gogancea

Hi,

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

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

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

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

I hope it's help.
Regards,

Gelu
_
G.NET SOFTWARE COMPANY

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



 Hi,

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

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

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

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

 Thanks in advance.

 wv




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

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




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

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




RE: UDF, Can anyone please help?

2002-07-09 Thread Miles Roper

This returns

mysql Select Field1, Field2, MAX(IDField) From amain Group by Field1;
+++--+
| Field1 | Field2 | MAX(IDField) |
+++--+
| A  |  1 |4 |
| B  |  7 |8 |
| C  |  1 |   12 |
+++--+

The correct answer is
 select field1, last(field2) from table1 group by field1

 Feild1   Field2
 A3
 B8
 C1

I may have a solution, check out the posts on the newslist :o)

-Original Message-
From: Noel Clarkson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 9 July 2002 05:37
To: 'Miles Roper'; '[EMAIL PROTECTED]'
Subject: RE: UDF, Can anyone please help?


So if below is actually what your data looks like, what about:

Select Field1, Field2, MAX(IDField) From MyTable Group by Field1

That might get the correct answer for you, but it does however have an extra
field in the result (which may or may not be a problem).

cheers,

noel


On Tuesday, July 09, 2002 7:03 AM, Miles Roper
[SMTP:[EMAIL PROTECTED]] wrote:
 Hi Frank,
 
 Good idea, but I actually need the last value, ie
 
 IDField  Field1   Field2
 1A1
 2A4
 3A2
 4A3
 5B7
 6B10
 7B3
 8B8
 9C1
 10   C2
 11   C4
 12   C1
 
 The answer would be
 
 select field1, last(field2) from table1 group by field1
 
 Feild1   Field2
 A3
 B8
 C1
 
 Select Field1, Max( Field2 ) From MyTable Group by Field1
 
 Would produce a wrong answer
 
 Feild1   Field2
 A4
 B10
 C4
 
 I'm keeping an eye on the mailing list via the net. :o)  I get to many
 emails as it is :o)
 
 Hope this makes sense :o)  Thanks for you help.
 
 Cheers
 
 Miles
 




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

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




RE: UDF, Can anyone please help?

2002-07-09 Thread Miles Roper

Hi Francico, yes that would work.  Thanks.  The only thing I don't like is
created a 200,000 record temporary table.

I may have a different solution, will post it soon.

-Original Message-
From: Francisco Reinaldo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 10 July 2002 02:22
To: Miles Roper
Subject: RE: UDF, Can anyone please help?


Hi Miles,

Then I think that the easiest way is to create a
temporary table from this query:

Create Temporary Table TempTable Select Max(IDField)
From TheTable Group by Field1;

Then your inner join the temporary table with yours:

Select t1.* from TempTable tt, TheTable l1 Where
tt.IDField, t1.IDField

Finally you drop the temp table:

drop table if exists TempTable

This could have been achieved in one step with
sub-queries but MySql does not support them.

I hope it helped.
--- Miles Roper [EMAIL PROTECTED] wrote:
 Hi Frank,
 
 Good idea, but I actually need the last value, ie
 
 IDField  Field1   Field2
 1A1
 2A4
 3A2
 4A3
 5B7
 6B10
 7B3
 8B8
 9C1
 10   C2
 11   C4
 12   C1
 
 The answer would be
 
 select field1, last(field2) from table1 group by
 field1
 
 Feild1   Field2
 A3
 B8
 C1
 
 Select Field1, Max( Field2 ) From MyTable Group by
 Field1
 
 Would produce a wrong answer
 
 Feild1   Field2
 A4
 B10
 C4
 
 I'm keeping an eye on the mailing list via the net.
 :o)  I get to many
 emails as it is :o)
 
 Hope this makes sense :o)  Thanks for you help.
 
 Cheers
 
 Miles
 
 -Original Message-
 From: Francisco Reinaldo [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 9 July 2002 03:38
 To: Miles Roper; '[EMAIL PROTECTED]'
 Subject: Re: UDF, Can anyone please help?
 
 
 Hi Miles,
 
 Could you explain the same thing with a some sample
 data? I does not need to be your data. I think that
 what you want to do is this but I am not sure.
 
 Field1 Field2 
 A  1
 A  1
 A  2
 A  3
 B  1
 B  1
 B  2
 C  2
 C  2
 C  4
 C  4
 
 When you say last do you mean this in ms access?
 Select Field1, Last( Field2 ) From MyTable Group by
 Field1
 
 Maybe I am not understanding your question, but why
 don't you do this?
 
 Select Field1, Max( Field2 ) From MyTable Group by
 Field1
 
 Bye and good luck.
 
 P.S. One tip about the volume of emails. Check them
 dialy and delete the ones that you are not
 interested
 in. If you are not subscribeb to the mail-list, how
 are you going to help other people? :-)
 
 
 
 --- Miles Roper [EMAIL PROTECTED] wrote:
  Hi,
  
  I've being trying for the last couple of months to
  convert a MS Access to
  Mysql.  I pull out data extract from around 100 +
  queries.  These took about
  5 months of solid work to develop and are
 extremely
  complex.  I can convert
  these to mysql, but have one big problem.  There
 is
  no last function in
  mysql.  I know you can do a descending sort by ID
  and grab the first row to
  get the same thing.  This will not work as I need
 to
  do it over several
  thousand different groups.  So I need the last row
  per group.
  
  I have been trying to write a aggregate last UDF
  function in mysql, and
  would consider this to be very simple, however, I
  can't get it to work.  I
  don't really know how to program in C and my
  understanding of it is quite
  vague.  I really need some help to do this from
  someone in the community.  I
  have posted several times in the past and haven't
  heard anything from
  anyone.  I am getting quite frustrated and are
 about
  ready to flag this
  exercise as a great waste of time.
  
  I have successful so far got the UDF to compile,
 and
  installed.  I had to
  recompile mysql for HPUx to get it to support UDFs
  in the first place.  It
  has taken me 50+ hours to export several hundred
 meg
  of data from access to
  mysql.  I have even written quite a bit of
  code/scripts to get it to the
  point where I can start fixing things.
  
  So, please, can anyone help me with this.  I don't
  expect someone to do this
  all for me, but just a LITTLE help would be nice. 
 I
  will quite happily post
  this back into the community if I can get it to
  work.
  
  I have removed myself off the mailing digest as
 the
  volume is too high.  If
  you could please email me at
  [EMAIL PROTECTED]
  
  Yours Gratefully
  
  Miles
  
  
 

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

undocumented change in behavior?

2002-07-09 Thread Chuck Simmons

There appears to be an undocumented change from 3.23.49 to 3.23.51, 
possibly for the worse.

Consider two sessions executing the following sequence of commands on an 
innodb table (assume maximum ACID properties):

session 1  begin;
session 1  update table set field = field + 1 where primary_key = 1;

session 2 select * from table where primary_key = 1;


In version 3.23.49, session 2 returns a row relatively quickly.  In 
version 3.23.51, session 2 blocks.  The 3.23.49 behavior is reasonable 
-- the 2nd session is not required to block because the database is 
allowed to choose an ordering of transactions when transactions are 
concurrent and it is reasonable to choose the order where session 2 
completes before session 1.

So, it appears that version 3.23.51 has different behavior and I don't 
see this documented in the list of changes.  And it could be argued that 
the 3.23.49 behavior was better.


[fyi... one other undocumented change would be the change to the client 
libraries so that when an application tries to parse a group out of a 
configuration file, there won't be a core dump.  I think this was a bug 
fix to libmysql.c, adding a '*' to the statement 'for (end= *option ; 
*(end= strcend(end,'_')) ; )'.]

chuck


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

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




Re: Lost connection to MySQL server during query

2002-07-09 Thread Gelu Gogancea

Hi,

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

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

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


 No, nothing other than the startup and shutdown messages.

 And every once and a while:
 020708 21:00:46  Error in accept: Bad file descriptor

 But this doesn't happen all the time after restarting the database and I
 still
 have problems so I don't think that this is related.

 Thanks!
 -- Steve



 - Original Message -
 From: Michael Bacarella [EMAIL PROTECTED]
 To: Steve Mertz [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, July 09, 2002 3:43 PM
 Subject: Re: Lost connection to MySQL server during query


  Is there anything in the error log?
 
  See mysql/data/hostname.err
 
  -M
 
  On Tue, Jul 09, 2002 at 03:26:17PM -0500, Steve Mertz wrote:
   I keep getting Lost connection to MySQL server during query
  
   marcos:mysql-3.23.51 {117} mysqladmin version
   mysqladmin: connect to server at 'localhost' failed
   error: 'Lost connection to MySQL server during query'
  
   Server timeout is set for 8 hours (default) and I have been trying
   to hit the server all within a couple of minutes.
  
   Sometimes it works, sometimes it doesn't. (below is a repeat of the
   command 2 minutes after the first one was issued.)
  
  
   marcos:mysql-3.23.51 {120} !!
   mysqladmin version
   mysqladmin  Ver 8.23 Distrib 3.23.51, for unknown-openbsd3.1 on i386
   Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
   This software comes with ABSOLUTELY NO WARRANTY. This is free
software,
   and you are welcome to modify and redistribute it under the GPL
license
  
   Server version  3.23.51-log
   Protocol version10
   Connection  Localhost via UNIX socket
   UNIX socket /tmp/mysql.sock
   Uptime: 10 min 57 sec
  
   Threads: 2  Questions: 108  Slow queries: 0  Opens: 34  Flush tables:
1
   Open tables: 28 Queries per second avg: 0.164
  
   marcos:mysql-3.23.51 {121} uname -a
   OpenBSD marcos 3.1 marcos#5 i386
  
   What should I start looking for?  (below is mysqladmin variables)
 
 



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

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




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

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




UDF Last Solution

2002-07-09 Thread Miles Roper

Hi All,

Well I think I actually managed to fumble my way to a solution to this.  I
took the example avg_cost UDF function and modified it somewhat (well,
hacked it to pieces).  I've tried this before but I actually tried to
rewrite it, bad mistake.  This time I just deleted all the bits I didn't
need :o)

This seems to work pretty well, I've tested it with queries dealing with
100,000+ records and seems stable.  Of course I don't give any guarantee
that it will work for you, or that it won't blow up your server if you try
it.

Here is the source.  Note that it can only get the last value of integers,
not text, real numbers.

Remember, I don't really know what I'm doing in C, so if there is any bad
coding, don't be nasty :o)

Cheers

Miles

#ifdef STANDARD
#include stdio.h
#include string.h
#else
#include global.h
#include my_sys.h
#endif
#include mysql.h
#include m_ctype.h
#include m_string.h   // To get strmov()

#ifdef HAVE_DLOPEN

/* These must be right or mysqld will not find the symbol! */

extern C {
my_bool last_init( UDF_INIT* initid, UDF_ARGS* args, char* message );
void last_deinit( UDF_INIT* initid );
void last_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char
*error );
void last_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error
);
double last( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
}

struct last_data
{
  unsigned long long lastvalue;
};


/*
** Average Cost Aggregate Function.
*/
my_bool
last_init( UDF_INIT* initid, UDF_ARGS* args, char* message )
{
  struct last_data* data;

  if (args-arg_count != 1)
  {
strcpy(
   message,
   wrong number of arguments: LAST() requires one arguments
   );
return 1;
  }

  if ((args-arg_type[0] != INT_RESULT))
  {
strcpy(
   message,
   wrong argument type: LAST() requires an INT
   );
return 1;
  }

  initid-maybe_null= 0;// The result may be null

  data = new struct last_data;

  initid-ptr = (char*)data;

  return 0;
}

void
last_deinit( UDF_INIT* initid )
{
  delete initid-ptr;
}

void
last_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message )
{
  struct last_data* data = (struct last_data*)initid-ptr;
  data-lastvalue   = 0;

  *is_null = 0;
  last_add( initid, args, is_null, message );
}


void
last_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message )
{

if (args-args[0] )
{
struct last_data* data  = (struct last_data*)initid-ptr;
data-lastvalue = *((long long*)args-args[0]);
}
}


double
last( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error )
{
  struct last_data* data = (struct last_data*)initid-ptr;

  return data-lastvalue;
}

#endif /* HAVE_DLOPEN */




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

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




Re: Database documentation

2002-07-09 Thread Francisco Reinaldo

Hi,

These tools are not open source:

http://www.thekompany.com/products/dataarchitect/

You can download the evaluation. It supports MySQL
directly:

http://www.datanamic.com/download/download_dezign.html

If you are not familiar with database methodology and
relation entity diagrams, I recomend you to buy a book
that explains the concept a little bit.

Bye and good luck.
--- Gigi Di Leo [EMAIL PROTECTED] wrote:
 Hello list.
 
 At the end of a db programming job (using php) I
 have been asked for a document describing in details
 the structure of a MySQL database.
 The purpose of the document is to make other DB
 people able to manage and interface the database (I
 can figure out that there is also the intent to
 impress the customer by graphic and heavy paper).
 Could you please suggest me some source where I
 could learn about the best standard methods to
 describe a DB structure ?
 Is there any tool which is able to produce this kind
 of document semi/automatically ?
 
 gg
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 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!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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

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




COMMENT For tables

2002-07-09 Thread Tam, Michael

Hi all,

I would like to confirm that MySQL only allows putting COMMENT in TABLE
LEVEL but not in COLUMN LEVEL.  Am I right?

Regards,
Michael


---
Michael Tam - NFI Database Developer   Natural
Resources Canada
[EMAIL PROTECTED] Pacific Forestry
Center
Phone: (250) 383-8074   506 West Burnside
Road
Fax: (250) 363-0775 Victoria, BC
V8Z 1M5




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

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




Re: undocumented change in behavior?

2002-07-09 Thread Heikki Tuuri

Chuck,

- Original Message -
From: Chuck Simmons [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Wednesday, July 10, 2002 1:08 AM
Subject: undocumented change in behavior?


 There appears to be an undocumented change from 3.23.49 to 3.23.51,
 possibly for the worse.

 Consider two sessions executing the following sequence of commands on an
 innodb table (assume maximum ACID properties):

 session 1  begin;
 session 1  update table set field = field + 1 where primary_key = 1;

 session 2 select * from table where primary_key = 1;


 In version 3.23.49, session 2 returns a row relatively quickly.  In
 version 3.23.51, session 2 blocks.  The 3.23.49 behavior is reasonable
 -- the 2nd session is not required to block because the database is
 allowed to choose an ordering of transactions when transactions are
 concurrent and it is reasonable to choose the order where session 2
 completes before session 1.

normally InnoDB performs a simple SELECT as a consistent non-locking read.
That is why the query in .49 returned immediately. But how do you get it to
wait in .51? Have you done SET SESSION TRANSACTION ISOLATION LEVEL
SERIALIZABLE? In .49 that did not have any effect, but in .50 it changes all
SELECTs to use LOCK IN SHARE MODE. This is documented in section 16 of
http://www.innodb.com/ibman.html. Below is an example run:


Session 1:
...
mysql begin;
Query OK, 0 rows affected (0.00 sec)

mysql update t40 set c = now() where a = 2;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql
.

Session 2 (started later):


mysql select * from t40 where a = 2;
+---++-+
| a | b  | c   |
+---++-+
| 2 | jhgjhghghj | 2002-07-10 01:03:48 |
+---++-+
1 row in set (0.00 sec)

mysql set session transaction isolation level serializable;
Query OK, 0 rows affected (0.00 sec)

mysql select * from t40 where a = 2;
ERROR 1205: Lock wait timeout exceeded; Try restarting transaction
mysql



 So, it appears that version 3.23.51 has different behavior and I don't
 see this documented in the list of changes.  And it could be argued that
 the 3.23.49 behavior was better.


 [fyi... one other undocumented change would be the change to the client
 libraries so that when an application tries to parse a group out of a
 configuration file, there won't be a core dump.  I think this was a bug
 fix to libmysql.c, adding a '*' to the statement 'for (end= *option ;
 *(end= strcend(end,'_')) ; )'.]

 chuck

Best regards,

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

sql database




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

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




bug with like, latin1 and umlaut ü/y

2002-07-09 Thread oliver

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

How-To-Repeat:
CREATE TABLE test ( name VARCHAR(2) );
INSERT INTO test VALUES ( a );
INSERT INTO test VALUES ( b );
INSERT INTO test VALUES ( ü );
INSERT INTO test VALUES ( y );

mysql SELECT * FROM test WHERE name LIKE %ü%;
+--+
| name |
+--+
| ü|
| y|
+--+
2 rows in set (0.00 sec)

mysql SELECT * FROM test WHERE name LIKE %y%;
+--+
| name |
+--+
| ü|
| y|
+--+
2 rows in set (0.00 sec)

mysql SELECT * FROM test WHERE name REGEXP .*ü.*;
+--+
| name |
+--+
| ü|
+--+
1 row in set (0.00 sec)

Fix:
One can workaround this bug by using REGEXP instead of LIKE. But
than you have to rewrite your queries...

Submitter-Id:  submitter ID
Originator:
Organization:
 
MySQL support: none
Synopsis:  
Severity   non-critical
Priority:  low
Category:  mysql
Class: sw-bug
Release:   mysql-3.23.51 (Source distribution)
Server: /usr/local/bin/mysqladmin  Ver 8.23 Distrib 3.23.51, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.51-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 9 days 11 hours 18 min 1 sec

Threads: 5  Questions: 8261442  Slow queries: 19203  Opens: 2834  Flush tables: 867  
Open tables: 64 Queries per second avg: 10.096
Environment:

System: Linux cleopatra 2.2.19 #7 Sat Oct 6 02:37:48 CEST 2001 i686 unknown
Architecture: i686

Some paths:  /usr/local/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
-rwxr-xr-x   1 root root  4060896 Jan 17  2001 /lib/libc.so.6
-rw-r--r--   1 root root 19186278 Jan 17  2001 /usr/lib/libc.a
-rw-r--r--   1 root root  178 Jan 17  2001 /usr/lib/libc.so
Configure command: ./configure --without-bench --prefix=/opt/mysql-3.23 
--enable-assembler --with-tcp-port=3306 --with-raid --with-innodb --with-berkeley-db
Perl: This is perl, version 5.005_03 built for i586-linux

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

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




Bug in drop database mysql 4.0.1-2

2002-07-09 Thread Scott Olson

I posted a couple of days ago on what appears to be a bug in 
drop database of mysql-max-4.0.1-2.  Here is a recipe to
see if others are seeing the same problem.

This is on Red Hat Linux 7.2 and is extremely repeatable
nor is it limited to a single linux box (ie. not likely
hardware problem).

When drop database is called in a loop it will eventually cause
a hang and most commands will fail thereafter. (except stuff
like show variables, show processlist)

show processlist shows drop database sitting around waiting for
something that never comes :)  The server is pretty much dead
in the water at this point since nothing else is processed
as far as selects, updates etc.

While composing this email I've discovered that adding
a flush tables command immediately before the drop database
seems to solve the problem.  While that is a workaround it
would be nice to solve the underlying problem :)

I've included test.sql and rundeath.csh to help replicate
the problem.  


contents of rundeath.csh

#!/bin/csh
while 1
date
mysql -uroot  test.sql
end

contents of test.sql

drop database if exists death;

create database death;

use death;

create table bogus (
  crap int default '' not null
);


-- 
Scott Olson
Senior Systems Analyst
Pason Systems Corp.
Phone: (403) 301-3418
e-mail: [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: Read-Only MySQL

2002-07-09 Thread Gerald R. Jensen

Kristian:

Possible? I suppose, but not very practical. It would be
ssllooww, you'd need to supply an application to permit
access to the data, and how would you handle licensing?

Gerald Jensen

- Original Message -
From: Kristian Koehntopp [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 6:48 AM
Subject: Read-Only MySQL



I want to create a CD-ROM which contains a copy of MySQL (for
Windows) and a set of MySQL databases. Is it possible to set up
a read-only MySQL, that is, a MySQL running from a r/o media?

Kristian


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

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






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

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




Re: Read-Only MySQL

2002-07-09 Thread Colin Faber

Like Kristian says,

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



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

-- 
Colin Faber
(303) 736-5160
fpsn.net, Inc.

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

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




query to update record by the position of row

2002-07-09 Thread Pichan M.

Is there a query to update record by specify the position of record or row?

update tableA set col_name = somthing ...( at row number 123)

thanks for help!

Regards,

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


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

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




Re: query to update record by the position of row

2002-07-09 Thread Dan Nelson

In the last episode (Jul 09), Pichan M. said:
 Is there a query to update record by specify the position of record
 or row?
 
 update tableA set col_name = somthing ...( at row number 123)

SQL tables do not have row numbers.  The only way to absolutely
identify a record is by a unique ID in the record.

SQL queries have row numbers, but the only way to guarantee a
particular record appears in the same row every time you do the query
is by adding an ORDER BY unique_column clause.

Just add an INTEGER AUTO_INCREMENT column to your table and use that
when you want a particular record.

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




mysql replication

2002-07-09 Thread sinu

Hi All,

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

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

regds,




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

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




Char type changes to Varchar type

2002-07-09 Thread Michael Ivanyo

I am using MySql with InnoDB and have just discovered
that tables created using char types show up as
varchars when I type, describe tableName.  Previously,
I was using MyIsam tables and did not see char types
being changed to varchars so I am a bit puzzled.

This is true for almost all of the tables I've
created, only a couple of tables retained the char
type as specified in my create table script.

Is this documented behavior?  I haven't been using
MySql very long and haven't seen it mentioned
anywhere.

--Michael

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

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

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




Token parsing incorrect behavior

2002-07-09 Thread robbat2

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

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

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

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

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

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

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

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

Submitter-Id:  submitter ID
Originator:Robin Johnson
Organization:
Orbis-Terrarum Networks

MySQL support: none
Synopsis:  Token parsing incorrect behavior with hexadecimal like identifiers 
 
Severity:  serious 
Priority:  medium  
Category:  mysql
Class: sw-bug  
Release:   mysql-3.23.51-robbat2 (yes)
The -robbat2 extra tag on the version is just an identifer I use to identify 
all of my MySQL servers.

Environment:

System: Linux matchbox 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/local/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc-3.1/configure --enable-languages=c,c++,f77,objc,java
Thread model: single
gcc version 3.1
Compilation info: CC='gcc'  CFLAGS='-O3 -DUSE_SYMDIR'  CXX='gcc'  CXXFLAGS='-O3 
-felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Jun 24 16:51 /lib/libc.so.6 - libc-2.2.5.so
-rwxr-xr-x1 root root  1260480 Apr 15 06:44 /lib/libc-2.2.5.so
-rw-r--r--1 root root  2310808 Apr 15 07:02 /usr/lib/libc.a
-rw-r--r--1 root root  178 Apr 15 06:55 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr/local/mysql --with-innodb --with-comment 
--with-extra-charsets=all --with-server-suffix=-robbat2 --enable-local-infile 
--enable-assembler --with-mysqld-ldflags=-all-static --with-bdb 'CFLAGS=-O3 
-DUSE_SYMDIR' 'CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti' CXX=gcc


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

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




Re: Char type changes to Varchar type

2002-07-09 Thread Dan Nelson

In the last episode (Jul 09), Michael Ivanyo said:
 I am using MySql with InnoDB and have just discovered that tables
 created using char types show up as varchars when I type, describe
 tableName.  Previously, I was using MyIsam tables and did not see
 char types being changed to varchars so I am a bit puzzled.
 
 This is true for almost all of the tables I've created, only a couple
 of tables retained the char type as specified in my create table
 script.
 
 Is this documented behavior?  I haven't been using MySql very long
 and haven't seen it mentioned anywhere.

http://www.mysql.com/doc/S/i/Silent_column_changes.html

  * If any column in a table has a variable length, the entire row is
variable-length as a result. Therefore, if a table contains any
variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR columns
longer than three characters are changed to VARCHAR columns. This
doesn't affect how you use the columns in any way; in MySQL,
VARCHAR is just a different way to store characters. MySQL performs
this conversion because it saves space and makes table operations
faster. See section 7 MySQL Table Types.

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




Significance of /*!32312 IF NOT EXISTS*/;

2002-07-09 Thread Todd Cary

In my mysql dump of a DB using the -B switch, I get

CREATE DATABASE /*!32312 IF NOT EXISTS*/ sfyc;

What is the significance of /*!32312 IF NOT EXISTS*/ - the /*!32312?  Isn't
the statement commented out?

With the CREATE TABLE, what happens if the table already exists?

Todd

--
Todd Cary
Ariste Software
2200 D Street Extension
Petaluma, CA 94952
707-773-4523
[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: Database documentation

2002-07-09 Thread mos

At 01:15 PM 7/9/2002, you wrote:
Hello list.

At the end of a db programming job (using php) I have been asked for a 
document describing in details the structure of a MySQL database.
The purpose of the document is to make other DB people able to manage and 
interface the database (I can figure out that there is also the intent to 
impress the customer by graphic and heavy paper).
Could you please suggest me some source where I could learn about the best 
standard methods to describe a DB structure ?
Is there any tool which is able to produce this kind of document 
semi/automatically ?

gg


gg,

Try Visiomodeler from MS. Download at 
http://download.microsoft.com/download/visio2000enterprise/ORMtool/3.1/WIN98/EN-US/msvm31.exe.
Use ODBC to access MySQL. It can reverse engineer your MySQL database and 
can generate SQL to build your database. Oh yeah, one more thing, it's 
free. :) It also has excellent PDF documentation on how to use case tools.

Also if you just want to report on the structure, try MySQLFront from 
http://www.anse.de/mysqlfront/. Also EMS MySQLMgr has much better reporting 
and you can get a 30 day eval from http://ems-hitech.com/mymanager/.

Mike


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

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




Re: Char type changes to Varchar type

2002-07-09 Thread mos

At 10:19 PM 7/9/2002, you wrote:
I am using MySql with InnoDB and have just discovered
that tables created using char types show up as
varchars when I type, describe tableName.  Previously,
I was using MyIsam tables and did not see char types
being changed to varchars so I am a bit puzzled.

This is true for almost all of the tables I've
created, only a couple of tables retained the char
type as specified in my create table script.

Is this documented behavior?  I haven't been using
MySql very long and haven't seen it mentioned
anywhere.

--Michael

Michael,
 Do not panic, this is normal for MySQL. If you have at least one 
VarChar field in your table, then they will all be set to VarChar. If you 
want to change them back to Char(x), then you need to change them all at 
once using a single Alter Table command. You could also try MySQLFront or 
MySqlMgr. See section 6.5.3.1 Silent Column Specication Changes.

Here is an excerpt from the manual:
If any column in a table has a variable length, the entire row is 
variable-length as a
result. Therefore, if a table contains any variable-length columns 
(VARCHAR, TEXT, or
BLOB), all CHAR columns longer than three characters are changed to VARCHAR 
columns.
This doesn't aect how you use the columns in any way; in MySQL, VARCHAR is just
a dierent way to store characters. MySQL performs this conversion because 
it saves
space and makes table operations faster.


Mike


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

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




Re: Significance of /*!32312 IF NOT EXISTS*/;

2002-07-09 Thread Jeremy Zawodny

On Tue, Jul 09, 2002 at 08:51:05PM -0700, Todd Cary wrote:
 In my mysql dump of a DB using the -B switch, I get
 
 CREATE DATABASE /*!32312 IF NOT EXISTS*/ sfyc;
 
 What is the significance of /*!32312 IF NOT EXISTS*/ - the
 /*!32312?  Isn't the statement commented out?

That's a hint to MySQL that the command only works in versions 3.23.12
or later.

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

MySQL 3.23.51: up 41 days, processed 900,855,237 queries (253/sec. avg)

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

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




Mysql++

2002-07-09 Thread Hari Dass Khalsa

I downloaded mySql++ for mac OS X.  It didn't give me any header files 
but the examples required them. Where can I get those or do I not need 
them?
===
Hari Dass S. Khalsa
[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




Connectiing mySQL db on Localhost to mySQL DB on Server

2002-07-09 Thread Thomas Edison Jr.

Hi,

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

Thanks,
T. Edison Jr.



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

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

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