RE: Newbie question -- PHP document

2003-07-21 Thread George Pitcher
Nate,

The absence of details on the db and table structure prevent testing.

However, if you 'View Source' you'll see thet the form isn't being sent to
any response page, so there's nothing to handle the query and show the
results.

'form action=?form=yes method=post'

Hope this helps

George in Oxford

 -Original Message-
 From: Nate Dawg [mailto:[EMAIL PROTECTED]
 Sent: 21 July 2003 6:56 am
 To: [EMAIL PROTECTED]
 Subject: Newbie question -- PHP document


 Thanks for the help with my first question. using the USE mysql
 command did
 the trick.

 The book I am reading (
 http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid
 =2T67AHHR6Wisbn=0764516507itm=1 )
 PHP  MySQL for Dummies  has a CD Rom with several PHP files. One
 is called
 mysql_send.php. Book says  The program mysql_send.php has one simple
 function: to execute queries and display the results. Copy the
 program from
 the CD into the directory where you are developing your web application,
 change the information  in lines 11-13 and point your browser at the
 program.

 Ok so the mysql_send.php loads great. ( Apache 2 is the web
 server the file
 is in the htdocs folder. ) But when I try to run any command I get no
 results.

 Other php pages work.

 Please take a look.

 The first one just verifies the MySQL database is up.

 http://warriorscamp.bbs.us/mysql_up.php

 mysql_send:

 http://warriorscamp.bbs.us/mysql_send.php

 If anyone can tell me ( or point me in the correct direction ) why the
 mysql_send.php does not respond to anything I do I wouldappreciate it.

 
 For Your Protection This Email Was Scanned by Apollo Systems MailServer.
 For More Services Please Visit http://www.apollosystems.net
 


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Newbie question -- PHP document

2003-07-21 Thread antoine druon
En réponse à George Pitcher [EMAIL PROTECTED]:
 -- Début du message d'origine 
 Nate,
 
 The absence of details on the db and table structure prevent
 testing.
 
 However, if you 'View Source' you'll see thet the form isn't
 being sent to
 any response page, so there's nothing to handle the query and
 show the
 results.
 
 'form action=?form=yes method=post'
 
 Hope this helps
 
 George in Oxford
 
  -Original Message-
  From: Nate Dawg [mailto:[EMAIL PROTECTED]
  Sent: 21 July 2003 6:56 am
  To: [EMAIL PROTECTED]
  Subject: Newbie question -- PHP document
 
 
  Thanks for the help with my first question. using the USE
 mysql
  command did
  the trick.
 
  The book I am reading (
 
 http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid
  =2T67AHHR6Wisbn=0764516507itm=1 )
  PHP  MySQL for Dummies  has a CD Rom with several PHP
 files. One
  is called
  mysql_send.php. Book says  The program mysql_send.php has
 one simple
  function: to execute queries and display the results. Copy
 the
  program from
  the CD into the directory where you are developing your web
 application,
  change the information  in lines 11-13 and point your
 browser at the
  program.
 
  Ok so the mysql_send.php loads great. ( Apache 2 is the web
  server the file
  is in the htdocs folder. ) But when I try to run any command
 I get no
  results.
 
  Other php pages work.
 
  Please take a look.
 
  The first one just verifies the MySQL database is up.
 
  http://warriorscamp.bbs.us/mysql_up.php
 
  mysql_send:
 
  http://warriorscamp.bbs.us/mysql_send.php
 
  If anyone can tell me ( or point me in the correct direction
 ) why the
  mysql_send.php does not respond to anything I do I
 wouldappreciate it.
 
 
 
**
**
  For Your Protection This Email Was Scanned by Apollo Systems
 MailServer.
  For More Services Please Visit http://www.apollosystems.net
 
 
**
**
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 --- Fin du message d'origine -

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



java , mysql and php

2003-07-21 Thread antoine druon
I have an intranet, a database mysql (i admin with phpmyadmin)
I use a program java in order to put data in mysql and i want to know 
if it is possible to put prog java in php page on my intranet ?
I want to start my program on the web ?

please help!
excuse me for my english 
antoine

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: joining two columns from two different tables in a query - solved

2003-07-21 Thread Veysel Harun Sahin
Thanks Michale. The problem is solved.:)

Michael Satterwhite [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday 20 July 2003 14:18, Veysel Harun Sahin wrote:
 Hello,

 I have to join two columns from different tables in a query. Assume that
 I have two tables:

 staff
 idcompany_Id   name
 11FirstName
 21SecondName
 32ThirdName

 company
 company_Id  owner
 1MyOwnerName
 2SecondOwnerName

 Here I need to join the columns staff.name and company.owner from two
 tables with the name joined_column so I can do order by on them. For
 example when I query two tables with the company_id = 1 I want to get a
 resultset like this:

 joined_column
 
 FirstName
 MyOwnerName
 SecondName

 Any comments?

This is a UNION query. For example:

Select name as Joined_column from Staff where company_id = 1
UNION
Select owner as Joined_column from company where company_id = 1;

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/Gv6YjeziQOokQnARAmoLAKCf6NSmFaLG5foQYZtbHpeGuUZJOgCgrINR
Q1SFb1eu7DUXAIV/44savs8=
=4h+/
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



mysqld --myisam-recover=[option,[option]]

2003-07-21 Thread Tom Roos
hi listers

does this option only apply when the mysqld starts up or each time a table is opened 
for read/write?

thanks

_  ___   _  __
   /______/ /   ___/ /   \   //
/   /  /   //   / /   ^  v /
   /   /  /   /__/   / /   /  \/ /   /
  /_ /  /__ / /_ /  /_ /

Cell: 083 440 2213
Ph:  021 980 4969



Re: MySQL core certification revision - clients

2003-07-21 Thread Carsten Pedersen
Hello,

On Sun, 2003-07-20 at 14:59, Stefan Hinz wrote:
 Matthew,
 
  Hi, I'm clear as to what is meant by The mysql client in the MySQL core
  certification revision check list. I understand that the mysql database
  itself is the server. Would client then be any program that talks to the
  server? Perhaps it is referring to mysql, the command line tool?

Just a few small note to qualify Stefan's explanations: 

The mysql client as written in the list that you speak of in the
Candidate Guide on
http://www.mysql.com/certification/candguide/sec-core.html
does indeed refer specifically to the client program mysql (or
mysql.exe on Windows), so your interpretation of this is correct.

 Client programs are indeed programs that talk with the server. The
 server, however, is not the database, but rather the program that
 manages databases (allow/deny access to databases and their tables,
 modify tables structures, change contained data, etc.).

 MySQL provides a number of client programs for various purposes, like
 controlling the server, backing up databases, etc. One of those
 programs is mysql, which is a command line interface (CLI).
 
 The names of programs in a MySQL binary distribution can be somewhat
 confusing: mysqld is the server, while mysql is the (main) CLI client.
 
  I understand client side programs, examples being: mysqladmin, mysqldump,
  and mysqlimport. These are known as mysql client commands also?
 
 Those are client (side) programs, not client commands. You use those
 programs to issue (client) commands that are sent to the server.

Hmm - Stefan, you need to read that particular page more carefully :-)

The line that is being discussed is this one, which appears as a subject
under The mysql client:

  * Differentiate between mysql client commands and SQL commands

In this context, a client command is one such as quit, rehash, 
connect (They are listed on http://www.mysql.com/doc/en/mysql.html),
which is processed directly by the mysql program. An SQL command, on
the other hand, is an e.g. SELECT or INSERT statement that is sent to
the server for processing. 

Note that just because a command is a client command, this does not
necessarily infer that no client/server communication takes place.

Best regards,

Carsten H. Pedersen
Certification Manager, MySQL AB

-- 
Warning: Certification can seriously increase your wealth!
http://www.mysql.com/certification

Carsten Pedersen, Certification Manager
MySQL AB, http://www.mysql.com
Office: +45 56 36 16 10



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Problem in connecting to mysql from MSAccess 2000

2003-07-21 Thread Gilbert Wu
Hi,

I've set up a ODBC DSN to connect to Mysql. This DSN works fine with MS Excel. 
However, it returned the following error when I tried to link some Mysql tables from 
Access 2000:

ODBC--call failed.
[MySQL][ODBC 3.51 Driver][mysql-4.0.4-beta-max-nt]Access denied for user: '@my ip 
address here' to database 'tradingdata' (#1044).

Any help would be much appreciated.

Regards,

Gilbert Wu

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Subselect in 4.0.12-max with --new option

2003-07-21 Thread Victoria Reznichenko
[EMAIL PROTECTED] wrote:
 
 I was reading the manual and it said that the subselect is only
 available in 4.1 or using the 4.0.12 with the mysqld ?new command line
 to start it.
 
 But it doesn?t working!! So I downloaded the 4.1 alpha version with the
 same problem. The error is:
 
 ERROR 1064: You have an error in your SQL syntax.  Check the manual that
 corresponds to your MySQL server version for the right syntax to use
 near ?.
 
 Any ideas? I need subselect working. Please help!!!

You can't turn on subselects with --new option in 4.0.x versions. They are only works 
since 4.1.0.


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





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Foreign Key definition

2003-07-21 Thread Egor Egorov
Michael Satterwhite [EMAIL PROTECTED] wrote:
 
 I'm trying to add a foreign key to a table. All tables are INNODB. Table a has 
 following partial Definition:
 
 TableA
 ( Fld1 int Primary Key,...
 )
 
 TableB
 (Fld2 int Primary Key,
 Fld1 int not null, ...
 )
 
 I use the following Statement:
 
Alter Table TableB Add Constraint FK1 (Fld1) References TableA (Fld1) on
delete cascade;
 
 When I run that statement, I get the following error:
 
You have an error in your SQL syntax.  Check the manual that corresponds to
your MySQL server version for the right syntax to use near '(SetNo)
References BackupSets (SetNo) ON DELETE CASCADE' at lin
 

Alter table doesn't contain SetNo column, BackupSets table .. So, provide your ALTER 
TABLE statement.



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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Valgrind warnings using a threaded C app

2003-07-21 Thread Sitsofe Wheeler
Hello,

I am using a threaded C program and each thread creates its own
connection to mysql database using mysql_init(). When I run Valgrind on
the program it reports that there has been a small leak stemming from
several mysql_init and one mysql_real_connect. I have read
http://www.mysql.com/doc/en/Threaded_clients.html but despite adding
my_thread_init(), my_thread_end() and linking against mysqlclient_r  a
leak is still reported. Here is some of the output valgrind produces:

==10028== 23 bytes in 1 blocks are still reachable in loss record 1 of 13
==10028==at 0x40166BC0: malloc (vg_clientfuncs.c:103)
==10028==by 0x40008C2B: _dl_new_object (in /lib/ld-2.2.5.so)
==10028==by 0x400049EE: _dl_map_object_from_fd (in /lib/ld-2.2.5.so)
==10028==by 0x40005DB6: _dl_map_object_internal (in /lib/ld-2.2.5.so)
==10028==by 0x42112307: dl_open_worker (in /lib/i686/libc-2.2.5.so)
==10028==by 0x4000B4B2: _dl_catch_error_internal (in /lib/ld-2.2.5.so)
==10028==by 0x421128E0: _dl_open (in /lib/i686/libc-2.2.5.so)
==10028==by 0x42113610: do_dlopen (in /lib/i686/libc-2.2.5.so)
==10028==by 0x4000B4B2: _dl_catch_error_internal (in /lib/ld-2.2.5.so)
==10028==by 0x421134BB: __libc_dlopen (in /lib/i686/libc-2.2.5.so)
==10028==by 0x420F52C6: __nss_lookup_function (in /lib/i686/libc-2.2.5.so)
==10028==by 0x420F5B95: __nss_lookup (in /lib/i686/libc-2.2.5.so)
==10028==by 0x420F6A5E: __nss_services_lookup (in /lib/i686/libc-2.2.5.so)
==10028==by 0x420FA180: getservbyname_r@@GLIBC_2.1.2 (in /lib/i686/libc-2.2.5.so)
==10028==by 0x420F9F7E: getservbyname (in /lib/i686/libc-2.2.5.so)
==10028==by 0x4035DFA5: mysql_once_init (in 
/usr/lib/mysql/libmysqlclient_r.so.10.0.0)
==10028==by 0x4035DEBB: mysql_init (in /usr/lib/mysql/libmysqlclient_r.so.10.0.0)
...

Is this report spurious? If not what am I doing wrong to cause this
leak?

I am running mysql  Ver 11.18 Distrib 3.23.56, for pc-linux (i686) on
RedHat 7.3. If I have the wrong list, please point me toward the correct
one!


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to write query to select the Max(version) for each unique file_name record?

2003-07-21 Thread Michael Satterwhite
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday 20 July 2003 22:59, Tanamon wrote:
 ++---+--+

 | id | file_name | max(version) |

 ++---+--+

 |  6 | ffour |2 |
 |  1 | fone  |3 |
 |  5 | fthree|1 |
 |  2 | ftwo  |2 |

 ++---+--+
 4 rows in set (0.02 sec)

 The query below returns the empty set.

 mysql select id, file_name, max(version) from test group by file_name
 having max(version);
 Empty set (0.00 sec)

Try this:
Select id, file_name, max(version) from test group by file_name;

The having clause in your query is redundant as the max() aggregate already 
limits it to the maximum value.

- ---Michael
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/G8GujeziQOokQnARArVPAJ9TdchBj8tExxitns8PkRSnGbMFugCgmhTW
et7HpBp07nWh+KD//xqDLbM=
=p8/8
-END PGP SIGNATURE-


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



replication problem

2003-07-21 Thread Naoufal Rih
Hi
I have 3 machines M1 M2 and M3, i need to setup the following :
M1 is the master
M2 is reading from M1
M2 is a master for M3
M3 is reading from M2
The problem i got, is when i run a command in M2, it's replicated in M3, 
but when the command is being run in M1, it's replicated in M2 but not in 
M3. does anybody know how i can fix this problem ?
ThAnX a LoT



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: replication problem

2003-07-21 Thread Egor Egorov
Naoufal Rih [EMAIL PROTECTED] wrote:
 Hi
 I have 3 machines M1 M2 and M3, i need to setup the following :
 M1 is the master
 M2 is reading from M1
 M2 is a master for M3
 M3 is reading from M2
 The problem i got, is when i run a command in M2, it's replicated in M3, 
 but when the command is being run in M1, it's replicated in M2 but not in 
 M3. does anybody know how i can fix this problem ?

Add log-slave-updates option:
http://www.mysql.com/doc/en/Replication_Options.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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysqld --myisam-recover=[option,[option]]

2003-07-21 Thread Victoria Reznichenko
Tom Roos [EMAIL PROTECTED] wrote:
 
 does this option only apply when the mysqld starts up or each time a table is opened 
 for read/write?

On open.


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





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: myisamchk -R

2003-07-21 Thread Egor Egorov
PaT! [EMAIL PROTECTED] wrote:
 
 I need a hint how to use myisamchk
 
 I use this syntax in a shell but it doesn't work 
 
 myisamchk -R=ID \mysql\data\db\mytable.myi
 
 ID is the index name I want to use to sort the table
 
 I'm using mysql 4.0.13 on Win 2K server

myisamchk -Rindex_number /path/to/the/index/file/table_name.MYI

Index number you can see using SHOW INDEX command. For example:

myisamchk -R1 /var/lib/mysql/mydatabase/table1.MYI



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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: quotas

2003-07-21 Thread Yves Goergen
Hi,
I'll have the same problem, too, in some months...

What I was thinking about is to create a cron job that runs say every hour and 
calculates each user's database size. Comparing it with a stored per-user value, the 
script (running as kind of a mysql superuser) REVOKEs or re-GRANTs UPDATE and INSERT 
rights to the user on this database. So he can still DELETE his data to some smaller 
size but can't INSERT any more data.

This leaves a gap of about an hour to the user, where he can go over quota, but that's 
all. Maybe one could automate this script that is sends a warning to the sysadmin when 
a database is over-quota for more than 2 days or so. Maybe it can also send a warning 
to the user immediately...

I don't know yet in what language to write this script. I thought of PHP because I 
already have the required code snippets there, but using PHP for system scripts 
doesn't seem to work really good. Guess I'll have to learn some Perl for that...
If anyone already has such a script of is going to write one, I'd be thankful for a 
copy of it :)

-yves
 
-Ursprüngliche Nachricht- 
Von: LaCraze [EMAIL PROTECTED]
An: [EMAIL PROTECTED]
Gesendet: Montag, 21. Juli 2003 06:22
Betreff: quotas 


 Hi,
 
 I am a Redhat user. Presently using RH 7.3 and mysql 3.23. I am doing some
 web hosting services. I have system quota installled and enable. Is there a
 way, to tell mysql to have individual databases in my user's directories
 instead of /var/lib/mysql/ ?
 
 For example user1 has a web space in /home/hostings/user1 and his database
 in /home/hostings/user1/data and user2 will have his web space in
 /home/hostings/user2 and database in /home/hostings/user2/data
 
 I need to be able to do this as we are renting out disk space. There are
 some customers who have their web space quota within the limited but
 exceeded in mysql and we are loosing alot of bandwidth too, thus loosing
 money.
 
 regards
 
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: link broken

2003-07-21 Thread Curtis Maurand

Download mysqlcc instead.  It works much better and is easier to use.  
mysqlgui is deprecated as far as i know.

Curtis

On Thursday 17 July 2003 18:08, Emanuele wrote:
 HI!
 I have problem to download
 http://www.mysql.com/Downloads/mysqlgui/mysqlgui-win32-static-1.7.5-2.zip

 Is there some problem?

 Thanks.
 Emanuele

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Select via Perl

2003-07-21 Thread Curtis Maurand
#!/usr/bin/perl

use DBI;

my $database = desired database;
my $dbhost = desired database host;
my $username = your username;
my $password = your password;
my $data_source = DBI:mysql:$database:$dbhost;
my $dbh = DBI-connect($data_source, $username, $password);
my $sourcefile = the name and path of the datafile you're trying to read;
my $sourcevar;
my $dbquery = select * from table where varialbe like %$sourcevar%;
my $resultset;
my $count;
open (MYSOURCE, $sourcefile);

while (MYSOURCE)
  {
   $sourcevar = $_;
   $sth-prepare($dbquery);
   $sth-execute;

   while ($resultset = $sth-fetchrow())
 {
   if ($resultset eq $sourcvar)
{
   # do something
}
   else
{
  # do something else
}
  $sth-finish;
 }
  }
$dbh-disconnect;
close(MYSOURCE);
# we're done.

Its not very efficient.  It'll execute a lot of select statements, but it'll 
do what you want.

if you're %var% is only one select, then you fetch it all into and array and 
recursively search through the array (memory permitting.)  You could also 
parse your source file into an array and run through both arrays recursively.  
I'm just not doing this here.

$myresult = $sth-fetchall_arrayref();
  while (MYSOURCE);
{
  $sourcevar = $_;
  for ($count .. $#{$myresult})
{
  if ($sourcevar eq $myresult[$count])
   {
 # do something
   }
}
}

$sth-finish;
$dbh-disconnect;
close(MYSOURCE);
# we're done




On Friday 18 July 2003 04:21, Rudy Metzger wrote:
 Can you please post the source code?

 In any case, I would consider using DBI.

 Cheers
 /rudy

 -Original Message-
 From: Ashwin Kutty [mailto:[EMAIL PROTECTED]
 Sent: donderdag 17 juli 2003 17:12
 To: [EMAIL PROTECTED]
 Subject: Select via Perl

 I am trying to read a file and see if the contents of it exists in the
 DB
 or not and am trying to do it via a Select.

 I try to do a select * into outfile /tmp/result.txt from table where
 field
 like %$var%; but it always goes through the first two lines of the
 input
 file and then says the file already exists.

 Is this because I read each line of a file in a for loop in perl and the
 mysql query tries to recreate the outfile each time?  Is there any other
 way I can dump the results of the select to a file of some sort?

 Thanks..


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



unsuscribe

2003-07-21 Thread Martin Quevedo
unsuscribe



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


group by to return 1 row.

2003-07-21 Thread John Larsen
Is it at all possible to group by and have it return all variables from 
a single row based on a max() criteria of a single variable?

For instance in SPSS I can sort by id number  descending then in an 
aggregate have it say that newvar2=first(newvar) or last(newvar).??

Just a thought?? any ideas?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: doskey feature in mysql !!

2003-07-21 Thread Ray Thompson
Hmmm. Do F1 or F3 produce the last command given?

--
Ray Thompson

 
 I remember in WIN NT 4 if we type cmd at the run prompt, then 
 command prompt use to come up
 and we can repeat the commands i.e. doskey feature is available.
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: doskey feature in mysql !!

2003-07-21 Thread Victor Pendleton
Depending on your version of windows you may have to type doskey at the
command prompt to turn on the doskey feature.

-Original Message-
From: Ray Thompson [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 7:47 AM
To: Neeraj Vasudeva; [EMAIL PROTECTED]
Subject: RE: doskey feature in mysql !!


Hmmm. Do F1 or F3 produce the last command given?

--
Ray Thompson

 
 I remember in WIN NT 4 if we type cmd at the run prompt, then 
 command prompt use to come up
 and we can repeat the commands i.e. doskey feature is available.
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: mysqlbinlog suggestion

2003-07-21 Thread Luc Foisy
I suppose datetime would be the better option here

-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 10:00 AM
To: [EMAIL PROTECTED]
Subject: Re: mysqlbinlog suggestion


Luc Foisy [EMAIL PROTECTED] wrote:
 
 allowing date range options to the command line would be really neat

Date or datetime option?


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





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL++ Visual Studio.Net

2003-07-21 Thread Ron Ohmer
Has anyone gotten this to compile, and if so can you point me in the right direction 
of the library?
 
Thanks


Re: safe_show_database on windows?

2003-07-21 Thread Victoria Reznichenko
Yves Goergen [EMAIL PROTECTED] wrote:
 I'm wondering if I can set safe_show_database on my Windows 2000 MySQL 3.23.56-nt.
 Here's what I did:
 
 --- (c:\winnt\my.ini)
 [mysqld]
 set-variable = safe_show_database=1
 ---
 
 - NT Service didn't want to (re)start anymore.

You should specify:
[mysqld]
safe-show-database

 
 ---
 mysql show variables like safe%;
 ++---+
 | Variable_name  | Value |
 ++---+
 | safe_show_database | OFF   |
 ++---+
 1 row in set (0.00 sec)
 
 mysql set session safe_show_database=ON;
 ERROR 1064: You have an error in your SQL syntax near 'safe_show_database=ON' at 
 line 1
 mysql set session safe_show_database;
 ERROR 1064: You have an error in your SQL syntax near 'safe_show_database' at line 1
 ---
 
 So why doesn't this work? I have successfully set the variable on my Linux box (same 
 MySQL version):
 
 --- (/etc/my.cnf)
 [mysqld]
 safe-show-database
 ---
 
 Isn't this feature available on Windows?

Available, but your definitions on Linux and Windows are different.

At least I've found nothing in the doc that would say so.
 Ok, I couldn't set it to OFF on my Linux either, inside the mysql shell. That's 
 another point, why can't I set a mysql variable with SET command? What the heck is 
 going on in there?

You can't set this option with SET command.


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





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Newbie question -- PHP document

2003-07-21 Thread Ray Thompson
There might be an error in the code. 
Some Tech books will have a website dedicated to any corrections of it's contents.  
The site location might be mentioned in the intro or you can search the publisher's 
web site for it.

 
  Ok so the mysql_send.php loads great. ( Apache 2 is the web
  server the file
  is in the htdocs folder. ) But when I try to run any 
 command I get no
  results.
 

--
Ray Thompson


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



set/show variables

2003-07-21 Thread Bogdan TARU

Hi everyone,

 I have recently installed MySQL 4.0.13 on a freebsd box, and I have
stumbled into the following problem:

 I have set the following in /etc/my.cnf:

set-variable= max_connections=100
set-variable= wait_timeout=60

 (tried with and w/o 'set-variable ='). Then I restarted mysql, and a
'show variables' would show me:

 wait_timeout| 28800

 And a 'mysqladmin variables' would report:

 wait_timeout| 60

 What am I doing wrong here?

 Thank you,
 bogdan




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL++ Visual Studio.Net

2003-07-21 Thread Martin Gainty
I would export the makefile
and try to include the MySQL library with the other libraries
nmake -f makefile

-Martin
- Original Message -
From: Ron Ohmer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 21, 2003 6:15 AM
Subject: MySQL++  Visual Studio.Net


 Has anyone gotten this to compile, and if so can you point me in the right
direction of the library?

 Thanks


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: set/show variables

2003-07-21 Thread Martin Gainty
mysqladmin has the capability to specify the my.ini file to read on startup
under  my.ini Setup 
hth,
Martin
- Original Message -
From: Bogdan TARU [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 21, 2003 6:37 AM
Subject: set/show variables



 Hi everyone,

  I have recently installed MySQL 4.0.13 on a freebsd box, and I have
 stumbled into the following problem:

  I have set the following in /etc/my.cnf:

 set-variable= max_connections=100
 set-variable= wait_timeout=60

  (tried with and w/o 'set-variable ='). Then I restarted mysql, and a
 'show variables' would show me:

  wait_timeout| 28800

  And a 'mysqladmin variables' would report:

  wait_timeout| 60

  What am I doing wrong here?

  Thank you,
  bogdan




 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: set/show variables

2003-07-21 Thread Bogdan TARU

Hi Martin,

 Hm. Don't really get it. Basically both mysqladmin and 'show variables'
should read these variables from the mysql server, right? Why then would
they give separate results?

 Thanks,
 bogdan


On Mon, 21 Jul 2003, Martin Gainty wrote:

 mysqladmin has the capability to specify the my.ini file to read on startup
 under  my.ini Setup 
 hth,
 Martin
 - Original Message -
 From: Bogdan TARU [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 21, 2003 6:37 AM
 Subject: set/show variables


 
  Hi everyone,
 
   I have recently installed MySQL 4.0.13 on a freebsd box, and I have
  stumbled into the following problem:
 
   I have set the following in /etc/my.cnf:
 
  set-variable= max_connections=100
  set-variable= wait_timeout=60
 
   (tried with and w/o 'set-variable ='). Then I restarted mysql, and a
  'show variables' would show me:
 
   wait_timeout| 28800
 
   And a 'mysqladmin variables' would report:
 
   wait_timeout| 60
 
   What am I doing wrong here?
 
   Thank you,
   bogdan
 
 
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Documentation for new MySQL 4.1 features

2003-07-21 Thread Paul DuBois
At 16:02 +0200 7/21/03, Edgar Kraus wrote:
Hello,

is there any detailed documentation out,
which explains the new character set feature in version 4.1,
where a specific character set can be used for tables and/or columns?
Thanks
Eddie Kraus
http://www.mysql.com/doc/en/Charset.html

--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: set/show variables

2003-07-21 Thread Victoria Reznichenko
Bogdan TARU [EMAIL PROTECTED] wrote:
 
Hi Martin,
 
 Hm. Don't really get it. Basically both mysqladmin and 'show variables'
 should read these variables from the mysql server, right? Why then would
 they give separate results?

mysql command-line client runs in interactive mode and gets value for 'wait_timeout' 
from 'interactive_timeout' variable which is 28800 by default. mysqladmin shows value 
which you specify in the my.cnf file.

 
 Thanks,
 bogdan
 
 
 On Mon, 21 Jul 2003, Martin Gainty wrote:
 
 mysqladmin has the capability to specify the my.ini file to read on startup
 under  my.ini Setup 
 hth,
 Martin
 - Original Message -
 From: Bogdan TARU [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 21, 2003 6:37 AM
 Subject: set/show variables


 
  Hi everyone,
 
   I have recently installed MySQL 4.0.13 on a freebsd box, and I have
  stumbled into the following problem:
 
   I have set the following in /etc/my.cnf:
 
  set-variable= max_connections=100
  set-variable= wait_timeout=60
 
   (tried with and w/o 'set-variable ='). Then I restarted mysql, and a
  'show variables' would show me:
 
   wait_timeout| 28800
 
   And a 'mysqladmin variables' would report:
 
   wait_timeout| 60
 
   What am I doing wrong here?
 
 


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





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Select Limit question

2003-07-21 Thread mos
At 01:12 AM 7/20/2003, you wrote:
my table is small but I can't tell what is faster.. a max or a limit

mysql select max(counter) from web;
mysql select counter from web order by counter desc;
They seem to be the same in performance.

Regards,
Jake Johnson
[EMAIL PROTECTED]
Jake,
I tried them both on a million row table and they are the same 
speed (you should use the LIMIT 1 if using the order by counter desc 
because you only need 1 row returned.) Same speed also for InnoDb tables.

Mike


__
Plutoid - http://www.plutoid.com - Shop Plutoid for the best prices on
Rims, Car Audio, and Performance Parts.
On Sun, 20 Jul 2003, mos wrote:

 At 12:32 PM 7/20/2003, you wrote:
 This is probably easy, but I just can't to put my finger on it. I have a
 list of numbers (i.e. 1 to 175) and I want to do a select statement to
 get the highest number. I have tried the limit thing but not getting the
 right output. Can someone shed some light on this?
 
 TIA

 select * from table order by numcol desc limit 1

 Mike



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: myslq.sock

2003-07-21 Thread Egor Egorov
Creigh Shank [EMAIL PROTECTED] wrote:
 It appears that an application I've been trying to run (RelataMail/Relata 
 CRM) deletes the mysql.sock from my system.  I'm running Redhat 8.0 with 
 MySQL 4.0.13.  Is there any way to restore the mysql.sock file (eg, from 
 the rpm) without having to rebuild the whole system?  (Reinstalling MySQL 
 didn't help.)

Start MySQL server.
mysql.sock is created when MySQL server is started.



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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Slave not working....

2003-07-21 Thread Jeff McKeon
I had a power failure on the master and it bounced rather ungracefully.
Now I'm getting this error on the slave and it's not replicating.  Both
are ver 3.23

mysql slave start;
Query OK, 0 rows affected (0.00 sec)

mysql show slave status \G;
*** 1. row ***
Master_Host: 10.32.1.10
Master_User: repli
Master_Port: 3306
  Connect_retry: 60
   Log_File: db01tc0927-bin.035
Pos: 73
  Slave_Running: No
Replicate_do_db:
Replicate_ignore_db:
 Last_errno: 1062
 Last_error: error 'Duplicate entry '245937' for key 1' on query
'%'
   Skip_counter: 0
1 row in set (0.00 sec)

ERROR:
No query specified

How do I fix this?

Jeff McKeon
IT Manager
Telaurus Communications LLC
[EMAIL PROTECTED]
(973) 889-8990 ex 209 

***The information contained in this communication is confidential. It
is intended only for the sole use of the recipient named above and may
be legally privileged. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication, or any of its contents or attachments,
is expressly prohibited. If you have received this communication in
error, please re-send it to the sender and delete the original message,
and any copy of it, from your computer system. Thank You.***


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Slave not working....

2003-07-21 Thread Primaria Falticeni
Try recreate the replication (shut down the servers, copy the master
database into the slave place and so on).

- Original Message -
From: Jeff McKeon [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Monday, July 21, 2003 7:20 PM
Subject: Slave not working


 I had a power failure on the master and it bounced rather ungracefully.
 Now I'm getting this error on the slave and it's not replicating.  Both
 are ver 3.23

 mysql slave start;
 Query OK, 0 rows affected (0.00 sec)

 mysql show slave status \G;
 *** 1. row ***
 Master_Host: 10.32.1.10
 Master_User: repli
 Master_Port: 3306
   Connect_retry: 60
Log_File: db01tc0927-bin.035
 Pos: 73
   Slave_Running: No
 Replicate_do_db:
 Replicate_ignore_db:
  Last_errno: 1062
  Last_error: error 'Duplicate entry '245937' for key 1' on query
 '%'
Skip_counter: 0
 1 row in set (0.00 sec)

 ERROR:
 No query specified

 How do I fix this?

 Jeff McKeon
 IT Manager
 Telaurus Communications LLC
 [EMAIL PROTECTED]
 (973) 889-8990 ex 209

 ***The information contained in this communication is confidential. It
 is intended only for the sole use of the recipient named above and may
 be legally privileged. If the reader of this message is not the intended
 recipient, you are hereby notified that any dissemination, distribution
 or copying of this communication, or any of its contents or attachments,
 is expressly prohibited. If you have received this communication in
 error, please re-send it to the sender and delete the original message,
 and any copy of it, from your computer system. Thank You.***


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: myslq.sock

2003-07-21 Thread thierno.cisse
Hi, you don't oblige to reinstall MySQL.
One solution is to stop de mysqld (daemon) and restart it, this will
recreate 
the socket file.
Hope this help.

-Original Message-
From: Egor Egorov [mailto:[EMAIL PROTECTED] 
Sent: lundi 21 juillet 2003 15:59
To: [EMAIL PROTECTED]
Subject: Re: myslq.sock


Creigh Shank [EMAIL PROTECTED] wrote:
 It appears that an application I've been trying to run 
 (RelataMail/Relata
 CRM) deletes the mysql.sock from my system.  I'm running Redhat 8.0
with 
 MySQL 4.0.13.  Is there any way to restore the mysql.sock file (eg,
from 
 the rpm) without having to rebuild the whole system?  (Reinstalling
MySQL 
 didn't help.)

Start MySQL server.
mysql.sock is created when MySQL server is started.



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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Slave not working....

2003-07-21 Thread Jeff McKeon
I was hoping not to have to do that...

Jeff McKeon
IT Manager
Telaurus Communications LLC
[EMAIL PROTECTED]
(973) 889-8990 ex 209 

***The information contained in this communication is confidential. It
is intended only for the sole use of the recipient named above and may
be legally privileged. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication, or any of its contents or attachments,
is expressly prohibited. If you have received this communication in
error, please re-send it to the sender and delete the original message,
and any copy of it, from your computer system. Thank You.***



 -Original Message-
 From: Primaria Falticeni [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 21, 2003 12:27 PM
 To: MySQL LIST
 Subject: Re: Slave not working
 
 
 Try recreate the replication (shut down the servers, copy the 
 master database into the slave place and so on).
 
 - Original Message -
 From: Jeff McKeon [EMAIL PROTECTED]
 To: MySQL List [EMAIL PROTECTED]
 Sent: Monday, July 21, 2003 7:20 PM
 Subject: Slave not working
 
 
  I had a power failure on the master and it bounced rather 
  ungracefully. Now I'm getting this error on the slave and it's not 
  replicating.  Both are ver 3.23
 
  mysql slave start;
  Query OK, 0 rows affected (0.00 sec)
 
  mysql show slave status \G;
  *** 1. row ***
  Master_Host: 10.32.1.10
  Master_User: repli
  Master_Port: 3306
Connect_retry: 60
 Log_File: db01tc0927-bin.035
  Pos: 73
Slave_Running: No
  Replicate_do_db:
  Replicate_ignore_db:
   Last_errno: 1062
   Last_error: error 'Duplicate entry '245937' for key 1' on 
  query '%'
 Skip_counter: 0
  1 row in set (0.00 sec)
 
  ERROR:
  No query specified
 
  How do I fix this?
 
  Jeff McKeon
  IT Manager
  Telaurus Communications LLC
  [EMAIL PROTECTED]
  (973) 889-8990 ex 209
 
  ***The information contained in this communication is 
 confidential. It 
  is intended only for the sole use of the recipient named 
 above and may 
  be legally privileged. If the reader of this message is not the 
  intended recipient, you are hereby notified that any dissemination, 
  distribution or copying of this communication, or any of 
 its contents 
  or attachments, is expressly prohibited. If you have received this 
  communication in error, please re-send it to the sender and 
 delete the 
  original message, and any copy of it, from your computer 
 system. Thank 
  You.***
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



significant digits for division

2003-07-21 Thread Twibell, Cory L
Hi,

I am trying select field / 1 as Number from table1 where id = 1;
I don't want any rounding taking place, but MySQL is currently doing it.
How can I ask for a specific number of digits with division?

The field contains 1234.5678, MySQL returns 1234.57, don't want that!

Thanks,

Cory Twibell
Lockheed Martin Space Systems Company
Electronic Combat Development Systems
[EMAIL PROTECTED]
(303) 971-3184


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



safe_mysqld not letting go of tty on remote start

2003-07-21 Thread chad kellerman
Hey guys,  
Anyone ever notice that when you restart mysql ( whether is be thru
mysql.server or ${MYSQL}/bin/sae_mysqld  the tty stays connected.

  Thanks,
Chad


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: myslq.sock

2003-07-21 Thread MySQL

   It appears that an application I've been trying to run (RelataMail/Relata 
   CRM) deletes the mysql.sock from my system.  I'm running Redhat 8.0 with 
   MySQL 4.0.13.  Is there any way to restore the mysql.sock file (eg, from 
   the rpm) without having to rebuild the whole system?  (Reinstalling MySQL 
   didn't help.)

   Creigh


Sounds like you are running applications as root. Very bad.

Otherwise the 'user' that runs RelataMail should not be able to delete
files owned by the 'user' that runs mysqld.  There are dozens of ways
around this problem, the one of the easiest is to set a dedicated user
for mysqld (make an entry in /etc/password similar to the following --
adjusted for your system of course :)

mysql:x:27:27:MySQL:/usr/local/mysql:/bin/bash

and add the 'user' command to my.cnf :

# The MySQL server
[mysqld]
user= mysql


-- 
mysql, query

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: safe_mysqld not letting go of tty on remote start

2003-07-21 Thread gerald_clark
It writes a status message  to the screen, and overwrites your shell prompt.
Hit enter, and you will probably find that you have a prompt afterall.
chad kellerman wrote:

Hey guys,  
	Anyone ever notice that when you restart mysql ( whether is be thru
mysql.server or ${MYSQL}/bin/sae_mysqld  the tty stays connected.

 Thanks,
Chad
 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Slave not working....

2003-07-21 Thread MySQL

Since you are hoping to not repeat the replication setup, your one
chance is that the slave was fully synced at the time of the power
failure.  If you check the master, you will see that it is now using a
different log file (whenever mysqld stops/starts a new log is
created).  You can shutdown the slave, edit the master.info file to
point to the new logfile (there may be more than one) and cross
fingers.  PS.  If this is not fully understood, don't try it.


   I had a power failure on the master and it bounced rather ungracefully.
   Now I'm getting this error on the slave and it's not replicating.  Both
   are ver 3.23

   mysql slave start;
   Query OK, 0 rows affected (0.00 sec)

   mysql show slave status \G;
   *** 1. row ***
   Master_Host: 10.32.1.10
   Master_User: repli
   Master_Port: 3306
 Connect_retry: 60
  Log_File: db01tc0927-bin.035
   Pos: 73
 Slave_Running: No
   Replicate_do_db:
   Replicate_ignore_db:
Last_errno: 1062
Last_error: error 'Duplicate entry '245937' for key 1' on query
   '%'
  Skip_counter: 0
   1 row in set (0.00 sec)

   ERROR:
   No query specified

   How do I fix this?

   Jeff McKeon


-- 
mysql, query

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: safe_mysqld not letting go of tty on remote start

2003-07-21 Thread Paul DuBois
At 13:43 -0400 7/21/03, chad kellerman wrote:
Hey guys, 
	Anyone ever notice that when you restart mysql ( whether is be thru
mysql.server or ${MYSQL}/bin/sae_mysqld  the tty stays connected.

  Thanks,
Chad
This may be a function of your operating system.  I notice this when
I connect via ssh from Mac OS X to another system, start a background process,
and exit.  I have to ~ + Ctrl-Z, then kill -9 the ssh job.
I do not observe this behavior from, e.g., Linux.

--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: safe_mysqld not letting go of tty on remote start

2003-07-21 Thread chad kellerman
Actually evern if I hit enter it keeps the tty.  The only way I can get
it to release is to nohup the ${MYSQL}/bin/sae_mysqld, if not I actually
have to shutdown the term window and reconnect..


Chad

On Mon, 2003-07-21 at 13:57, gerald_clark wrote:
 It writes a status message  to the screen, and overwrites your shell prompt.
 Hit enter, and you will probably find that you have a prompt afterall.
 
 chad kellerman wrote:
 
 Hey guys,  
  Anyone ever notice that when you restart mysql ( whether is be thru
 mysql.server or ${MYSQL}/bin/sae_mysqld  the tty stays connected.
 
   Thanks,
 Chad
 
 
   
 
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



The MySQL Bug ?

2003-07-21 Thread Dyego Souza do Carmo
Hi,

   I'd found a bug when I'd tried to use blob fields and innoDb.
   To see the bug, do the follow:

   *) Create a database.
   *) Import the dump file that is attached to this e-mail.
  (cfgimpressao.dump)
   *) Use the following commands:

   select Ci_Descricao from cfgimpressao;
  You will see that there is a row where Ci_Descricao is Padrão.

   source mysql_blob_bug.sql
   
   select Ci_Descricao from cfgimpressao;
  Now, the record where Ci_Descricao is Padrão has disappear.
  The script you just executed didn't erase that. There are only
  update commands to change the blob contents.
   
The bug is:
The record where Ci_Descricao is Padrão mustn't be erased.


The files are:

cfgimpressao.dump - The Dump Of Table
mysql_blob_bug.sql - The File of Blob Bug

stored in the support.mysql.com/pub/mysql/secret


Tnks in advance !


innodb,mysql,help !


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


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



my.cnf for 3.23.56

2003-07-21 Thread Petre Agenbag
HI List
Need advise on a suitable my.cnf for 3.23.56 on SunOS5.8

MySQL is installed on a virtual machine with plenty of ram and swap space.
However, there is no my.cnf file currently, and mysql seems to lock up
completely from time to time even though system seems fairly stable
(although I saw some pretty hefty swap usage on the virtual nachine (while
the RAM was still reporting plenty available--strange or not?)).

Anyway, am hoping that a well defined my.cnf might do the trick here.
Anyone has a sample for me configured (equivalent to the my_large.cnf
usually accompanying the source)

I cannot find it on this particular machine.

PS, will/should having a my.cnf file help? Anything else I can check to see
what could cause this BEFORE I start hacking at the ASP code (could it be a
misbehaving ASP page causing this?)
PPS, it looked more like mysql was locking out users (too many
connections?), but I don't know SunOS that good to go and look for evidence
(there were no errors in the mysql logfiles, BUT, mysql was not configured
to log much it seems.


Thanks





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Support for Extended Stored Procedures

2003-07-21 Thread Charles Parker
Does MySQL have support for calling functions in C/C++ DLLs from trigger
scripts similar to the Extended Stored Procedures functionality provided in
SQL Sever? Thanks.

Charles...


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regular expresion replace possibility?

2003-07-21 Thread Dean Householder
Is it possible to run a query that will just alter text possibly using a regular 
expression?  I have about 250 rows that I want to strip quotes out of.  Does anyone 
know of an easy way to do this?

Dean

RE: Regular expresion replace possibility?

2003-07-21 Thread Mike Hillyer
UPDATE mytable SET mytext = REPLACE(mytext,'','');

Assuming you wised to strip a double quote, modify to suit.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Dean Householder [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 21, 2003 2:49 PM
 To: [EMAIL PROTECTED]
 Subject: Regular expresion replace possibility?
 
 
 Is it possible to run a query that will just alter text 
 possibly using a regular expression?  I have about 250 rows 
 that I want to strip quotes out of.  Does anyone know of an 
 easy way to do this?
 
 Dean
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Slave not working....

2003-07-21 Thread Jeff McKeon
Well it turned out we had table and index corruption on the master db
(db01) so I've fixed it and am rebuilding db02.  We're having a mgmt
meeting this wed to discuss updating the production servers to MySQL ver
4.x.

The current servers run RedHat 7.1 with a single Pent-III 933mhz with
256k L2 cache and 256MB RAM.

I'd like to pump the servers up to dual Pent-III 1.4ghz with 512 L2
cache and 2GB RAM, then load the latest RH OS on them and upgrade to
MySQL ver 4.x.

Assuming I get approval for this, what is the best way to move the
current db files (ver 3.23) to the rebuilt serves running MySQL ver 4.x?
Are there any compatability issues or things that need to be converted?
All tables are MyISAM.

Thanks, 

Jeff McKeon
IT Manager
Telaurus Communications LLC
[EMAIL PROTECTED]
(973) 889-8990 ex 209 

***The information contained in this communication is confidential. It
is intended only for the sole use of the recipient named above and may
be legally privileged. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication, or any of its contents or attachments,
is expressly prohibited. If you have received this communication in
error, please re-send it to the sender and delete the original message,
and any copy of it, from your computer system. Thank You.***



 -Original Message-
 From: MySQL [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 21, 2003 2:02 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Slave not working
 
 
 
 Since you are hoping to not repeat the replication setup, 
 your one chance is that the slave was fully synced at the 
 time of the power failure.  If you check the master, you will 
 see that it is now using a different log file (whenever 
 mysqld stops/starts a new log is created).  You can shutdown 
 the slave, edit the master.info file to point to the new 
 logfile (there may be more than one) and cross fingers.  PS.  
 If this is not fully understood, don't try it.
 
 
I had a power failure on the master and it bounced rather 
 ungracefully.
Now I'm getting this error on the slave and it's not 
 replicating.  Both
are ver 3.23
 
mysql slave start;
Query OK, 0 rows affected (0.00 sec)
 
mysql show slave status \G;
*** 1. row ***
  Master_Host: 10.32.1.10
  Master_User: repli
  Master_Port: 3306
Connect_retry: 60
 Log_File: db01tc0927-bin.035
  Pos: 73
Slave_Running: No
Replicate_do_db:
Replicate_ignore_db:
   Last_errno: 1062
   Last_error: error 'Duplicate entry '245937' for key 
 1' on query
'%'
 Skip_counter: 0
1 row in set (0.00 sec)
 
ERROR:
No query specified
 
How do I fix this?
 
Jeff McKeon
 
 
 -- 
 mysql, query
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Regular expresion replace possibility?

2003-07-21 Thread Dean Householder
Worked like a charm!  I couldn't find anything about this in MySQL docs
though... Neither before I knew what to search for nor after.  What's up
with that?

Dean


- Original Message -
From: Mike Hillyer [EMAIL PROTECTED]
To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 21, 2003 1:53 PM
Subject: RE: Regular expresion replace possibility?


UPDATE mytable SET mytext = REPLACE(mytext,'','');

Assuming you wised to strip a double quote, modify to suit.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Dean Householder [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 21, 2003 2:49 PM
 To: [EMAIL PROTECTED]
 Subject: Regular expresion replace possibility?


 Is it possible to run a query that will just alter text
 possibly using a regular expression?  I have about 250 rows
 that I want to strip quotes out of.  Does anyone know of an
 easy way to do this?

 Dean


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Regular expresion replace possibility?

2003-07-21 Thread Mike Hillyer
You have to search for 'string functions' to find it. Problem is that a
search for REPLACE will bring up the REPLACE syntax, not the REPLACE()
syntax (not the brackets ;-) )
Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Dean Householder [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 21, 2003 3:39 PM
 To: Mike Hillyer; [EMAIL PROTECTED]
 Subject: Re: Regular expresion replace possibility?
 
 
 Worked like a charm!  I couldn't find anything about this in 
 MySQL docs
 though... Neither before I knew what to search for nor after. 
  What's up
 with that?
 
 Dean
 
 
 - Original Message -
 From: Mike Hillyer [EMAIL PROTECTED]
 To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, July 21, 2003 1:53 PM
 Subject: RE: Regular expresion replace possibility?
 
 
 UPDATE mytable SET mytext = REPLACE(mytext,'','');
 
 Assuming you wised to strip a double quote, modify to suit.
 
 Regards,
 Mike Hillyer
 www.vbmysql.com
 
 
  -Original Message-
  From: Dean Householder [mailto:[EMAIL PROTECTED]
  Sent: Monday, July 21, 2003 2:49 PM
  To: [EMAIL PROTECTED]
  Subject: Regular expresion replace possibility?
 
 
  Is it possible to run a query that will just alter text
  possibly using a regular expression?  I have about 250 rows
  that I want to strip quotes out of.  Does anyone know of an
  easy way to do this?
 
  Dean
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Regular expresion replace possibility?

2003-07-21 Thread Jennifer Goodie
  Worked like a charm!  I couldn't find anything about this in
  MySQL docs
 You have to search for 'string functions' to find it. Problem is that a
 search for REPLACE will bring up the REPLACE syntax, not the REPLACE()

Or you can look at the function index
http://www.mysql.com/doc/en/Function_Index.html

It lists all the functions, so whatever function you are looking for, it is
usually there.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Foreign Key definition

2003-07-21 Thread Michael Satterwhite
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Monday 21 July 2003 04:14, Egor Egorov wrote:
 Michael Satterwhite [EMAIL PROTECTED] wrote:
  I'm trying to add a foreign key to a table. All tables are INNODB. Table
  a has following partial Definition:
 
  TableA
  ( Fld1 int Primary Key,...
  )
 
  TableB
  (Fld2 int Primary Key,
  Fld1 int not null, ...
  )
 
  I use the following Statement:
 
 Alter Table TableB Add Constraint FK1 (Fld1) References TableA
  (Fld1) on delete cascade;
 
SNIP

Sorry, I tried to generalize the tables, then put the error verbatim - my 
fault. With the table definitions as above, and the ALTER TABLE statement 
exactly as above, I get the following error:

ERROR 1064: You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use near 
'(Fld1) References TableA (Fld1) on Delete Cascade' at line 1


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/HHOFjeziQOokQnARAvqvAKCEtIATxn0xCfmR+NMfisxQijSs9ACeK0xZ
URj0lFcQZdzgXirWciA8JJE=
=89ad
-END PGP SIGNATURE-


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



replication: 2 masters and 1 slave

2003-07-21 Thread Osmin Castillo
Hello guys, I have this question:

I need to replicate 2 databases (each one resides in a different 
server) to a single slave server. Reading the documentation I have 
running the master/slave replication, but i need to replicate the 
other database too, the problem is: I need replicate the other 
database and that database exists in the other server, so how I 
configure the other master server/datatabase in the slave?

Is that posible?

Anybody has running this 2 master/ 1 slave configuration?

Any ideas?

thx

Osmin

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Terminology question

2003-07-21 Thread Michel Albert
  I've read it now a few times around here and was curious what
  innodb means. Is it a table-type for MySQL or a completely
  different DBMS?



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: replication: 2 masters and 1 slave

2003-07-21 Thread Simon Windsor
Hi

This is no problem

To do this,

1 - Duplicate database A, creating second database B, ensuring that both
have separate serve IDs.
2 - Configure both A+B to replicate each other, but enable log-update on
database A. This will allow database A to act as a master to both databases.
3 - Create third database C, and set it to replicate from database A.

You should end up A+B replicating each other, with C as a read only copy of
them.

I hope that this helps

Simon
- Original Message - 
From: Osmin Castillo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 12:35 AM
Subject: replication: 2 masters and 1 slave


 Hello guys, I have this question:

 I need to replicate 2 databases (each one resides in a different
 server) to a single slave server. Reading the documentation I have
 running the master/slave replication, but i need to replicate the
 other database too, the problem is: I need replicate the other
 database and that database exists in the other server, so how I
 configure the other master server/datatabase in the slave?

 Is that posible?

 Anybody has running this 2 master/ 1 slave configuration?

 Any ideas?

 thx

 Osmin

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Subselect in 4.0.12-max with --new option / Max Date

2003-07-21 Thread mysql
No problem, this is:

Kardex Table:
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| Nro   | bigint(20)  |  | PRI | 0   |   |
| Fecha | datetime| YES  | | NULL|   |
| CodProducto   | bigint(20)  | YES  | | 0   |   |
| Ref   | varchar(50) | YES  | | NULL|   |
| Empresa   | varchar(50) | YES  | | NULL|   |
| Cant  | double  | YES  | | 0   |   |
| Balance   | double  | YES  | | 0   |   |
| BalanceLitros | varchar(50) | YES  | | NULL|   |
| CantKilos | double  | YES  | | 0   |   |
| BalanceKilos  | double  | YES  | | 0   |   |
+---+-+--+-+-+---+

So im using MySQL 4.1 and still receive the same error for the subselect
query.

And I have other question, i trying to figure how to get the max date
for a certain group of records, here an example:

Cod Product date
10  Nissan Car  2003-06-20
20  Guitar Yamaha   2003-07-01
10  Nissan Car  2003-05-01
30  Stereo Cables   2003-01-20
20  Guitar Yamaha   2003-10-05
10  Nissan Car  2003-08-10
10  Nissan Car  2003-07-20
20  Guitar Yamaha   2003-09-10


So I have 3 groups, grouping by Cod 10,20,30 i need to build a query to
get the max date of every group, the result must be something like this

Cod Product date
10  Nissan Car  2003-08-10
20  Guitar Yamaha   2003-10-05
30  Stereo Cables   2003-01-20

I try the following query with no look
SELECT product, MAX(date) FROM table GROUP BY cod

And other combination using the HAVING syntax.

Please help!!

-Original Message-
From: Michael Satterwhite [mailto:[EMAIL PROTECTED] 
Sent: Sábado, 19 de Julio de 2003 08:36 p.m.
To: [EMAIL PROTECTED]
Subject: Re: Subselect in 4.0.12-max with --new option

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday 18 July 2003 21:28, [EMAIL PROTECTED] wrote:

 ERROR 1064: You have an error in your SQL syntax.  Check the manual
that
 corresponds to your MySQL server version for the right syntax to use
 near ….

 Any ideas? I need subselect working. Please help!!!

Any chance you could post the table structure and the SQL statement that
got 
the error?


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/GeQBjeziQOokQnARAmG6AJ4p3dAjtUmNzuueHHAhtecsE0+/EACfSjlF
3qWktDP00+Biu82iTKnyeRw=
=RO1D
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Terminology question

2003-07-21 Thread Gabriel Guzman
On Mon, 2003-07-21 at 16:38, Michel Albert wrote:
   I've read it now a few times around here and was curious what
   innodb means. Is it a table-type for MySQL or a completely
   different DBMS?
 
 

It's a table type, see here: 
http://www.mysql.com/doc/en/InnoDB_overview.html

for info


gabe. 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: The MySQL Bug ?

2003-07-21 Thread Heikki Tuuri
Dyego,

thank you for an excellent bug report. You probably tested the 4.0.14 tree?
That was where I was able to repeat the bug.

The bug was that InnoDB first deleted the old record and only after that
tested if the new record is too long (table handler error 139). You have
lots of BLOBs in the table, and in 4.0.14 each takes 534 bytes also in the
record itself, only the rest is stored externally on a separate page. That
was why the max record length 8000 bytes was exceeded.

The fix will be in 4.0.15 and 4.1.1.

Regards,

Heikki

- Original Message - 
From: Dyego Souza do Carmo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, July 21, 2003 9:14 PM
Subject: The MySQL Bug ?


 Hi,

I'd found a bug when I'd tried to use blob fields and innoDb.
To see the bug, do the follow:

*) Create a database.
*) Import the dump file that is attached to this e-mail.
   (cfgimpressao.dump)
*) Use the following commands:

select Ci_Descricao from cfgimpressao;
   You will see that there is a row where Ci_Descricao is Padrão.

source mysql_blob_bug.sql

select Ci_Descricao from cfgimpressao;
   Now, the record where Ci_Descricao is Padrão has disappear.
   The script you just executed didn't erase that. There are only
   update commands to change the blob contents.

 The bug is:
 The record where Ci_Descricao is Padrão mustn't be erased.


 The files are:

 cfgimpressao.dump - The Dump Of Table
 mysql_blob_bug.sql - The File of Blob Bug

 stored in the support.mysql.com/pub/mysql/secret


 Tnks in advance !


 innodb,mysql,help !


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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Subselect in 4.0.12-max with --new option / Max Date

2003-07-21 Thread Michael Satterwhite
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Monday 21 July 2003 18:48, [EMAIL PROTECTED] wrote:

 Cod   Product date
 10Nissan Car  2003-06-20
 20Guitar Yamaha   2003-07-01
 10Nissan Car  2003-05-01
 30Stereo Cables   2003-01-20
 20Guitar Yamaha   2003-10-05
 10Nissan Car  2003-08-10
 10Nissan Car  2003-07-20
 20Guitar Yamaha   2003-09-10


 So I have 3 groups, grouping by Cod 10,20,30 i need to build a query to
 get the max date of every group, the result must be something like this

 Cod   Product date
 10Nissan Car  2003-08-10
 20Guitar Yamaha   2003-10-05
 30Stereo Cables   2003-01-20

That really doesn't need a SubSelect. To simplify things, I created table Q1 
with data as follows:

+--+---++
| Cod  | Product   | ItemDate   |
+--+---++
|   10 | Nissan Car| 2003-06-20 |
|   20 | Guitar Yamaha | 2003-07-01 |
|   10 | Nissan Car| 2003-05-01 |
|   30 | Stereo Cables | 2003-01-20 |
|   20 | Guitar Yamaha | 2003-10-05 |
|   10 | Nissan Car| 2003-08-10 |
|   10 | Nissan Car| 2003-07-20 |
|   20 | Guitar Yamaha | 2003-09-10 |
+--+---++

This matches the data you list above. The following query:

Select Cod, Product, Max(ItemDate) from Q1 Group By Cod;

Returns

+--+---+---+
| Cod  | Product   | Max(itemdate) |
+--+---+---+
|   10 | Nissan Car| 2003-08-10|
|   20 | Guitar Yamaha | 2003-10-05|
|   30 | Stereo Cables | 2003-01-20|
+--+---+---+

Which appears to be what your're looking for. This should work in any version 
of MySQL.

- ---Michael

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/HKc5jeziQOokQnARAq11AJkB60/rV+CylqxaK/qSa0Gj5Z5hzwCeONV6
hAuU4NW9+HOajJpenIdA5BY=
=unNS
-END PGP SIGNATURE-


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Importing delimited text files

2003-07-21 Thread Jim McAtee
What tools are available for importing delimted text files into MySQL tables?
I've got several very large, but simple (just seven columns of integer and
varchar) text files to import into a table.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Importing delimited text files

2003-07-21 Thread Paul DuBois
At 21:04 -0600 7/21/03, Jim McAtee wrote:
What tools are available for importing delimted text files into MySQL tables?
I've got several very large, but simple (just seven columns of integer and
varchar) text files to import into a table.
Use the LOAD DATA statement or the mysqlimport command-line utility.

--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Subselect in 4.0.12-max with --new option / Max Date

2003-07-21 Thread mysql
You are right above the max date query and I really appreciate your
help, but the subselect query its other question. I try the subselect
query with the 4.0.12-max win32 with the --new option in the command
line to start the server, according to the manual this should enable the
subselect feature, but it doesn’t, so I try with the 4.1 alpha win32
version with the same error:

RROR 1064: You have an error in your SQL syntax.  Check the manual
that corresponds to your MySQL server version for the right syntax to
use 
near and so on

any ideas why I cant use the subselect feature? I missing something
about the conf?? maybe my.ini??

-Original Message-
From: Michael Satterwhite [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 21 de Julio de 2003 10:54 p.m.
To: [EMAIL PROTECTED]
Subject: Re: Subselect in 4.0.12-max with --new option / Max Date

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Monday 21 July 2003 18:48, [EMAIL PROTECTED] wrote:

 Cod   Product date
 10Nissan Car  2003-06-20
 20Guitar Yamaha   2003-07-01
 10Nissan Car  2003-05-01
 30Stereo Cables   2003-01-20
 20Guitar Yamaha   2003-10-05
 10Nissan Car  2003-08-10
 10Nissan Car  2003-07-20
 20Guitar Yamaha   2003-09-10


 So I have 3 groups, grouping by Cod 10,20,30 i need to build a query
to
 get the max date of every group, the result must be something like
this

 Cod   Product date
 10Nissan Car  2003-08-10
 20Guitar Yamaha   2003-10-05
 30Stereo Cables   2003-01-20

That really doesn't need a SubSelect. To simplify things, I created
table Q1 
with data as follows:

+--+---++
| Cod  | Product   | ItemDate   |
+--+---++
|   10 | Nissan Car| 2003-06-20 |
|   20 | Guitar Yamaha | 2003-07-01 |
|   10 | Nissan Car| 2003-05-01 |
|   30 | Stereo Cables | 2003-01-20 |
|   20 | Guitar Yamaha | 2003-10-05 |
|   10 | Nissan Car| 2003-08-10 |
|   10 | Nissan Car| 2003-07-20 |
|   20 | Guitar Yamaha | 2003-09-10 |
+--+---++

This matches the data you list above. The following query:

Select Cod, Product, Max(ItemDate) from Q1 Group By Cod;

Returns

+--+---+---+
| Cod  | Product   | Max(itemdate) |
+--+---+---+
|   10 | Nissan Car| 2003-08-10|
|   20 | Guitar Yamaha | 2003-10-05|
|   30 | Stereo Cables | 2003-01-20|
+--+---+---+

Which appears to be what your're looking for. This should work in any
version 
of MySQL.

- ---Michael

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/HKc5jeziQOokQnARAq11AJkB60/rV+CylqxaK/qSa0Gj5Z5hzwCeONV6
hAuU4NW9+HOajJpenIdA5BY=
=unNS
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Subselect in 4.0.12-max with --new option / Max Date

2003-07-21 Thread Paul DuBois
At 1:04 -0400 7/22/03, [EMAIL PROTECTED] wrote:
You are right above the max date query and I really appreciate your
help, but the subselect query its other question. I try the subselect
query with the 4.0.12-max win32 with the --new option in the command
line to start the server, according to the manual this should enable the
subselect feature, but it doesn’t, so I try with the 4.1 alpha win32
version with the same error:
I'm curious where you find it in the manual that --new turns on
subselects in 4.0.12.
RROR 1064: You have an error in your SQL syntax.  Check the manual
that corresponds to your MySQL server version for the right syntax to
use
near and so on
any ideas why I cant use the subselect feature? I missing something
about the conf?? maybe my.ini??
Perhaps it's simply that your query is malformed.  As far as I can
tell, you haven't actually posted the query, so it's diffficult to
tell.
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]