indexing never stops

2003-03-12 Thread Torgny Rasmark
Indexing in MySQL.

If while indexing a table  I retrieve data from same table the indexing 
process seems to get stuck. Mytop keeps saying something about 
repairing keycache for days when the indexing shouldn't take more than 
a couple of hours.

Can someone please explain!

--

   Torgny Rasmark

[EMAIL PROTECTED]
[EMAIL PROTECTED]
Språkbanken,
Göteborgs Universitet
+46 31 773 45 43







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

2003-03-12 Thread Erik DeBattista
to whom it may concern,

I need some help regarding transactions using innodb tables.

I am running MySQL 3.23.51-Max as database server and developing a web
front-end using ASP. Many of the tables used are of innodb format since it
is imperative for me to use transactions in most of my scripts.

In 95% of the cases the scripts work fine but at times this error pops up

'Lock Wait Timeout Try Restarting Transaction'

This leaves certain tables locked for a quite a number of hours and the
only possibilty to recover the table is to restart mysql. Now my software
is still at the testing stage and so i'm the only user. But when going live,
15 people will be using it concurrently and restarting my sql each time to
avoid the table lock will not be possible.

How can the deadlock be avoided?

I have set innodb_lock_wait as 60 in my.cnf file, is this enough?

as for the transaction syntax i am using the following

Begin;

on error resume next

sql statements

If err then
rollback;
else
commit;
end if

on error goto 0


am i doing something wrong? will set autocommit=0; be useful?
or is there any way to recover from the table lock?

i would really appreciate a reply

Erik DeBattista
Systems Developer
Webcraft Ltd.

--CONTACT DETAILS---
www.webcraft.com.mt
Email: [EMAIL PROTECTED]
Tel: +356 21421540  Fax: +356 21419300




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

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 Statement Problems (NOT IN)

2003-03-12 Thread Gopalarathnam V.
Hi Alec-

Your sub-select query can be written as:

select t1id from t1 left join t2 on t1id = t2id where t2id is null

in MySQL.

The example is actually given in the MySQL manual itself (section 1.7.4.1).

[EMAIL PROTECTED] wrote:


I am trying to check a table to see if a value doesnt exist, and I
would prefer to use the NOT IN syntax, but that doesnt work for mysql.
I've been trying to construct a similar statement in MySQL, but I'm
coming up cold.
t1
't1id'
'1'
'18'
'19'
t2
't2id','t2gid'
'19','194'
'1','194'
The problem statement I would like to use is:

SELECT t1id FROM t1 WHERE t1id NOT IN (SELECT t2id FROM t2 WHERE t2gid
= 194)
Which should only show:
t1
't1id'
'18'


and so far the best I can come up with is:

SELECT t1.t1id FROM t1 LEFT JOIN t2 ON t1.t1id=t2.t1id WHERE t2.t1id
IS NULL OR t2.t2gid IS NULL


You only want one of the IS NULLs - t2.t1id IS NULL. No line will have both
null, but a t1 entry with t2 columns null for every t1 which does not have
a match in t2.
BTW, common practice would give the same column name, id, instead of t2id
and t1id,
if they are meant to represent the same thing, as is usially the case. The
ID is not
the ID in t1 or the ID in t2, it is THE id, which happens to appear in both
tables
in order to do relational joins.
Alec







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




--
Gopalarathnam V.
Registered GNU/Linux User #300656
http://counter.li.org
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: what's the best format option for importing SQL Server databases?

2003-03-12 Thread Gopalarathnam V.
There is one particular program that can dump an SQL Server database as 
SQL statements much like mysqldump--its called SqlDump and it is 
available from http://sqldump.sourceforge.net.

Ask your client to use it to give you the SQL file.
NOTE: the SQL stmts may be very much SQL Server specific though.
Paul DuBois wrote:
At 14:24 -0600 3/11/03, kenn murrah wrote:

Greetings.

I've been challenged with an assignment in which my client will feed
me a 9000-record SQL Server database every night,  and I in turn
will need to import the data into mySQL, replacing the mySQL
database from the night before ...
Given that scenario, and the fact that I obviously want to be able
to automate the process via scripting, what is the best format for
my client to send the database in?  They've volunteered that the
feed can be almost any format you want ... sooo, what do i
want?  what would be the easiest to work with?


Tell them you want a file that's in the same format that mysqldump
would generate. :-)

Any ideas?

thanks in advance,

kenn


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




--
Gopalarathnam V.
Registered GNU/Linux User #300656
http://counter.li.org
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


MySQL Limits....streched !

2003-03-12 Thread Ahmed S K Anis
Hi,
I need to set a variable limit on the MySQL file size (Average row
length * no of rows )
When we insert data in to the table using JDBC .i should get a
unique JDBC exception (so that i trigger an archive). 
Is this posible in MySQL?

I notice that during creation of table i can give such options, but i
need to change it too often.
Please help me here.

Anis


 



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

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: MATCH / AGAINST fatal bug

2003-03-12 Thread Sergei Golubchik
Hi!

On Mar 12, Mathias Berchtold wrote:
 MATCH / AGAINST  fatal bug  
 
 
 MySQL version: 4.0.11-gamma
 OS : Windows 2000 SP3
 RAM: 1GB Apacer
 Free Disk Space: 32GB
 HD Write Back Cache: Disabled
 
 Under some circumstances the following query does never terminate. The
 win32 service cannot be stopped either  = FATAL. 
 
 SELECT f.id as id, fs.name as name, MATCH (f.title,f.body) AGAINST
 ('550') AS score FROM file as f, filesys as fs WHERE f.id = fs.fileid
 AND MATCH (f.title,f.body) AGAINST ('550')  0 ORDER by score DESC
 
 Same behavior can be seen with HAVING score  0 or when using BOOLEAN
 mode.
 
 If you are not interested in fixing this bug any advice how to
 circumvent this bug would be appreciated. 

Of course we're interested!

But you really told too little for us to know where to look for the
bug :(

Please try to create a repeatable test case.
Under some circumstances doesn't help that much, sorry...
 
 Thanks a lot.
 -Mat
 SmartFTP.com
 
 mysqladmin -proc Output
 ===
 
 | 25850 | kb   | localhost | kb | Query   | 17497 | Copying to tmp table | SELECT 
 f.id as id, fs.name as name, MATCH (f.title,f.body) AGAINST ('2147220991') AS score 
 FROM file |
 
 Table Structure
 ===
 
 #
 # Table structure for table `file`
 #
 
 CREATE TABLE file (
   id int(11) NOT NULL auto_increment,
   title text,
   version varchar(255) default NULL,
   created int(11) NOT NULL default '0',
   modified int(11) default NULL,
   body text,
   hits int(11) NOT NULL default '0',
   PRIMARY KEY  (id),
   KEY modified (modified),
   KEY hits (hits),
   KEY created (created),
   FULLTEXT KEY titlebody (title,body),
   FULLTEXT KEY body (body)
 ) TYPE=MyISAM;
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
Regards,
Sergei

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

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

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



Re: Desperate Sum(), Group by/Join question - One Step closer...

2003-03-12 Thread Roger Baklund
* Peter D Bethke
 Ok, in regards to my previous dilemma, I've gotten it to:

 SELECT
   golf_pick_periods.id,
   golf_pick_periods.period_name,
   golf_pick_periods.period_start_date,
   golf_pick_periods.period_end_date,

   COUNT(DISTINCT golf_events.id) AS num_events,
   COUNT(golf_player_picks.id) AS period_picks_count

 FROM

   database.golf_pick_periods
   database.golf_player_picks

 LEFT JOIN

   database.golf_events

 ON

   (golf_events.event_start_date = golf_pick_periods.period_start_date

 AND

   golf_events.event_end_date = golf_pick_periods.period_end_date)

 WHERE

   golf_player_picks.picks_player_id = 1

 AND

   golf_player_picks.picks_event_id = golf_events.id

 GROUP BY

   golf_pick_periods.id

 It's returning rows for periods where there is more than 1 pick (and
 counting those picks too). I need it to return all the periods. It's
 some kind of Left Join I'm sure but I can't figure how to reform the
 query to use a left join to return rows where the number of picks in a
 period is null. Arrg!

afaikt, you need to move the part of the WHERE-clause related to golf_events
to the ON-clause of the LEFT JOIN:

...
LEFT JOIN database.golf_events ON
  golf_player_picks.picks_event_id = golf_events.id AND
  golf_events.event_start_date = golf_pick_periods.period_start_date AND
  golf_events.event_end_date = golf_pick_periods.period_end_date
WHERE
  golf_player_picks.picks_player_id = 1
GROUP BY
  golf_pick_periods.id

HTH,

--
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: When is MySQL 4.1 going to have its binary download available?

2003-03-12 Thread Yaron Ben-Arieh


Yba


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 2:14 PM
To: Yaron Ben-Arieh
Subject: Re: When is MySQL 4.1 going to have its binary download available? 


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

sql,query,queries,smallint

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

You have written the following:

Hi,
I do not know how to compile, but I sure want to try the new features of
4.1.
Thanks

Yba


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

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



Combining Two Queries losing a drop down! with PHP

2003-03-12 Thread Andrew
I have a query that populates a dropdwon select which then posts to another
form with a selected query

I don't want to diplay the dropdwon in the next form but want to keep the query.
Is it possible to justcombine the two queries .  The reson for this is that the
2nd dropdown is populated by the selected value of the forst drop down :)

Meet the queries:)

this is the one I want to keep bu combine/or hide
?
require(connection.php);

mysql_connect($DBHost, $DBUser, $DBPass) or
die(could not connect);
mysql_select_db($DBName);

echo select name=\CountyID\ size=\1\ class='menuForm';

$result=mysql_query(SELECT County, CountyID FROM county ORDER BY County);
while ($row = mysql_fetch_array($result)) {
  $county_id=$row['CountyID'];
  $county=$row['County'];
  echo option value=\$county_id\;
  if ($CountyID == $county_id)
{echo  selected;}
  echo  $county /option;
}
echo /select;
?

br /

the one to display and keep:)

?

echo select name=\CityID\ size=\1\ class='menuForm';
echo 'option value=0Select Town or City/option';



$result=mysql_query(SELECT CountyID, City, CityID FROM city WHERE
CountyID=.$CountyID. ORDER BY City);
while ($row = mysql_fetch_array($result))
{
$county_id=$row['CountyID'];
$city_id=$row['CityID'];
$city=$row['City'];
echo option value='$city_id' $city /option;
}
echo /select;
?

Andrew



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

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



Running as a user account on W2K

2003-03-12 Thread Simont Tyler
Hi,

I've installed MySQL 3.23.55 on Windows 2000 and I am trying to run the mysqld service 
as a user account rather than the local system account. This worked fine in 3.23.43 
but has stopped working since the upgrade.

The error I get is 2186, which seems to be service failing to respond to control 
function.

Any ideas?

Simon

Due to high demand and an increasing takeup of the Gordano Messaging
Suite as a complete email solution, Gordano are pleased to announce
the availability of a comprehensive Gordano Training Programme. The
Programme offers a logical and structured approach to GMS with an
emphasis on ease of administration and high return on investment.
For further information please see:

http://www.gordano.com/Training/Courses.htm

Alternatively, contact the Gordano Sales department on:
+44 1275 345 100, or, 877 292 1142 (USA)
Email: [EMAIL PROTECTED]


NB: This email and any attachments have been checked for the presence
of computer viruses using Gordano Messaging Suite Anti-Virus technology.
None were found.

-
Gordano Ltd
Tel UK: +44 1275 345100   Fax UK: +44 1275 340056
Tel USA: +1 877 292 1142   http://www.gordano.com
Sales EMail: [EMAIL PROTECTED] Support EMail: [EMAIL PROTECTED]

This message is confidential and intended solely for the use of the
addressee.  Quotations are subject to contract and valid for 28 days.
-

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

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: Large resultset

2003-03-12 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Roland Carlsson wrote:
Thanks, that solved the problem. I thought that I could have my own
fetch-size but I has now understood that Integer.MIN_VALUE is the only size
that is accepted.
Regards
Roland Carlsson
The fetch-size setting makes sense for drivers that need to 'call back' 
to the database to retrieve more rows, as it can increase efficiency to 
bring rows back in batches...However, the MySQL protocol sends the rows 
like a 'fire hose', so in this case you're telling the driver to only 
'drink' from the hose when it needs another row (by calling next() ). 
The data is already there waiting ;)

	-Mark

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

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

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+bzKHtvXNTca6JD8RAuXLAJ9E19tXOsU6+Parr5bCNbvdxGpw/gCfcHYU
+m3/TcsvyPzTlpKvtO+vFvM=
=A1Qm
-END PGP SIGNATURE-
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


What is the minimum hardware requirements for MySQL?

2003-03-12 Thread Prashant
Hi,

What is the minimum hardware requirements of MySQL Database. Apart from the
size of the database. I am looking for limitations like
- RAM,
-Installation Space (per instance).
etc.


Please do let me know at the earliest.

Thanks  Regards,
Prashant Kumar Gupta,
HP-High Availability Team,
Bangalore, India.
Telnet: +91-80-2051230


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

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: What is the minimum hardware requirements for MySQL?

2003-03-12 Thread Dana Diederich
'Back in the day', I've run MySQL on an Intel 386 with as little as 4MB of
RAM under Linux.  Base disk space can be extremely minimal as well.

Cheers,
-Dana

-Original Message-
From: Prashant [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 7:19 AM
To: MySQL (E-mail)
Cc: KUMARASAMY,ELANGO (HP-India,ex2); [EMAIL PROTECTED]
Subject: What is the minimum hardware requirements for MySQL?


Hi,

What is the minimum hardware requirements of MySQL Database. Apart from the
size of the database. I am looking for limitations like
- RAM,
-Installation Space (per instance).
etc.


Please do let me know at the earliest.

Thanks  Regards,
Prashant Kumar Gupta,
HP-High Availability Team,
Bangalore, India.
Telnet: +91-80-2051230


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

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


**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**
 Wal-Mart Stores, Inc. Confidential
**


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

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



Re: wrong time in m$office

2003-03-12 Thread Bob Ramsey
At 04:10 PM 3/11/2003,  [EMAIL PROTECTED] wrote:
m$office (office 2000 - win xp) can not handle the time correct.
openoffice (win-xp or redhat-phoebe3)  has no problems.


I believe that's a known problem with Microsoft products.  They only appear 
to be able to handle datetime objects, not date or time.  You might also 
look up the #DELETED# error on the web for similar problems.

Bob

PS.  Cool.  This message initially bounced back to me from the mysql list 
server because it didn't contain one of the following 
words:  sql,query,queries,smallin. Your message cannot be posted because 
it appears to be either spam or simply off topic to our filter.

Now it should get through.



==
Bob Ramsey   Applications Development  Support II
ph:  1(319)335-9956  216 Boyd Law Building
fax: 1(319)335-9019  University of Iowa College of Law
mailto:[EMAIL PROTECTED]Iowa City, IA 52242-1113
For Hardware and Software questions, call 5-9124
==
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Remote connection to server

2003-03-12 Thread Ronald Hermans
Hi List,

I'm a newby at MySql. I've setup a server for use with Bugzilla but I am
also trying to connect to an other database on that server. Each time as I
try to connect I get

ERROR 2013: Lost connection to MySQL server during query.

Is there a setting I must change to be allowed to logon from an other
machine apart form the Bugzilla machine

TIA. 

Ronald Hermans
QA Manager
Every Angle
tel: +31 (0)182 577749
gsm: +31 (0)6 23227948
http://www.every-angle.com
mailto:[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: SQL Statement Problems (NOT IN)

2003-03-12 Thread Bruce Feist
Gopalarathnam V. wrote:

Your sub-select query can be written as:

select t1id from t1 left join t2 on t1id = t2id where t2id is null

in MySQL.
Too restrictive -- the original poster, Phil Dowson, wanted to find all 
t1 rows except those that have t2.t2gid = 194 (or some other t2gid value).

The above query only generalizes if there is at most one t2 row for each 
t1 row, and that is not the case here.  For a given t1 row, there can be 
zero, one, or many t2s, possibly one of which would have t2gid=194.

It can be done as either a series of queries, or as a fairly bizarre 
aggregation:

SELECT t1.t1id
FROM t1 LEFT JOIN t2 ON t1.t1id = t2.t2id
GROUP BY t1.t1id
HAVING min(abs(t2.t2gid - 192))  0 OR min(t2.t2gid) IS NULL;
I haven't tested this, but I believe that it will work.

Bruce Feist



The example is actually given in the MySQL manual itself (section 
1.7.4.1).

I am trying to check a table to see if a value doesnt exist, and I
would prefer to use the NOT IN syntax, but that doesnt work for mysql.
I've been trying to construct a similar statement in MySQL, but I'm
coming up cold.




-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
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: When is MySQL 4.1 going to have its binary download available ?

2003-03-12 Thread Benjamin Pflugmann
Hi.

On Wed 2003-03-12 at 14:39:26 +0200, [EMAIL PROTECTED] wrote:
 Hi,
 I do not know how to compile, but I sure want to try the new features of
 4.1.

There is no date yet for the first binary release of 4.1. They will
publish such an alpha release when they consider it mature enough for
general public testing. So, in a way, just wait with testing until
they invite by publishing it.

HTH,

Benjamin.


PS: In case you are not aware of it: There is an own section how to
get and compile the 4.1 source version:
http://www.mysql.com/doc/en/Installing_source_tree.html

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



buffer overflows in MySQL error messages (e.g. in 4.0.10-gamma)

2003-03-12 Thread Maarten LITMAATH
Description:

MySQL (e.g. version 4.0.10-gamma) does not check for buffer overflows
when formatting error messages: the code just assumes that no message
will ever be larger than SC_MAXWIDTH (256), ERRMSGSIZE (SC_MAXWIDTH)
or MYSQL_ERRMSG_SIZE (200).  This has been observed to lead to memory
corruption when the client e.g. tries to redefine a key with a name
whose length is of order 200 (yes, that _is_ a realistic use case for
computer-handled keys).
How-To-Repeat:

Define a key with a length of ~200 or more (the longer, the better)
and then try to redefine it; observe the client getting an error message
that is truncated and/or has trailing garbage.  The client and/or the
server may then have corrupted their own memories to such an extent
that they become unusable and/or crash (both have been observed at
least in a client application).
Fix:

In general, functions like my_vsnprintf() and my_snprintf() should be
used instead of their counterparts vsprintf() and sprintf().
Please find suggested changes for various source files here:

 http://litmaath.home.cern.ch/litmaath/MyODBC-MySQL-patches.html

In particular the file mysql-4.0.10-gamma-ml-diffs.tgz contains the
differences between the original and the patched versions.
These fixes appeared to be sufficient to prevent memory corruption in
my use cases.
Submitter-Id:   unknown
Originator: Maarten LITMAATH
Organization:   CERN - European Laboratory for Particle Physics
MySQL support: none
Synopsis:   error message formatting may cause buffer overflows
Severity:   serious
Priority:   high
Category:   mysql
Class:  sw-bug
Release:mysql-4.0.10-gamma (Source distribution)
Server: lt-mysqladmin  Ver 8.40 Distrib 4.0.10-gamma, for intel-linux 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  4.0.10-gamma
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 16 days 11 hours 50 min 3 sec
Threads: 1  Questions: 5523  Slow queries: 0  Opens: 13  Flush tables: 1  Open tables: 7 
 Queries per second avg: 0.004

C compiler:2.95.2
C++ compiler:  2.95.2
Environment:
	
System: Linux lxshare0270 2.4.18-18.7.x.cernsmp #1 SMP Mon Nov 18 15:44:49 CET 2002 i686 
unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.3 2.96-113) (not used)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''  ASFLAGS=''
LIBC:
lrwxrwxrwx1 root root   13 Feb 20 13:27 /lib/libc.so.6 - libc-2.2.5.so
-rwxr-xr-x1 root root  1260480 Oct 10 17:16 /lib/libc-2.2.5.so
-rw-r--r--1 root root  2312442 Oct 10 16:51 /usr/lib/libc.a
-rw-r--r--1 root root  178 Oct 10 16:46 /usr/lib/libc.so
Configure command: ./configure '--prefix=/var/lib/mysql' '--with-thread-safe-client' 
'--enable-thread-safe-client'

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
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: automatically incrementing an int value

2003-03-12 Thread Douglas B. Jones
Hi,

I just tried the below:

create table virus (
n int auto_increment not null,
name char(128) not null,
primary key(n),
unique(name(100))
);

with a data file that has 122,111 sql commands like:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,W32/Sircam-A);

Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

   123   492  6027

123 entries for VBS/LoveLet-G in the file. When I do a mysqldump of
the data file and just grep for VBS:

mysqldump virus|grep VBS

INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (111009,'VBS/LoveLet-G');
INSERT INTO virus VALUES (55841,'VBS/Stages-A');
INSERT INTO virus VALUES (121521,'VBS/LoveLet-AS');
INSERT INTO virus VALUES (1208,'VBS/SST-A');
INSERT INTO virus VALUES (85602,'VBS/VBSWG-X');
INSERT INTO virus VALUES (1215,'VBS/VBSWG-Z');
INSERT INTO virus VALUES (5846,'VBS/LoveLet-CL');
INSERT INTO virus VALUES (5996,'VBS/VBSWG-Fam');
INSERT INTO virus VALUES (83835,'VBS/Haptime-Fam');
INSERT INTO virus VALUES (55356,'VBS/LoveLet-F');
INSERT INTO virus VALUES (55546,'VBS/FreeLinks');
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');

As you can see, the numbers (n field) are way to high? Is this a bug
in mysql or n the sql? Even if I say unique(name) instead of
unique(name(100)),
I get the same results. Please note that I have tried destroying the
table
as well as the db, still get the same results.

Any ideas?

Thanks,
Cheers,
Douglas

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 10, 2003 11:14 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value


At 11:09 -0500 3/10/03, Douglas B. Jones wrote:
Hi,


Great! This works, I did not use the 'null' and that is
where I had a problem. One other questions: is this atomic?
If I have several processes trying to do this at one time,
will each one correctly update the table (assuming they have
the same 'name' value.

Yes.

  Also, in the part: unique (name(100)),
what does the 100 do here? Is that saying the first 100 chars
are considered unique?

Exactly.


Thanks,
Cheers,
Douglas

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 10, 2003 10:36 AM
  To: Douglas B Jones
  Cc: [EMAIL PROTECTED]
  Subject: Re: automatically incrementing an int value



  As I read the manual, the REPLACE command will do what you want.

  Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT
NULL.
  Replace dos a delete-if-present, insert. The insert generates a new
ID.

  See test below, and note two rows affected by second replace.

  mysql create table test (a int auto_increment not null, name
tinytext not
  null, primary key (a), unique (name(100))) ;
  Query OK, 0 rows affected (0.02 sec)

  mysql replace into test values (null, hello) ;
  Query OK, 1 row affected (0.01 sec)

  mysql select * from test ;
  +---+---+
  | a | name  |
  +---+---+
  | 1 | hello |
  +---+---+
  1 row in set (0.01 sec)

  mysql replace into test values (null, hello) ;
  Query OK, 2 rows affected (0.02 sec)

  mysql select * from test ;
  +---+---+
  | a | name  |
  +---+---+
  | 2 | hello |
  +---+---+
   1 row in set (0.00 sec)


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

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



Code explaination

2003-03-12 Thread Simont Tyler
Just saw the following code in the MySQL 2.23.55 source code.

The semi-colon after the if renders the if statement useless. Could someone explain if 
it is intentional. The comment indicates that it is.

Simon

   /*
  the following 'if', thought conceptually wrong,
  is a useful optimization nevertheless.
*/
if (file-state != file-s-state.state);
  file-s-state.state = *file-state;

Due to high demand and an increasing takeup of the Gordano Messaging
Suite as a complete email solution, Gordano are pleased to announce
the availability of a comprehensive Gordano Training Programme. The
Programme offers a logical and structured approach to GMS with an
emphasis on ease of administration and high return on investment.
For further information please see:

http://www.gordano.com/Training/Courses.htm

Alternatively, contact the Gordano Sales department on:
+44 1275 345 100, or, 877 292 1142 (USA)
Email: [EMAIL PROTECTED]


NB: This email and any attachments have been checked for the presence
of computer viruses using Gordano Messaging Suite Anti-Virus technology.
None were found.

-
Gordano Ltd
Tel UK: +44 1275 345100   Fax UK: +44 1275 340056
Tel USA: +1 877 292 1142   http://www.gordano.com
Sales EMail: [EMAIL PROTECTED] Support EMail: [EMAIL PROTECTED]

This message is confidential and intended solely for the use of the
addressee.  Quotations are subject to contract and valid for 28 days.
-

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

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: automatically incrementing an int value

2003-03-12 Thread Douglas B. Jones
Hi,

Update: I just did a grep:

grep 375707 Query c01*.log

of the log file and did a grep of VBS/LoveLet-G on the out put file
and got 123 entries, what I expected. But, the dump shows 111,009
in the 'n' field. This is starting to look like a bug in mysql 3.23.49?

Any ideas?

Thanks,
Cheers,
Douglas

mysql  Ver 11.16 Distrib 3.23.49, for dec-osf5.1 (alphaev6)

-Original Message-
From: Douglas B. Jones [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 10:22 AM
To: 'Paul DuBois'; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value


Hi,

I just tried the below:

create table virus (
n int auto_increment not null,
name char(128) not null,
primary key(n),
unique(name(100))
);

with a data file that has 122,111 sql commands like:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,W32/Sircam-A);

Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

   123   492  6027

123 entries for VBS/LoveLet-G in the file. When I do a mysqldump of
the data file and just grep for VBS:

mysqldump virus|grep VBS

INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (111009,'VBS/LoveLet-G');
INSERT INTO virus VALUES (55841,'VBS/Stages-A');
INSERT INTO virus VALUES (121521,'VBS/LoveLet-AS');
INSERT INTO virus VALUES (1208,'VBS/SST-A');
INSERT INTO virus VALUES (85602,'VBS/VBSWG-X');
INSERT INTO virus VALUES (1215,'VBS/VBSWG-Z');
INSERT INTO virus VALUES (5846,'VBS/LoveLet-CL');
INSERT INTO virus VALUES (5996,'VBS/VBSWG-Fam');
INSERT INTO virus VALUES (83835,'VBS/Haptime-Fam');
INSERT INTO virus VALUES (55356,'VBS/LoveLet-F');
INSERT INTO virus VALUES (55546,'VBS/FreeLinks');
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');

As you can see, the numbers (n field) are way to high? Is this a bug
in mysql or n the sql? Even if I say unique(name) instead of
unique(name(100)),
I get the same results. Please note that I have tried destroying the
table
as well as the db, still get the same results.

Any ideas?

Thanks,
Cheers,
Douglas

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 10, 2003 11:14 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value


At 11:09 -0500 3/10/03, Douglas B. Jones wrote:
Hi,


Great! This works, I did not use the 'null' and that is
where I had a problem. One other questions: is this atomic?
If I have several processes trying to do this at one time,
will each one correctly update the table (assuming they have
the same 'name' value.

Yes.

  Also, in the part: unique (name(100)),
what does the 100 do here? Is that saying the first 100 chars
are considered unique?

Exactly.


Thanks,
Cheers,
Douglas

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 10, 2003 10:36 AM
  To: Douglas B Jones
  Cc: [EMAIL PROTECTED]
  Subject: Re: automatically incrementing an int value



  As I read the manual, the REPLACE command will do what you want.

  Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT
NULL.
  Replace dos a delete-if-present, insert. The insert generates a new
ID.

  See test below, and note two rows affected by second replace.

  mysql create table test (a int auto_increment not null, name
tinytext not
  null, primary key (a), unique (name(100))) ;
  Query OK, 0 rows affected (0.02 sec)

  mysql replace into test values (null, hello) ;
  Query OK, 1 row affected (0.01 sec)

  mysql select * from test ;
  +---+---+
  | a | name  |
  +---+---+
  | 1 | hello |
  +---+---+
  1 row in set (0.01 sec)

  mysql replace into test values (null, hello) ;
  Query OK, 2 rows affected (0.02 sec)

  mysql select * from test ;
  +---+---+
  | a | name  |
  +---+---+
  | 2 | hello |
  +---+---+
   1 row in set (0.00 sec)


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

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



Null values set in tables

2003-03-12 Thread Steve Holt
I am sure I am missing something very simple but I cant see it
I am using MS Access 97 as a front end to MYSQL
I have a table with the following desc
CREATE TABLE `tblcoursesoffered` (
  `DateCourseCreated` datetime default NULL,
  `Specialty` int(25) NOT NULL default '0',
  `CourseNo` float NOT NULL default '0',
  `CourseName` char(10) NOT NULL default '',
  `CourseDesc` char(255) default NULL,
  `ExamType` char(30) default NULL,
  `BeginDate` datetime NOT NULL default '-00-00 00:00:00',
  `EndDate` datetime NOT NULL default '-00-00 00:00:00',
  `ActualCity` char(30) NOT NULL default '',
  `ActualState` char(2) NOT NULL default '',
  `CourseStatus` char(15) default NULL,
  `CourseCoordinator` float default NULL,
  `ProjAttendance` float default NULL,
  `CMEHrsCourse` float default NULL,
  `CMEHrsAdditional` float default NULL,
  `CMEFee` double default NULL,
  `CAT1` tinyint(1) default NULL,
  `SponsorID` char(6) default NULL,
  `SponsorContact` char(50) default NULL,
  `SponsorContactPhone` char(13) default NULL,
  `SponsorContactFax` char(13) default NULL,
  `CourseHotel` int(11) default NULL,
  `FacSleepingRoomsQty` float default NULL,
  `StaffSleepingRoomsQty` float default NULL,
  `fldCourseHotel` int(11) default NULL,
  `fldTransportationInfo` char(255) default NULL,
  `fldTimestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`CourseName`),
  KEY `Specialty` (`Specialty`),
  KEY `BeginDate` (`BeginDate`)
) TYPE=MyISAM ROW_FORMAT=FIXED;
Even with this description MYSQL allows me to create a new record with null 
values in the fields
listed as not null
is there another setting somewhere I am missing??

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


Re: wrong time in m$office

2003-03-12 Thread [EMAIL PROTECTED]
Bob Ramsey schrieb:
At 04:10 PM 3/11/2003,  [EMAIL PROTECTED] wrote:

m$office (office 2000 - win xp) can not handle the time correct.
openoffice (win-xp or redhat-phoebe3)  has no problems.


I believe that's a known problem with Microsoft products.  They only 
appear to be able to handle datetime objects, not date or time.  You 
might also look up the #DELETED# error on the web for similar problems.

Bob

PS.  Cool.  This message initially bounced back to me from the mysql 
list server because it didn't contain one of the following words:  
sql,query,queries,smallin. Your message cannot be posted because it 
appears to be either spam or simply off topic to our filter.

Now it should get through.



thanks Bob ;-)

date, datetime, timestamp   all are correct in msoffice
time  is correctly shown in msquery, but not in access,excel, ...
before posting i found a few solutions

primarykey-autoincrement, myodbc 3.5x, ...

nothing helps!

perhaps this onehttp://microsoft.com/data/
from   http://www.mysql.com/doc/en/MyODBC_clients.html
no!

damned  :-(
@home  ok
@work  no
--
shrek-m


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




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


Problems compiling with berkeley

2003-03-12 Thread Barry Pollock
extra_configs=$extra_configs --with-innodb --with-berkeley-db \
--with-embedded-server --enable-thread-safe-client \
--with-bencgh --prefix=/usr --enable-maintainer-mode \
--with-docs --with-unix-socket=/var/run/mysqld/mysqld.sock \
--with-lo-memory --with-openssl --with-vio
 It compiles fine with out berkeley but I get the following with
berkeley included
In file included from ../../bdb/include/db_am.h:129,
 from ../../bdb/include/btree.h:317,
 from ../../bdb/btree/bt_compare.c:55:
../../bdb/include/crdel_auto.h:27: syntax error before DB_LS
../../bdb/include/crdel_auto.h:27: warning: no semicolon at end of
struct or union
../../bdb/include/crdel_auto.h:28: warning: data definition has no type
or storage class
../../bdb/include/crdel_auto.h:32: syntax error before
__crdel_metasub_args
make[3]: *** [bt_compare.o] Error 1
make[3]: Leaving directory
`/home/barryp/mysql/mysql-4.0.11a-gamma/bdb/build_unix'
make[2]: *** [all] Error 2
 make[2]: Leaving directory `/home/barryp/mysql/mysql-4.0.11a-gamma/bdb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/barryp/mysql/mysql-4.0.11a-gamma'
make: *** [all-recursive-am] Error 2
[EMAIL PROTECTED]:~/mysql/mysql-4.0.11a-gamma$
 This seems like a library problem I am using
gcc version 3.2.3 20030309 (Debian prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
Barry


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

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: automatically incrementing an int value

2003-03-12 Thread Alec . Cawley

If I understand correctly, you are trying to grep the SQL data file. This
is emphatically not a valid thing to do. The data file is *not* a
representation of the table displayed when you SELECT * from it. For a
start, if you have deleted records and not overwritten them, the blank
space will still contain, inaccessably, the data which was there. Non-text
fields are stored in binary formats. Records do not have line breaks at the
end, so grep will dump a splurge of data, not a clean record.What you are
doing is akin to dumping a program and expecting to see the source code; it
ain't like that.

The *only* valid way of inspecing MySQL tables is via MySQL itself. The
MySQL team will understand what is inside them, byt we lesser mortals
should stay well outside.

  Alec

--
You said:



I just tried the below:

create table virus (
n int auto_increment not null,
name char(128) not null,
primary key(n),
unique(name(100))
);

with a data file that has 122,111 sql commands like:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,W32/Sircam-A);

Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

   123   492  6027





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

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: automatically incrementing an int value

2003-03-12 Thread Douglas B. Jones
Hi,

I might not have worded things the best. I did not grep the sql db,
but the output from mysqldump. I only grep'ed on plain text files:

1) mysqldump output
2) grep the input sql file that has 'replace into...' (see below)
3) the log file for mysql, which is plain text (see my follow-up email)

I just did a 'mysql virus' and got (cut of what I got):

mysql select * from virus where name='VBS/LoveLet-G';
++---+
| n  | name  |
++---+
| 111009 | VBS/LoveLet-G |
++---+
1 row in set (0.00 sec)

I was not grep'ing the sql data files in the var directory of mysql.
My problem, from everything I can see is that the value of 'n' is
wrong in almost every line of the data. Only the first entry in the
input sql file has the 'n' value right at '3'. All the others appear
to be wrong (at least the quick scans I have done). This leads me to
suspect there is a bug in mysql and/or something is wrong with the
'unique' option in the create command below.

Hope this helps,
Thanks,
Cheers,
Douglas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 10:58 AM
To: [EMAIL PROTECTED]
Cc: Douglas B Jones; [EMAIL PROTECTED]; 'Paul DuBois'
Subject: RE: automatically incrementing an int value



If I understand correctly, you are trying to grep the SQL data file.
This
is emphatically not a valid thing to do. The data file is *not* a
representation of the table displayed when you SELECT * from it. For a
start, if you have deleted records and not overwritten them, the blank
space will still contain, inaccessably, the data which was there.
Non-text
fields are stored in binary formats. Records do not have line breaks at
the
end, so grep will dump a splurge of data, not a clean record.What you
are
doing is akin to dumping a program and expecting to see the source code;
it
ain't like that.

The *only* valid way of inspecing MySQL tables is via MySQL itself. The
MySQL team will understand what is inside them, byt we lesser mortals
should stay well outside.

  Alec

--
You said:



I just tried the below:

create table virus (
n int auto_increment not null,
name char(128) not null,
primary key(n),
unique(name(100))
);

with a data file that has 122,111 sql commands like:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,W32/Sircam-A);

Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

   123   492  6027





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

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



list current db

2003-03-12 Thread Jonathan Li
A few days ago I asked about how to know which database I am currently
in, I got an answer and I also replied to thank the send but the email
was returned. Any way I forgot to document it. I remember the answer
listed three methods to do it, they are mysql \s, mysql status.

Could you (or someone) point me the third method?

Thanks in advance
Jonathan


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

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: list current db

2003-03-12 Thread dpgirago



[filter fodder = sql,query,queries,smallint]

mysql  select database();

David

**
Jonathan said:
**

A few days ago I asked about how to know which database I am currently
in, I got an answer and I also replied to thank the send but the email
was returned. Any way I forgot to document it. I remember the answer
listed three methods to do it, they are mysql \s, mysql status.

Could you (or someone) point me the third method?



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

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 there any way to search a whole database for a value?

2003-03-12 Thread Paul DuBois
At 9:21 -0500 3/12/03, Luc Foisy wrote:
Perhaps one day UNION will be added to UPDATE
You'd still have to name every column to be updated explicitly.
There is no update whatever column happens to contain this value
syntax.

 At 11:01 -0800 3/11/03, Keith Roberts wrote:
 I need to look in several different tables/columns in a
 database for a
 particular value.  If I find it, I need to update it.  Is
 there any way to
 search/update every table/column in one query in a
  particular 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


Re: list current db

2003-03-12 Thread Joseph Bueno
select database();

Regards,
Joseph Bueno
Jonathan Li wrote:
A few days ago I asked about how to know which database I am currently
in, I got an answer and I also replied to thank the send but the email
was returned. Any way I forgot to document it. I remember the answer
listed three methods to do it, they are mysql \s, mysql status.
Could you (or someone) point me the third method?

Thanks in advance
Jonathan
-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
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: automatically incrementing an int value

2003-03-12 Thread Douglas B. Jones
Hi,

I understood replace to only increment n when it matches the
name value. There are 122,111 statements, but when you add
up the numbers in the n column, they exceed 122,111. They should
sum up (when you add all them up including the ones I did not
show) to 122,111. If you add up the ones I show, you get way
more than 122,111. I did a little test on:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);

The results were:

INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (4,'VBS/LoveLet-G');
INSERT INTO virus VALUES (5,'WM97/Myna-C');

I would have expected 3,4,5 to be 3,1,1. I was expecting it to start
from zero each time it got a new name, it looks like it takes the last
n value and then start from there with the new name. Does this make
sense what I am asking? Is there a way of doing what I want? Yes, I
could
insert and do a count, but I was looking for another way so that the
select would not be so resource expensive.

Thanks,
Cheers,
Douglas

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 11:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value


At 10:22 -0500 3/12/03, Douglas B. Jones wrote:
Hi,

I just tried the below:

create table virus (
 n int auto_increment not null,
 name char(128) not null,
 primary key(n),
 unique(name(100))
);

with a data file that has 122,111 sql commands like:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,W32/Sircam-A);

Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

123   492  6027

123 entries for VBS/LoveLet-G in the file. When I do a mysqldump of
the data file and just grep for VBS:

mysqldump virus|grep VBS

INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (111009,'VBS/LoveLet-G');
INSERT INTO virus VALUES (55841,'VBS/Stages-A');
INSERT INTO virus VALUES (121521,'VBS/LoveLet-AS');
INSERT INTO virus VALUES (1208,'VBS/SST-A');
INSERT INTO virus VALUES (85602,'VBS/VBSWG-X');
INSERT INTO virus VALUES (1215,'VBS/VBSWG-Z');
INSERT INTO virus VALUES (5846,'VBS/LoveLet-CL');
INSERT INTO virus VALUES (5996,'VBS/VBSWG-Fam');
INSERT INTO virus VALUES (83835,'VBS/Haptime-Fam');
INSERT INTO virus VALUES (55356,'VBS/LoveLet-F');
INSERT INTO virus VALUES (55546,'VBS/FreeLinks');
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');

As you can see, the numbers (n field) are way to high? Is this a bug

Why do you say that?  You indicated that the data file has 122,111
statements
in it.  I see no values for the n column that are larger than that
value.
REPLACE will increment the value of n when you specify a value of NULL
for that column.  It's behaving as it's supposed to.  Perhaps you should
use INSERT instead of REPLACE and process the file with mysql --force
to ignore duplicate key errors.  Specify the statements like this:

INSERT INTO virus (name) VALUES('VBS/xxx');

in mysql or n the sql? Even if I say unique(name) instead of
unique(name(100)),
I get the same results. Please note that I have tried destroying the
table
as well as the db, still get the same results.

Any ideas?

Thanks,
Cheers,
Douglas


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

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: Converting DBs

2003-03-12 Thread Paul DuBois
At 11:29 -0500 3/12/03, Tamayo, Nelson wrote:
Is there a way to convert an Access database into MySQL easily?

I am running into problems trying to convert it through VB code using a
recordset. I'm rather new at this stuff. I'm also tried generating an insert
statement through VB code and then executing it, I get the error Unknown
column 'False' in 'field list'
this is the SQL string I am using to insert the record.

insert into csapps.qainfo

(DCN,NoRetention,AttachmentCode,NPPN,CPTList,ReceivedDate,Answered,ClientID,
PPO,Retry,Tax,EOP,TXDeficientIsAnswered,TXDeficient,CACPAnswered,CACPAuthori
zed,MGMAnswered,MGMContracted,Priority,ImageStatus,BatchCode)
values  

  ('123673852',False,'E : JUST an ID CARD',False,
'Dental','8/19/2001',True,'TN','??',0,0,'TX',True,False,False,False,False,Fa
lse,1,'NotRequested','N1TN236012')
You're assuming that True and False are predefined values in MySQL,
which they aren't.  Thus, MySQL sees these unquoted values and assumes
they are column names.  Substitute appropriate literal values such as
1 and 0, or perhaps 'True' and 'False'.
Any ideas?

Nelson Tamayo
Claims Automation
(800) 237-7767 x3520
[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


Exclude CREATE TEMPORARY TABLE from log-bin / replication?

2003-03-12 Thread Ignatius Reilly

It would be nice to have the possibility to exclude CREATE TEMPORARY TABLE
statements from the log bin.
Because such statements are really used not for updating a DB, but for
constructing intermediary statements that eventually derive in a final
INSERT/ UPDATE. I believe only this final statement should belong to the log
bin.

I have set up a replicated system, and the large number of CREATE TEMPORARY
TABLE performed on the Master DB is a needless drag on the system.

Anybody can enlight me on this subject?

Thanks

Ignatius

MySQL





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

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: Converting DBs

2003-03-12 Thread dpgirago


[filter fodder = sql,query,queries,smallint ]

you haven't indicated what the column attributes are,
but you might try putting quotes around the  TRUE and FALSE
values ( assuming they are being inserted into char or varchar
columns).

David



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

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



RE: MyODBC: SQLBindParameter mix DATA_AT_EXEC with direct bound param eters

2003-03-12 Thread Naumann, Frank
Hi!

thanks for your response.

I found my mistake, you pointed me to the right direction.
Although I provide different pcbLength buffers for the parameters, I did not
initialize the second one.
ODBC documentation says, that it will be ignored on integer columns if its
not SQL_NULL_DATA.
But I should initialize it at least with 0. ;)

Next time I post to the appropriate list (myodbc) ;)

Frank

 -Original Message-
 From: Venu [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 11, 2003 11:03 PM
 To: Naumann, Frank
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: MyODBC: SQLBindParameter mix DATA_AT_EXEC with 
 direct bound
 param eters
 
 
 On Mon, 2003-03-10 at 09:40, Naumann, Frank wrote:
  Hi all,
 
 Hi !!
 
  
  I found a problem (bug?) when updating a blob column via MyODBC. The
  statement i run is like that:
  
  UPDATE blob_table SET blob_col = ? where id = ?
  
  when i do NOT bind the restriction as input parameter, but 
 write it directly
  in the string, it works perfectly.
  
  but when i want to bind the restriction directly, the 
 following happens:
  
  1. I bind the blob_col with SQL_LEN_DATA_AT_EXEC(length) as 
 indikator
  (SQLBindParameter returns SQL_SUCCESS)
  2. I bind the id restriction directly to a program variable
  (SQLBindParameter returns SQL_SUCCESS)
  3. I call SQLExecute, it returns SQL_NEED_DATA as expected.
  4. I call SQLParamData to access the blob_col, it returns 
 also SQL_NEED_DATA
  as expected.
  5. I call several times SQLPutData to fill the blob_col, 
 each returns with
  SQL_SUCCESS
  6. I call SQLParamData to indicate that the blob_col is 
 populated with data
  completely and would expect SQL_SUCCESS.
 
 I just tested it, and it returns SQL_SUCCESS unless if you have more
 parameters data to be supplied during the run-time. 
 
 Possible reason could be, you might have specified the same pcbLength
 buffer to all parameters in SQLBindParameter.
 
 Here is a simple snippet from the test suite for the similar case:
 
 ..
 ..
 rc = SQLPrepare(hstmt,update t_putdata set c2= ? where c1 =
 ?,SQL_NTS);
 mystmt(hstmt,rc);
 
 rc = SQLBindParameter(hstmt,1,SQL_PARAM_INPUT,SQL_C_CHAR,
   SQL_LONGVARCHAR,0,0,
   (SQLPOINTER)1,0,pcbLength);
 
 rc = SQLBindParameter(hstmt,2,SQL_PARAM_INPUT,SQL_C_LONG,
   SQL_INTEGER,0,0,c1,0,NULL);
 
 pcbLength =  SQL_LEN_DATA_AT_EXEC(0);
 
 c1 = 10;
 rc = SQLExecute(hstmt);
 myassert(rc == SQL_NEED_DATA);
 
 rc = SQLParamData(hstmt, token);
 myassert(rc == SQL_NEED_DATA);
 
 strcpy(data,mysql ab);
 rc = SQLPutData(hstmt,data,6);
 mystmt(hstmt,rc);
 
 strcpy(data,- the open source database company);
 rc = SQLPutData(hstmt,data,strlen(data));
 mystmt(hstmt,rc);
 
 rc = SQLParamData(hstmt, token);
 mystmt(hstmt,rc);
 
 SQLFreeStmt(hstmt, SQL_RESET_PARAMS);
 SQLFreeStmt(hstmt, SQL_CLOSE);
 
 ..
 ..
 
 The data updated is:
 
  data: mysql - the open source database company(40)
 
 Thanks
 
 -- 
 Regards, Venu
 For technical support contracts, go to https://order.mysql.com
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /   Mr. Venu [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Developer
 /_/  /_/\_, /___/\___\_\___/  Palo Alto, CA-94306, USA
___/  www.mysql.com
 
 Join MySQL Users Conference and Expo:
 http://www.mysql.com/events/uc2003/
 

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

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: automatically incrementing an int value

2003-03-12 Thread Keith C. Ivey
On 12 Mar 2003, at 10:22, Douglas B. Jones wrote:

 INSERT INTO virus VALUES (91207,'VBS/Kakworm');
 INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
 
 As you can see, the numbers (n field) are way to high? Is this a bug
 in mysql or n the sql?

It's far more likely to be a bug in your application or your 
understanding.  What makes you think the numbers are too high?  You 
said you did 122,111 REPLACE queries, so the last one should have had 
an autoincrement value of at least 122,111.  Maybe you want to use 
INSERT IGNORE instead of REPLACE, so that you're keeping the first ID 
you create instead of the last?

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

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

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



re: FW: mySQL 4.1 sql,query,queries,smallint

2003-03-12 Thread Egor Egorov
On Tuesday 11 March 2003 19:06, Luc Bui (PAC) wrote:

 when can I get the binariesfor 4.1?

Probably in 2-3 weeks ..

 do 4.0.11a support views?

Nope.

 important for my choice for my community.




-- 
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: sql_select_limit of 4.0.11

2003-03-12 Thread Egor Egorov
On Tuesday 11 March 2003 16:23, zby at post dot cz wrote:

 /usr/sbin/mysqld-max --version
 /usr/sbin/mysqld-max  Ver 4.0.11-gamma-Max for pc-linux on i686
 Downloaded and installed:
 MySQL-client-4.0.11-0
 MySQL-shared-4.0.11-0
 MySQL-Max-4.0.11-0
 MySQL-devel-4.0.11-0
 MySQL-server-4.0.11-0
 MySQL-bench-4.0.11-0
 ...started, loaded, running... OK (using innodb)
 *
 I login to 4.0.11 server from localhost and do:
 select count(*) from  A; returned 22662
 select * from A; returned 1000 rows
 set sql_select_limit=5000;  OK
 select * from A; returned 5000 rows;
 Then I quit, login again, do the same select right after login
 with no prior changes to the client environtment and: select *
 from A; returns 1000 rows;

 I login to 3.23.54a server from localhost and do:
 select count(*) from A; returned 22662
 select * from A; returned 22662 rows
 **
 As to the Reference Manual out of the rpm package of 4.0.11
 version, SQL_SELECT_LIMIT is a ssesion variable and should be
 initialy (after login) set to 'unlimited'. Why, after login from
 localhost is this variable set to 1000?
 Did I miss something in this reference or is this an error?
 Or I simply misconfigured my server

What is the output of 
SELECT @@global.sql_select_limit;




-- 
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: Re: Altering table which has FOREIGN KEY constraints

2003-03-12 Thread Victoria Reznichenko
On Wednesday 12 March 2003 02:30, Heo Jungsu wrote:

  What do you mean could not execute a query on those tables?
  Could you be more detailed?

 Ok. let me explain.

 When I was using MySQL 4.0.10,

 After I add columns with ALTER TABLE on foreign key referencing table so
 many times,
 when I execute SELECT * FROM child, MySQL session is deaded with Seg.
 fault. even if I execute drop table child. so I rebuilded entire InnoDB
 Table with back-up data.

Hm..
Could you create a repeatable test-case and test it on 4.0.11?


-- 
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: list current db

2003-03-12 Thread Egor Egorov
On Wednesday 12 March 2003 18:25, Jonathan Li wrote:

 A few days ago I asked about how to know which database I am currently
 in, I got an answer and I also replied to thank the send but the email
 was returned. Any way I forgot to document it. I remember the answer
 listed three methods to do it, they are mysql \s, mysql status.

 Could you (or someone) point me the third method?

SELECT DATABASE() ?



-- 
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: binlog-ignore-db replicate-ignore-db problem

2003-03-12 Thread Victoria Reznichenko
On Tuesday 11 March 2003 18:57, vlady wrote:

 I am trying to set up a replication ignoring a given database, but
 unfortunatly it doesn't works (for me).
 In my.cnf of my master I have at the end :
 log-bin
 server-id= 1
 binlog-ignore-db=access

 The line:  binlog-ignore-db=access  is supposed to make the master not
 to log updates for db access, but  but it doesn't, and I can see it
 examinig my bin log with mysqlbinlog

Because you explicitly specify database in your query. Check the manual:
http://www.mysql.com/doc/en/Binary_log.html

binlog-ignore-db=database_name - Tells the master that updates where the 
current (i.e. selected) database is 'database_name' should not be stored in 
the binary log. Note that if you use this you should ensure that you only do 
updates in the current database.

 In the other hand on my repication in my.cnf  I have:
 replicate-ignore-db=access

 which is supposed to make the repication to not replicate for db
 access, but again it doesn't do this.

The same. If you specify replicate-ignore-db=access, slave ignores all queries 
in the binary logs that listed after use access:
http://www.mysql.com/doc/en/Replication_Options.html

 I know that it should works, so I suppose there is some misudrestanding
 at my side, so please help me with that.

 There are a couple of my update queries in my bin-log:
 update access.lastCheck set id = '7147671' where id = '123';
 update access.lastCheck set id = '7147670' where id = '345';




-- 
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: automatically incrementing an int value

2003-03-12 Thread Douglas B. Jones
Hi,

No questions that my understanding of sql is limited. I am
not an expert. I think I have misunderstood the replace statement.

Thanks,
Cheers,
Douglas

-Original Message-
From: Keith C. Ivey [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 11:46 AM
To: [EMAIL PROTECTED]
Cc: Douglas B Jones
Subject: RE: automatically incrementing an int value


On 12 Mar 2003, at 10:22, Douglas B. Jones wrote:

 INSERT INTO virus VALUES (91207,'VBS/Kakworm');
 INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
 
 As you can see, the numbers (n field) are way to high? Is this a bug
 in mysql or n the sql?

It's far more likely to be a bug in your application or your 
understanding.  What makes you think the numbers are too high?  You 
said you did 122,111 REPLACE queries, so the last one should have had 
an autoincrement value of at least 122,111.  Maybe you want to use 
INSERT IGNORE instead of REPLACE, so that you're keeping the first ID 
you create instead of the last?

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


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

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



RE: Calculate elapsed time between 2 time/dates

2003-03-12 Thread YC Nyon
Hi,

I need to get the time/date (ie. 1 day 12 hours 11 min 4sec) between 2 time
dates.
Can't seem to find any of these functions in the Mysql manual. The nearest
was Period_diff() which is calculating months elapsed.

Thanks
Nyon



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003


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

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: Converting DBs

2003-03-12 Thread walt
Tamayo, Nelson wrote:

 Is there a way to convert an Access database into MySQL easily?

 I am running into problems trying to convert it through VB code using a
 recordset. I'm rather new at this stuff. I'm also tried generating an insert
 statement through VB code and then executing it, I get the error Unknown
 column 'False' in 'field list'

 this is the SQL string I am using to insert the record.

 insert into csapps.qainfo

 (DCN,NoRetention,AttachmentCode,NPPN,CPTList,ReceivedDate,Answered,ClientID,
 PPO,Retry,Tax,EOP,TXDeficientIsAnswered,TXDeficient,CACPAnswered,CACPAuthori
 zed,MGMAnswered,MGMContracted,Priority,ImageStatus,BatchCode)

 values

   ('123673852',False,'E : JUST an ID CARD',False,
 'Dental','8/19/2001',True,'TN','??',0,0,'TX',True,False,False,False,False,Fa
 lse,1,'NotRequested','N1TN236012')

 Any ideas?

 Nelson Tamayo
 Claims Automation
 (800) 237-7767 x3520
 [EMAIL PROTECTED]

 The information contained in this transmission is legally privileged and
 confidential information intended only for the use of the individual or
 entity named above.  If the reader of this message is not the intended
 recipient, you are hereby notified that any dissemination, distribution, or
 copy of this transmission is strictly prohibited.  If you have received this
 transmission in error, please contact the sender immediately.

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

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

Nelson,
It looks like you need to put ticks around your true and false
values like below

  ('123673852','False','E : JUST an ID CARD','False',
'Dental','8/19/2001','True','TN','??',0,0,'TX','True','False','False','False','False','Fa

lse',1,'NotRequested','N1TN236012')

walt


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

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



mysql timestamp

2003-03-12 Thread Jonathan Li
I currently have a table that contains a timestamp(6) column. I need to
copy the data in that column to a new table with the column structure as
timestamp(14), what is the best way to do it (now that the timestamp
structure is changed)?

Thanks
Jonathan

--- ignore below
query
sql
---


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

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



RE: automatically incrementing an int value

2003-03-12 Thread Paul DuBois
At 11:41 -0500 3/12/03, Douglas B. Jones wrote:
Hi,

I understood replace to only increment n when it matches the
name value. There are 122,111 statements, but when you add
up the numbers in the n column, they exceed 122,111. They should
I don't know what you're trying to say here.  If you *add up* the
numbers in the column, of course they will exceed the number of records.
sum up (when you add all them up including the ones I did not
show) to 122,111. If you add up the ones I show, you get way
more than 122,111. I did a little test on:
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
The results were:

INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (4,'VBS/LoveLet-G');
INSERT INTO virus VALUES (5,'WM97/Myna-C');
I would have expected 3,4,5 to be 3,1,1. I was expecting it to start
from zero each time it got a new name, it looks like it takes the last
n value and then start from there with the new name. Does this make
sense what I am asking? Is there a way of doing what I want? Yes, I
could
insert and do a count, but I was looking for another way so that the
select would not be so resource expensive.
It sounds like you're expecting values to be reused in an AUTO_INCREMENT
column.
They aren't.

If you want to prevent generation of new values whenever you get a duplicate
name value, try the strategy I suggested (below) of using INSERT and ignoring
duplicate-key errors.

Thanks,
Cheers,
Douglas
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 11:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value
At 10:22 -0500 3/12/03, Douglas B. Jones wrote:
Hi,

I just tried the below:

create table virus (
 n int auto_increment not null,
 name char(128) not null,
 primary key(n),
 unique(name(100))
);
with a data file that has 122,111 sql commands like:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,W32/Sircam-A);
Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

123   492  6027

123 entries for VBS/LoveLet-G in the file. When I do a mysqldump of
the data file and just grep for VBS:
mysqldump virus|grep VBS
 
 INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (111009,'VBS/LoveLet-G');
INSERT INTO virus VALUES (55841,'VBS/Stages-A');
INSERT INTO virus VALUES (121521,'VBS/LoveLet-AS');
INSERT INTO virus VALUES (1208,'VBS/SST-A');
INSERT INTO virus VALUES (85602,'VBS/VBSWG-X');
INSERT INTO virus VALUES (1215,'VBS/VBSWG-Z');
INSERT INTO virus VALUES (5846,'VBS/LoveLet-CL');
INSERT INTO virus VALUES (5996,'VBS/VBSWG-Fam');
INSERT INTO virus VALUES (83835,'VBS/Haptime-Fam');
INSERT INTO virus VALUES (55356,'VBS/LoveLet-F');
INSERT INTO virus VALUES (55546,'VBS/FreeLinks');
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
As you can see, the numbers (n field) are way to high? Is this a bug
Why do you say that?  You indicated that the data file has 122,111
statements
in it.  I see no values for the n column that are larger than that
value.
REPLACE will increment the value of n when you specify a value of NULL
for that column.  It's behaving as it's supposed to.  Perhaps you should
use INSERT instead of REPLACE and process the file with mysql --force
to ignore duplicate key errors.  Specify the statements like this:
INSERT INTO virus (name) VALUES('VBS/xxx');

in mysql or n the sql? Even if I say unique(name) instead of
unique(name(100)),
I get the same results. Please note that I have tried destroying the
table
as well as the db, still get the same results.
Any ideas?

Thanks,
Cheers,
Douglas


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
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: automatically incrementing an int value

2003-03-12 Thread Joseph Bueno
Hi,

If you want to get 3,1,1 instead of 3,4,5, you should declare
your table this way:
create table virus (
 n int auto_increment not null,
 name char(128) not null,
 primary key(name,n),
 unique(name(100))
);
You can find a very good example in the manual:
http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html
Regards,
Joseph Bueno
Douglas B. Jones wrote:
Hi,

I understood replace to only increment n when it matches the
name value. There are 122,111 statements, but when you add
up the numbers in the n column, they exceed 122,111. They should
sum up (when you add all them up including the ones I did not
show) to 122,111. If you add up the ones I show, you get way
more than 122,111. I did a little test on:
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
The results were:

INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (4,'VBS/LoveLet-G');
INSERT INTO virus VALUES (5,'WM97/Myna-C');
I would have expected 3,4,5 to be 3,1,1. I was expecting it to start
from zero each time it got a new name, it looks like it takes the last
n value and then start from there with the new name. Does this make
sense what I am asking? Is there a way of doing what I want? Yes, I
could
insert and do a count, but I was looking for another way so that the
select would not be so resource expensive.
Thanks,
Cheers,
Douglas
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 11:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value

At 10:22 -0500 3/12/03, Douglas B. Jones wrote:

Hi,

I just tried the below:

create table virus (
   n int auto_increment not null,
   name char(128) not null,
   primary key(n),
   unique(name(100))
);
with a data file that has 122,111 sql commands like:

replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-E);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,WM97/Myna-C);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,VBS/LoveLet-G);
replace into virus values(NULL,W32/Sircam-A);
Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

  123   492  6027

123 entries for VBS/LoveLet-G in the file. When I do a mysqldump of
the data file and just grep for VBS:
mysqldump virus|grep VBS

INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (111009,'VBS/LoveLet-G');
INSERT INTO virus VALUES (55841,'VBS/Stages-A');
INSERT INTO virus VALUES (121521,'VBS/LoveLet-AS');
INSERT INTO virus VALUES (1208,'VBS/SST-A');
INSERT INTO virus VALUES (85602,'VBS/VBSWG-X');
INSERT INTO virus VALUES (1215,'VBS/VBSWG-Z');
INSERT INTO virus VALUES (5846,'VBS/LoveLet-CL');
INSERT INTO virus VALUES (5996,'VBS/VBSWG-Fam');
INSERT INTO virus VALUES (83835,'VBS/Haptime-Fam');
INSERT INTO virus VALUES (55356,'VBS/LoveLet-F');
INSERT INTO virus VALUES (55546,'VBS/FreeLinks');
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
As you can see, the numbers (n field) are way to high? Is this a bug


Why do you say that?  You indicated that the data file has 122,111
statements
in it.  I see no values for the n column that are larger than that
value.
REPLACE will increment the value of n when you specify a value of NULL
for that column.  It's behaving as it's supposed to.  Perhaps you should
use INSERT instead of REPLACE and process the file with mysql --force
to ignore duplicate key errors.  Specify the statements like this:
INSERT INTO virus (name) VALUES('VBS/xxx');


in mysql or n the sql? Even if I say unique(name) instead of
unique(name(100)),
I get the same results. Please note that I have tried destroying the
table
as well as the db, still get the same results.
Any ideas?

Thanks,
Cheers,
Douglas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
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: automatically incrementing an int value

2003-03-12 Thread Paul DuBois
At 11:45 -0500 3/12/03, Keith C. Ivey wrote:
On 12 Mar 2003, at 10:22, Douglas B. Jones wrote:

 INSERT INTO virus VALUES (91207,'VBS/Kakworm');
 INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
 As you can see, the numbers (n field) are way to high? Is this a bug
 in mysql or n the sql?
It's far more likely to be a bug in your application or your
understanding.  What makes you think the numbers are too high?  You
said you did 122,111 REPLACE queries, so the last one should have had
an autoincrement value of at least 122,111.  Maybe you want to use
INSERT IGNORE instead of REPLACE, so that you're keeping the first ID
you create instead of the last?
That will keep the original AUTO_INCREMENT value.  Unfortunately, it
will still generate (and throw away) a new AUTO_INCREMENT value each
time.  If one of the goals is to minimize number of values generated,
it's better to use just INSERT and ignore the error when the name
value is a duplicate.
--
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653
-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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


can't start safe_mysqld

2003-03-12 Thread edwin lin
I could not start ./safte_mysql.
Error message:
touch: /usr/local/mysql/var/gemini.err cannot create
chown: /usr/local/mysql/var/gemini.err: No such file or directory
Starting mysqld daemon with databases from /usr/local/mysql/var
./safe_mysqld: /usr/local/mysql/var/gemini.err: cannot create
So I created the directory of var, and restarted ./safe_mysqld --user=mysql. 
Error message: Starting mysqld daemon with databases from 
/usr/local/mysql/var
030309 17:10:19  mysqld ended

Then, I mored the gemini.err file:
030309 17:10:19  mysqld started
030309 17:10:19  /usr/local/mysql/libexec/mysqld: Can't create/write to file 
'/u
sr/local/mysql/var/gemini.pid' (Errcode: 13)
030309 17:10:19  /usr/local/mysql/libexec/mysqld: Table 'mysql.host' doesn't 
exi
st
030309 17:10:19  /usr/local/mysql/libexec/mysqld: Error on delete of 
'/usr/local
/mysql/var/gemini.pid' (Errcode: 2)
030309 17:10:19  mysqld ended

What went wrong? Advise please. Thanks!

Ed







_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
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: automatically incrementing an int value

2003-03-12 Thread Keith C. Ivey
On 12 Mar 2003, at 11:41, Douglas B. Jones wrote:

 INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
 INSERT INTO virus VALUES (4,'VBS/LoveLet-G');
 INSERT INTO virus VALUES (5,'WM97/Myna-C');
 
 I would have expected 3,4,5 to be 3,1,1. I was expecting it to start
 from zero each time it got a new name, it looks like it takes the last
 n value and then start from there with the new name. Does this make
 sense what I am asking?

That's not how autoincrement values work.  You've defined that column 
as a primary key for the table, so by definition each row will have a 
unique value, so you shouldn't be expecting multiple rows to have the 
value 1.

 Is there a way of doing what I want? Yes, I
 could insert and do a count, but I was looking for another way so that
 the select would not be so resource expensive.

It makes no sense that you seem to be trying to use a count as a 
primary ID, so I'm not sure what you want.  If you just want a count, 
then get rid of the primary index and autoincrement property and do 
an INSERT IGNORE for each followed by an UPDATE query to set n = n + 
1.

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

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

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



Re: Code explaination

2003-03-12 Thread Sergei Golubchik
Hi!

On Mar 12, Simont Tyler wrote:
 Just saw the following code in the MySQL 2.23.55 source code.
 
 The semi-colon after the if renders the if statement useless. Could
 someone explain if it is intentional. The comment indicates that it
 is.
 
 Simon
 
/*
   the following 'if', thought conceptually wrong,
   is a useful optimization nevertheless.
 */
 if (file-state != file-s-state.state);
   file-s-state.state = *file-state;

No, it's not intentional.
I thought it was removed, but it looks like it was removed in 4.0 only
:(

Fixed, thanks.
 
Regards,
Sergei

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

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

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



Replication error

2003-03-12 Thread trashMan

Hello, 
I've tried to setup a replication but ...i've several problem! I've
follow the manual istruction
http://www.mysql.com/doc/en/Replication_HOWTO.html 
But the slave don't start the replica.

SHOW SLAVE STATUS on SLAVE return SLAVE:running

SHOW PROCESSLIST on SLAVE return reconnecting after a failed read

Any suggestion about this?? Please, help me! I don't know what can i do!

The master and the slave are not in the same network: the master is a
server located in a webfarm and the slave is my pc. If i try to connect
me to mysql MASTER from my pc via mysql --host=
--user=userforreplica --password=pwdforreplica i enter but i can not do
nothing.

Thanks and...sorry for my bad english

Massimiliano


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

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 timestamp

2003-03-12 Thread Paul DuBois
At 12:07 -0500 3/12/03, Jonathan Li wrote:
I currently have a table that contains a timestamp(6) column. I need to
copy the data in that column to a new table with the column structure as
timestamp(14), what is the best way to do it (now that the timestamp
structure is changed)?
That doesn't matter.  TIMESTAMP values are always stored with the full
14 digits, regardless of the display width.
Thanks
Jonathan
--- ignore below
query
sql
---


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


RE: Is there any way to search a whole database for a value?

2003-03-12 Thread Luc Foisy


 -Original Message-
 From: Paul DuBois [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 11:33 AM
 To: Luc Foisy; MYSQL-List (E-mail)
 Subject: RE: Is there any way to search a whole database for a value?
 
 
 At 9:21 -0500 3/12/03, Luc Foisy wrote:
 Perhaps one day UNION will be added to UPDATE
 
 You'd still have to name every column to be updated explicitly.
 There is no update whatever column happens to contain this value
 syntax.

of course you would have to name everything explicitly, but the original
task was to update several tables/columns, not necessarily all tables and 
all columns, so thats not much of a problem.

A thought about the UNION, might as well do two UPDATE's :)

You have available to you as of 4.0.4 the multi-table UPDATE

UPDATE [LOW_PRIORITY] [IGNORE] tbl_name [, tbl_name ...]
SET col_name1=expr1 [, col_name2=expr2 ...]
[WHERE where_definition]

Curious if the columns are named the same in all tables if you could a single SET, 
such as...

UPDATE table1, table2 SET column = 5 WHERE column = 10

If you feel the need to go further with such strange tactics, you could use the
multi-table UPDATE to explicitly name columns up to the allow query length

Then again I am no Paul Dubois, just putting out some thoughts that may tickle some 
peoples fancy :)

   I need to look in several different tables/columns in a
   database for a
   particular value.  If I find it, I need to update it.  Is
   there any way to
   search/update every table/column in one query in a
particular 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



Recordset paging with php on mySql database ... works on first page but ...

2003-03-12 Thread Stitchin'
I had asked the group previously about limiting the results shown on my
website to a certain number and then navigating to the next group etc...

I found a great article by Joe O'Donnell called Building A Dynamic MySql
Paging Class with PHP ... I created his example and it worked fine.

Then I started changing his example and tried to use it with my database
using a query where the web visitor selects a catagory of designs to
display.  The catagory has 24 designs and I'm paging 6 at a time.  The first
page comes out fine and it has the navigation buttons on the bottom for the
other pages ...but when I try to navigate to any of the other pages, I get
nothing AND the catagory selected disappears from the heading of the page.

In the document that holds this html code, I do have the line,

 $interest = $_POST['interest'];

to make sure that the visitor's selection from the previous page comes
forward and the initial query is getting the correct results.

Is there anybody out there who would be willing to look at my code and see
what is happening and why I don't get any results from succeeding pages?
This is the very last thing I need to finish my website and I'm so
frustrated ... I know the example works and I know I'm getting some results
but I just have no idea where to go from here ... I would be SO GRATEFUL
... please email me at [EMAIL PROTECTED] if you can take a moment
to help me.

Humbly begging for help,
Renee Toth
Stitchin' Up A Storm
www.stitchinupastorm.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: automatically incrementing an int value

2003-03-12 Thread Benjamin Pflugmann
On Wed 2003-03-12 at 11:16:09 -0600, [EMAIL PROTECTED] wrote:
 At 11:41 -0500 3/12/03, Douglas B. Jones wrote:
 Hi,
 
 I understood replace to only increment n when it matches the
 name value.

In that case, you want a primary key on (name,n) with n being
auto_increment.

 There are 122,111 statements, but when you add
 up the numbers in the n column, they exceed 122,111. They should
 
 I don't know what you're trying to say here.  If you *add up* the
 numbers in the column, of course they will exceed the number of records.

I think he expects one row for each name, with the n being the
(original) number of rows which had that name.

If I am correct, another way to reach the same goal is to simply
insert all rows as (without unique key on name, only a normal key) and
then do a

  SELECT name, COUNT(*) FROM virus GROUP BY name;

This has the advantage that you, Douglas, can keep timestamps and so
on which enables better analysis afterwards. If you are not interested
in other data, but only the one-time analysis you presented, why
(mis-)use a database at all? Simple do something like

  $ sort  file_with_names | uniq -c 

in the shell (I presume you have shell access because you used grep
before).

HTH,

Benjamin.

-- 
[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: Null values set in tables

2003-03-12 Thread gerald_clark
You have to show us.

Steve Holt wrote:

I am sure I am missing something very simple but I cant see it
I am using MS Access 97 as a front end to MYSQL
I have a table with the following desc
CREATE TABLE `tblcoursesoffered` (
  `DateCourseCreated` datetime default NULL,
  `Specialty` int(25) NOT NULL default '0',
  `CourseNo` float NOT NULL default '0',
  `CourseName` char(10) NOT NULL default '',
  `CourseDesc` char(255) default NULL,
  `ExamType` char(30) default NULL,
  `BeginDate` datetime NOT NULL default '-00-00 00:00:00',
  `EndDate` datetime NOT NULL default '-00-00 00:00:00',
  `ActualCity` char(30) NOT NULL default '',
  `ActualState` char(2) NOT NULL default '',
  `CourseStatus` char(15) default NULL,
  `CourseCoordinator` float default NULL,
  `ProjAttendance` float default NULL,
  `CMEHrsCourse` float default NULL,
  `CMEHrsAdditional` float default NULL,
  `CMEFee` double default NULL,
  `CAT1` tinyint(1) default NULL,
  `SponsorID` char(6) default NULL,
  `SponsorContact` char(50) default NULL,
  `SponsorContactPhone` char(13) default NULL,
  `SponsorContactFax` char(13) default NULL,
  `CourseHotel` int(11) default NULL,
  `FacSleepingRoomsQty` float default NULL,
  `StaffSleepingRoomsQty` float default NULL,
  `fldCourseHotel` int(11) default NULL,
  `fldTransportationInfo` char(255) default NULL,
  `fldTimestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`CourseName`),
  KEY `Specialty` (`Specialty`),
  KEY `BeginDate` (`BeginDate`)
) TYPE=MyISAM ROW_FORMAT=FIXED;
Even with this description MYSQL allows me to create a new record with 
null values in the fields
listed as not null
is there another setting somewhere I am missing??

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




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


mysql++ Result datatype

2003-03-12 Thread Tan Siewling
Hi,
I would like to enquire abt Result datatype in MySql++.
After getting songList,
Result songList=dac.getSong();
1. Is it possible for me to get a specific record out?
2. Is it possible for me to get a random record out?
Regards,
Petty_folly
_
Take a break! Find destinations on MSN Travel. http://www.msn.com.sg/travel/
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


AIX installation

2003-03-12 Thread kwj
Hi!  I'm trying to install mysql on a RISC-6000 box running AIX 4.3.  When
I type './mysql' I get the following error:

# ./mysql
Could not load program ./mysql:
Dependent module libz.a(shr.o) could not be loaded.
Could not load module libz.a(shr.o).
Error was: No such file or directory

Does anyone have any experience with this error?  Do you have any
suggestions for how to resolve it?
Thanks for your help!
-Kent Johnson
USC Credit Union
[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



Websphere 4 JDBC Provider driver

2003-03-12 Thread Garth Dahlstrom
Hi all, 

I'm wondering if anyone has configured IBM Websphere 4.0 to use MySQL
as a JDBC Provider for Entity Beans (EJBs).  The configuration is not 
anything like servlet config where you throw the MM driver in the 
WEB-INF/lib directory.  

I haven't been able to find any indication that anyone has done this
before on the 'net.  

Does anyone know if this has been tried before?  If so can someone
give me a pointer to where I should start looking?

Cheers,

-Garth

Northern.CA ===--
http://www.northern.ca 
Canada's Search Engine



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

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: Websphere 4 JDBC Provider driver

2003-03-12 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Garth Dahlstrom wrote:
Hi all, 

I'm wondering if anyone has configured IBM Websphere 4.0 to use MySQL
as a JDBC Provider for Entity Beans (EJBs).  The configuration is not 
anything like servlet config where you throw the MM driver in the 
WEB-INF/lib directory.  

I haven't been able to find any indication that anyone has done this
before on the 'net.  
You set it up like any other JNDI datasource in WebSphere.

Does anyone know if this has been tried before?  If so can someone
give me a pointer to where I should start looking?
...HoweverIf you're doing EJBs with CMP, you're out of luck, as 
WebSphere only does CMP for 'certified' databases, which are basically 
Sybase, SQL Server (through a particular expensive third-party JDBC 
driver only), Oracle and DB2 (of course).

If you're doing your own persistence (BMP), just lookup the datasource 
in JNDI, and use it like anything else.

	-Mark

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

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

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+b5QqtvXNTca6JD8RAinZAKCcdFnnHmv8VRH/bm2BDuYxx3wm9gCeP2JT
P6OcCkKnjmsWp22fFE5nI2k=
=rRNW
-END PGP SIGNATURE-
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


synopsis of the problem (one line)

2003-03-12 Thread root
Description:

How-To-Repeat:

Fix:


Submitter-Id:  submitter ID
Originator:root
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.41 (Source distribution)

Environment:

System: Linux mfarma.mgfarma.net.mx 2.4.7-10 #1 Thu Sep 6 17:21:28 EDT 2001 i586 
unknown
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-98)
Compilation info: CC='gcc'  CFLAGS='-O2 -march=i386 -mcpu=i686 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'  CXX='c++'  CXXFLAGS='-O2 -march=i386 
-mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 mar 12 06:06 /lib/libc.so.6 - libc-2.2.4.so
-rwxr-xr-x1 root root  5716491 sep  4  2001 /lib/libc-2.2.4.so
-rw-r--r--1 root root 27304836 sep  4  2001 /usr/lib/libc.a
-rw-r--r--1 root root  178 sep  4  2001 /usr/lib/libc.so
Configure command: ./configure  i386-redhat-linux --prefix=/usr --exec-prefix=/usr 
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec 
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --without-debug --without-readline --enable-shared 
--with-extra-charsets=complex --with-bench --localstatedir=/var/lib/mysql 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql 
--with-extra-charsets=all --disable-assember --with-berkeley-db 
--enable-large-files=yes --enable-largefile=yes --with-thread-safe-client 
--enable-assembler


















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

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: Recordset paging with php on mySql database ... works on first page but ...

2003-03-12 Thread Dan Rossi
hi dude yeh u have to append the page query to the current query ,

here is an example of my db class

http://electroteque.dyndns.org:1023/benchmark/DB.phps

down the page is the pagination u want in particular the url function

-Original Message-
From: Stitchin' [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 5:20 AM
To: [EMAIL PROTECTED]
Subject: Recordset paging with php on mySql database ... works on first
page but ...


I had asked the group previously about limiting the results shown on my
website to a certain number and then navigating to the next group etc...

I found a great article by Joe O'Donnell called Building A Dynamic MySql
Paging Class with PHP ... I created his example and it worked fine.

Then I started changing his example and tried to use it with my database
using a query where the web visitor selects a catagory of designs to
display.  The catagory has 24 designs and I'm paging 6 at a time.  The first
page comes out fine and it has the navigation buttons on the bottom for the
other pages ...but when I try to navigate to any of the other pages, I get
nothing AND the catagory selected disappears from the heading of the page.

In the document that holds this html code, I do have the line,

 $interest = $_POST['interest'];

to make sure that the visitor's selection from the previous page comes
forward and the initial query is getting the correct results.

Is there anybody out there who would be willing to look at my code and see
what is happening and why I don't get any results from succeeding pages?
This is the very last thing I need to finish my website and I'm so
frustrated ... I know the example works and I know I'm getting some results
but I just have no idea where to go from here ... I would be SO GRATEFUL
... please email me at [EMAIL PROTECTED] if you can take a moment
to help me.

Humbly begging for help,
Renee Toth
Stitchin' Up A Storm
www.stitchinupastorm.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



4.0.11 master.info replication

2003-03-12 Thread John Ehrlinger
I've recently upgraded to 4.0.11 (4.0.11-0 rpm) on RedHat 8.0. I've had
replication running before, and now it's giving me trouble.

slave start fails with the following error

Could not initialize master info structure, check permisions on
master.info

I've checked the file permissions, and they seem fine as well as the
mysql directory permissions.
-rw-rw1 mysqlmysql  71 Mar 12 15:40 master.info

'show slave status' returns fine with the info from master.info file. I
can even 'load data from master'.

I'm also getting errors in the log file
030312 15:40:48  Error reading slave log configuration
030312 15:40:48  Note: Failed to initialized master info
/usr/sbin/mysqld: ready for connections.
Version: '4.0.11-gamma-log'  socket: '/var/lib/mysql/mysql.sock'  port:
3306
030312 15:41:19  Error reading slave log configuration
030312 16:20:43  Error reading slave log configuration

I can still see data, so it doesn't seem that the basedir has changed, I
just can't replicate.

Any ideas what I've done to break this?

Thanks,
John

-- 
John Ehrlinger [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



synopsis of the problem (one line)

2003-03-12 Thread Adam Dzieciatko
Description:

How-To-Repeat:

Fix:


Submitter-Id:  submitter ID
Originator:Adam Dzieciatko
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.54 (PLD Linux Distribution MySQL RPM)

Environment:

System: Linux morg42 2.2.22 #1 Sun Nov 17 10:54:08 UTC 2002 i586 Pentium_MMX unknown 
PLD Linux
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-pld-linux/2.95.4/specs
gcc version 2.95.4 20010319 (prerelease)
Compilation info: CC='i586-pld-linux-gcc'  CFLAGS='-O2 -march=i586 
-fomit-frame-pointer'  CXX='i586-pld-linux-gcc'  CXXFLAGS='-O2 -march=i586 -fno-rtti 
-fno-exceptions -fomit-frame-pointer'  LDFLAGS='-s'
LIBC: 
lrwxrwxrwx1 root root   13 01-10 15:04 /lib/libc.so.6 - libc-2.2.5.so
-rwxr-xr-x1 root root  1155684 11-08 04:33 /lib/libc-2.2.5.so
Configure command: ./configure 'LDFLAGS=-s' 'CFLAGS=-O2 -march=i586 
-fomit-frame-pointer' 'CXXFLAGS=-O2 -march=i586 -fno-rtti -fno-exceptions 
-fomit-frame-pointer' 'FFLAGS=-O2 -march=i586' 'CPPFLAGS=' 'CC=i586-pld-linux-gcc' 
'CXX=i586-pld-linux-gcc' '--build=i586-pld-linux' '--prefix=/usr' '--exec-prefix=/usr' 
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' 
'--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/sbin' 
'--localstatedir=/var/lib/mysql' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' 
'--infodir=/usr/share/info' '-C' '--without-debug' '--enable-shared' '--enable-static' 
'--enable-assembler' '--with-pthread' '--with-named-curses-libs=-lncurses' 
'--with-raid' '--with-extra-charsets=all' '--with-mysqld-user=mysql' 
'--with-unix-socket-path=/var/lib/mysql/mysql.sock' '--without-readline' 
'--without-docs' '--with-low-memory' '--with-comment=PLD Linux Distribution MySQL RPM' 
'--enable-thread-safe-client' 'build_alias=i586-pld-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



COUNT(DISTINCT ...)

2003-03-12 Thread Bob Sawyer
HELP! I'm getting the following error:

--
Error (SQL):
SELECT date, subject, location, private, id, duration, dategroup_id,
COUNT(DISTINCT subject) AS appointment_count, inituserid FROM mgw_calendar
WHERE userid=1 AND SUBSTRING(date,1,8) = '20030312' GROUP BY date, subject,
location, private, id, duration, dategroup_id, inituserid ORDER BY date

Error (MSG):
You have an error in your SQL syntax near 'DISTINCT subject) AS
appointment_count, inituserid FROM mgw_calendar WHERE useri' at line 1
---


I'm using MySQL 3.22.32  does COUNT(DISTINCT ...) not work with this
version?

Thanks,

Bob Sawyer
---
Pixellated!
Design:Develop:Deliver
www.pixellated.org



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

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



Re: COUNT(DISTINCT ...)

2003-03-12 Thread Paul DuBois
At 16:42 -0500 3/12/03, Bob Sawyer wrote:
HELP! I'm getting the following error:

--
Error (SQL):
SELECT date, subject, location, private, id, duration, dategroup_id,
COUNT(DISTINCT subject) AS appointment_count, inituserid FROM mgw_calendar
WHERE userid=1 AND SUBSTRING(date,1,8) = '20030312' GROUP BY date, subject,
location, private, id, duration, dategroup_id, inituserid ORDER BY date
Error (MSG):
You have an error in your SQL syntax near 'DISTINCT subject) AS
appointment_count, inituserid FROM mgw_calendar WHERE useri' at line 1
---
I'm using MySQL 3.22.32  does COUNT(DISTINCT ...) not work with this
version?
No, not until 3.23.2.

Thanks,

Bob Sawyer
---
Pixellated!
Design:Develop:Deliver
www.pixellated.org


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


unworking directive --with-unix-socket-path=/

2003-03-12 Thread Slawomir Orlowski
Hello,
 I have RH 6.1.
 I have mysql 3.22.25 version binary installation
 databases are in /var/lib/mysql
 binaries in /usr/bin/mysql etc
 /var/lib/mysql/mysql.pid
 /var/lib/mysql/mysql.sock
 and rpm packages:
 perl-DBI-1.13-1,
 perl-DBD-mysql-mysql-1.22.10-1
 perl-5-5.0050
 and binary installation of php 4.04pl
 and it was working perfectly (I have web page written in php and perl),

two day ago I have installed from source (to old RH to get binary
 installation) mysql 3.23.55.
 It compiled perfectly and was installed in
 /usr/local/mysql
 databases in
 /usr/local/mysql/var
/tmp/mysql.sock

 I have stoped old mysql server and run new one.

 I could connect with new /usr/local/mysql/bin/mysql client (old one was not
 working) and select data from moved databases.
 problem is that web pages are not working any more,
 after running by hand some script (which use to work) I'm getting:
 
 Date::Parse is not available but requested by Class::Date
 DBI-connect(database=class;host=localhost) failed: Can't connect to local
 MySQL server through socket '/var/lib/mysql/mysql.sock' (111) at ./class
 line 27
 Can't call method prepare on an undefined value at ./class line 156.
 
 it looks to me that that it somehow is trying to connect to old not working
 mysql database.
 because now mysql.sock is in /tmp/mysql.sock
 I have found somewhere that pearl script I can add directive:
 mysql_read_default_file
 $dbh = DBI-connect(DBI:mysql:$database
 . ;mysql_read_default_file=$ENV{HOME}/.my.cnf,
 $user, $password);
 I did and it worked, but I do not know what to do in php scripts (I do not
 know php I'm admin) and it is daunting job to change manually all perl
 scripts.

so far my problems my faults:
but now we have bug:

bacause I have problem with mysql.socket which was in old version in
/var/lib/mysql now in /tmp

so

 ./configure --prefix=/usr/local/mysql \
--with-unix-socket-path=/var/lib/mysql/mysql.sock
make;make install etc.

should produce mysql with socket in /var/lib/mysql dictionary instead of
/tmp
but once again I have got socket in /tmp/mysql.sock

So this directive is not working.

I have solved my problem by replacing in /etc/my.conf
socket = /tmp/mysql.sock
with
socket  = /var/lib/mysql/mysql.sock

and now it is working.
But it does not change the fact that
directive --with-unix-socket-path=/var/lib/mysql/mysql.sock is not working.


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

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: unworking directive --with-unix-socket-path=/

2003-03-12 Thread Paul DuBois
At 17:04 -0500 3/12/03, Slawomir Orlowski wrote:
Hello,
 I have RH 6.1.
 I have mysql 3.22.25 version binary installation
 databases are in /var/lib/mysql
 binaries in /usr/bin/mysql etc
 /var/lib/mysql/mysql.pid
 /var/lib/mysql/mysql.sock
 and rpm packages:
 perl-DBI-1.13-1,
 perl-DBD-mysql-mysql-1.22.10-1
 perl-5-5.0050
 and binary installation of php 4.04pl
 and it was working perfectly (I have web page written in php and perl),
two day ago I have installed from source (to old RH to get binary
 installation) mysql 3.23.55.
 It compiled perfectly and was installed in
 /usr/local/mysql
 databases in
 /usr/local/mysql/var
/tmp/mysql.sock
 I have stoped old mysql server and run new one.

 I could connect with new /usr/local/mysql/bin/mysql client (old one was not
 working) and select data from moved databases.
 problem is that web pages are not working any more,
 after running by hand some script (which use to work) I'm getting:
 
 Date::Parse is not available but requested by Class::Date
 DBI-connect(database=class;host=localhost) failed: Can't connect to local
 MySQL server through socket '/var/lib/mysql/mysql.sock' (111) at ./class
 line 27
 Can't call method prepare on an undefined value at ./class line 156.
 
 it looks to me that that it somehow is trying to connect to old not working
 mysql database.
 because now mysql.sock is in /tmp/mysql.sock
 I have found somewhere that pearl script I can add directive:
 mysql_read_default_file
 $dbh = DBI-connect(DBI:mysql:$database
 . ;mysql_read_default_file=$ENV{HOME}/.my.cnf,
 $user, $password);
 I did and it worked, but I do not know what to do in php scripts (I do not
 know php I'm admin) and it is daunting job to change manually all perl
 scripts.
so far my problems my faults:
but now we have bug:

bacause I have problem with mysql.socket which was in old version in
/var/lib/mysql now in /tmp
so

 ./configure --prefix=/usr/local/mysql \
--with-unix-socket-path=/var/lib/mysql/mysql.sock
make;make install etc.
should produce mysql with socket in /var/lib/mysql dictionary instead of
/tmp
but once again I have got socket in /tmp/mysql.sock
So this directive is not working.

I have solved my problem by replacing in /etc/my.conf
socket = /tmp/mysql.sock
with
socket  = /var/lib/mysql/mysql.sock
and now it is working.
But it does not change the fact that
directive --with-unix-socket-path=/var/lib/mysql/mysql.sock is not working.
It does work, I use it all the time to specify where the socket file
for each of my several-dozen-different-servers should be. :-)
However, after you recompile MySQL (and the client library), you'll also
need to rebuild DBD::mysql and PHP so that they link in the new client
library.  For PHP, you can also specify the socket path in your php.ini
file if you don't want to recompile:
mysql.default_socket = /path/to/socket/file;



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


RPM missing files

2003-03-12 Thread Andrey
Hi,
I jusr downloaded the latest release of mySQL server
in RPM for Linux and when i've installed it i found
that some tools such as mysqladmin are mising...Any
suggestions?
Thank you,Andrey

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.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



UPDATE syntax help

2003-03-12 Thread MySQL
Hi all,  I am having a little UPDATE syntax issue.  According to the manual

UPDATE EBA_USERS, IMPORT_USERS
SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
EBA_USERS.REP_LAST_NAME = IMPORT_USERS.REP_LAST_NAME,
EBA_USERS.REP_DISABLED = IMPORT_USERS.REP_DISABLED
WHERE EBA_USERS.REP_ID = IMPORT_USERS.REP_ID

should work (as I understand it ;-)  but I get the error

ERROR 1064: You have an error in your SQL syntax near ' IMPORT_USERS
SET EBA_USERS.HUB_ID = IIMPORT_USERS.HUB_ID, EBA_USERS.REP_LOCATION_ID =
IMPO' at line 1

I did note in the comments section at the bottom someone else with
same/similar problem, but have been unable to find a thread in the mail
archive.  My apologies if this has been dealt with already, or a workaround
suggested...

MySQL 3.23.51-nt on a Win2K box
MyODBC 3.51

Thanks

Jeff Creed
Throbware

(0417) 797 592
http://www.throbware.com.au


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

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: RPM missing files

2003-03-12 Thread Paul DuBois
At 14:29 -0800 3/12/03, Andrey wrote:
Hi,
I jusr downloaded the latest release of mySQL server
in RPM for Linux and when i've installed it i found
that some tools such as mysqladmin are mising...Any
suggestions?
The server RPM doesn't include them.  You need to install
the client RPM as well.
Thank you,Andrey


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
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: UPDATE syntax help

2003-03-12 Thread Paul DuBois
At 8:33 +1000 3/13/03, MySQL wrote:
Hi all,  I am having a little UPDATE syntax issue.  According to the manual
According to the manual, this won't work until MySQL 4.x

UPDATE EBA_USERS, IMPORT_USERS
SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
EBA_USERS.REP_LAST_NAME = IMPORT_USERS.REP_LAST_NAME,
EBA_USERS.REP_DISABLED = IMPORT_USERS.REP_DISABLED
WHERE EBA_USERS.REP_ID = IMPORT_USERS.REP_ID
should work (as I understand it ;-)  but I get the error

ERROR 1064: You have an error in your SQL syntax near ' IMPORT_USERS
SET EBA_USERS.HUB_ID = IIMPORT_USERS.HUB_ID, EBA_USERS.REP_LOCATION_ID =
IMPO' at line 1
I did note in the comments section at the bottom someone else with
same/similar problem, but have been unable to find a thread in the mail
archive.  My apologies if this has been dealt with already, or a workaround
suggested...
MySQL 3.23.51-nt on a Win2K box
MyODBC 3.51
Thanks

Jeff Creed
Throbware
(0417) 797 592
http://www.throbware.com.au


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


Fwd: binary logging question

2003-03-12 Thread Charles Holbrook

http://mindforums.com/forums/showthread.php?threadid=82

Per this thread I started to set up the two way replication as stated and 
reached a point where I had/have a question about binary logging.  How and 
what does binary logging keep track of.  I know that it keeps track of 
changes made to the database but does it only keep track of writes to the 
database?

I guess in an easier way will binary logging keep track of any updates it 
gets from the master database if it is turned on on a slave database sql?
Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum 
immane mittam.



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
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: UPDATE syntax help

2003-03-12 Thread JJ
That explains it then D'OH
Is there a workaround?
Thanks :-)

- Original Message -
From: Paul DuBois [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:02 AM
Subject: Re: UPDATE syntax help


 At 8:33 +1000 3/13/03, MySQL wrote:
 Hi all,  I am having a little UPDATE syntax issue.  According to the
manual

 According to the manual, this won't work until MySQL 4.x

 
 UPDATE EBA_USERS, IMPORT_USERS
 SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
 EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
 EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
 EBA_USERS.REP_LAST_NAME = IMPORT_USERS.REP_LAST_NAME,
 EBA_USERS.REP_DISABLED = IMPORT_USERS.REP_DISABLED
 WHERE EBA_USERS.REP_ID = IMPORT_USERS.REP_ID
 
 should work (as I understand it ;-)  but I get the error
 
 ERROR 1064: You have an error in your SQL syntax near ' IMPORT_USERS
 SET EBA_USERS.HUB_ID = IIMPORT_USERS.HUB_ID, EBA_USERS.REP_LOCATION_ID =
 IMPO' at line 1
 
 I did note in the comments section at the bottom someone else with
 same/similar problem, but have been unable to find a thread in the mail
 archive.  My apologies if this has been dealt with already, or a
workaround
 suggested...
 
 MySQL 3.23.51-nt on a Win2K box
 MyODBC 3.51
 
 Thanks
 
 Jeff Creed
 Throbware
 
 (0417) 797 592
 http://www.throbware.com.au




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

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: UPDATE syntax help

2003-03-12 Thread Paul DuBois
At 9:45 +1000 3/13/03, JJ wrote:
That explains it then D'OH
Is there a workaround?
Thanks :-)
One way is to use a script that issues a join to figure out which
records to update, then constructs the appropriate UPDATE statements.
- Original Message -
From: Paul DuBois [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:02 AM
Subject: Re: UPDATE syntax help

 At 8:33 +1000 3/13/03, MySQL wrote:
 Hi all,  I am having a little UPDATE syntax issue.  According to the
manual
 According to the manual, this won't work until MySQL 4.x

 
 UPDATE EBA_USERS, IMPORT_USERS
 SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
 EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
 EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
 EBA_USERS.REP_LAST_NAME = IMPORT_USERS.REP_LAST_NAME,
 EBA_USERS.REP_DISABLED = IMPORT_USERS.REP_DISABLED
 WHERE EBA_USERS.REP_ID = IMPORT_USERS.REP_ID
 
 should work (as I understand it ;-)  but I get the error
 
 ERROR 1064: You have an error in your SQL syntax near ' IMPORT_USERS
 SET EBA_USERS.HUB_ID = IIMPORT_USERS.HUB_ID, EBA_USERS.REP_LOCATION_ID =
 IMPO' at line 1
 
 I did note in the comments section at the bottom someone else with
 same/similar problem, but have been unable to find a thread in the mail
 archive.  My apologies if this has been dealt with already, or a
workaround
 suggested...
 
 MySQL 3.23.51-nt on a Win2K box
 MyODBC 3.51
 
 Thanks
 
 Jeff Creed
 Throbware
 
 (0417) 797 592
  http://www.throbware.com.au


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
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: UPDATE syntax help

2003-03-12 Thread Andy Eastham
Paul,

You have to use the results of one select to generate lots of update
statements.  If you execute all these from your program, make sure you use a
different database connection for the updates, if you're keeping a results
set open.

Alternatively, if it's a one off, generate a script file with your code (or
directly from SQL if you're a martyr) and then run it.

I've used both methods successfully,

Andy

 -Original Message-
 From: JJ [mailto:[EMAIL PROTECTED]
 Sent: 12 March 2003 23:45
 To: MySQL
 Cc: Paul DuBois
 Subject: Re: UPDATE syntax help


 That explains it then D'OH
 Is there a workaround?
 Thanks :-)

 - Original Message -
 From: Paul DuBois [EMAIL PROTECTED]
 To: MySQL [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 9:02 AM
 Subject: Re: UPDATE syntax help


  At 8:33 +1000 3/13/03, MySQL wrote:
  Hi all,  I am having a little UPDATE syntax issue.  According to the
 manual
 
  According to the manual, this won't work until MySQL 4.x
 
  
  UPDATE EBA_USERS, IMPORT_USERS
  SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
  EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
  EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
  EBA_USERS.REP_LAST_NAME = IMPORT_USERS.REP_LAST_NAME,
  EBA_USERS.REP_DISABLED = IMPORT_USERS.REP_DISABLED
  WHERE EBA_USERS.REP_ID = IMPORT_USERS.REP_ID
  
  should work (as I understand it ;-)  but I get the error
  
  ERROR 1064: You have an error in your SQL syntax near ' IMPORT_USERS
  SET EBA_USERS.HUB_ID = IIMPORT_USERS.HUB_ID,
 EBA_USERS.REP_LOCATION_ID =
  IMPO' at line 1
  
  I did note in the comments section at the bottom someone else with
  same/similar problem, but have been unable to find a thread in the mail
  archive.  My apologies if this has been dealt with already, or a
 workaround
  suggested...
  
  MySQL 3.23.51-nt on a Win2K box
  MyODBC 3.51
  
  Thanks
  
  Jeff Creed
  Throbware
  
  (0417) 797 592
  http://www.throbware.com.au
 
 


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

 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: UPDATE syntax help

2003-03-12 Thread JJ
Thanks...

Currently I am doing exactly that.  One data set open creating another.  I
was trying to speed the process up, although I am only dealing with 20,000
records so shouldn't complain.  Thanks all for the suggestions...  I look
forward to 4.x

JJ

- Original Message -
From: Andy Eastham [EMAIL PROTECTED]
To: [EMAIL PROTECTED] Mysql. Com [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 10:14 AM
Subject: RE: UPDATE syntax help


 Paul,

 You have to use the results of one select to generate lots of update
 statements.  If you execute all these from your program, make sure you use
a
 different database connection for the updates, if you're keeping a results
 set open.

 Alternatively, if it's a one off, generate a script file with your code
(or
 directly from SQL if you're a martyr) and then run it.

 I've used both methods successfully,

 Andy

  -Original Message-
  From: JJ [mailto:[EMAIL PROTECTED]
  Sent: 12 March 2003 23:45
  To: MySQL
  Cc: Paul DuBois
  Subject: Re: UPDATE syntax help
 
 
  That explains it then D'OH
  Is there a workaround?
  Thanks :-)
 
  - Original Message -
  From: Paul DuBois [EMAIL PROTECTED]
  To: MySQL [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
  Sent: Thursday, March 13, 2003 9:02 AM
  Subject: Re: UPDATE syntax help
 
 
   At 8:33 +1000 3/13/03, MySQL wrote:
   Hi all,  I am having a little UPDATE syntax issue.  According to the
  manual
  
   According to the manual, this won't work until MySQL 4.x
  
   
   UPDATE EBA_USERS, IMPORT_USERS
   SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
   EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
   EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
   EBA_USERS.REP_LAST_NAME = IMPORT_USERS.REP_LAST_NAME,
   EBA_USERS.REP_DISABLED = IMPORT_USERS.REP_DISABLED
   WHERE EBA_USERS.REP_ID = IMPORT_USERS.REP_ID
   
   should work (as I understand it ;-)  but I get the error
   
   ERROR 1064: You have an error in your SQL syntax near ' IMPORT_USERS
   SET EBA_USERS.HUB_ID = IIMPORT_USERS.HUB_ID,
  EBA_USERS.REP_LOCATION_ID =
   IMPO' at line 1
   
   I did note in the comments section at the bottom someone else with
   same/similar problem, but have been unable to find a thread in the
mail
   archive.  My apologies if this has been dealt with already, or a
  workaround
   suggested...
   
   MySQL 3.23.51-nt on a Win2K box
   MyODBC 3.51
   
   Thanks
   
   Jeff Creed
   Throbware
   
   (0417) 797 592
   http://www.throbware.com.au
  
  
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 



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

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



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

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



mysqld-nt vs mysqld-max-nt

2003-03-12 Thread Dan Cumpian
Hello,

I've been running mysqld-nt on W2K and WinXP for awhile now (using
MyISAM tables) and I'm a bit confused by what's in the max binary.  Is
the biggest difference InnoDB tables? 

Thank you,
Dan Cumpian


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

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



startup and install issues

2003-03-12 Thread Defryn, Guy


I have installed 4.0.9 from source.

After compiling it I want to start it with

/usr/local/mysql/bin/mysqld_safe --user=mysql 

and the message mysqld ended appears.


When I move the startup script to the appropriate directory and reboot
I get the following error

Can't execute @bindir@/mysqld_safe from [EMAIL PROTECTED]@

Any ideas?

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

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



Telneting failed

2003-03-12 Thread Tam, Michael
Hi All,

I am running MySQL 4.0.11a on Win2k Pro at home.  The machine is connected
to a router which redirect port 3306 to MySQL.  Things seem to work very
well.  I have MySQLCC and MySQL-Front both connecting to MySQL locally and
remotely.   However, when I try connecting through telnet locally at this
point, I receive a prompt with MySQL Version and some ASCII characters, and
then a few second later I got a bad handshake and connection closed.   I do
not have a clue whether it is problem caused by the router or I misconfig
MySQL so it fails the telnet connection.  Any suggestion or help would be
greatly appreciated.

regards,
Michael



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

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: Telneting failed

2003-03-12 Thread Dan Nelson
In the last episode (Mar 12), Tam, Michael said:
 I am running MySQL 4.0.11a on Win2k Pro at home.  The machine is
 connected to a router which redirect port 3306 to MySQL.  Things seem
 to work very well.  I have MySQLCC and MySQL-Front both connecting to
 MySQL locally and remotely.  However, when I try connecting through
 telnet locally at this point, I receive a prompt with MySQL Version
 and some ASCII characters, and then a few second later I got a bad
 handshake and connection closed.  I do not have a clue whether it is
 problem caused by the router or I misconfig MySQL so it fails the
 telnet connection.  Any suggestion or help would be greatly
 appreciated.

MySQLD is not a telnet daemon.  You need to access it with an ODBC
connection or the mysql.exe CLI frontend.

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



Datetime vs Unixtime

2003-03-12 Thread Jason Brothers
Hello,

I apologize if this topic has been discussed in the past.  I am just looking
for feedback whether to use Datetime or Unixtime  (32 bit Int) for my
timestamps.  From what I can tell here are the advantages and disavantages
of each method:

Unixtime (stored as 32bit int):
advantages:
- should require less CPU cycles to process
- required only 4 bytes of storage.

disadvantages:
- a lot of 3rd party tools (interfacing thru ODBC) do not have native
functions for Unixtime  (eg. Crystal Reports,  Excel).
- Unixtime may confuse end-users.

Datetime:
advantages:
- 3rd party tools have native functions for Datetime
- Easier to understand for end-users

disadvantages:
- Likely cause more overhead to process  (for queries and inserts).
- Requires 8 bytes of storage.

At the moment I am on the fence and would appriciate any feedback or
experience that anyone has.

Cheers,
Jason


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

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



Re: Datetime vs Unixtime

2003-03-12 Thread Paul Chvostek
On Wed, Mar 12, 2003 at 10:25:11PM -0700, Jason Brothers wrote:
 
 I apologize if this topic has been discussed in the past.  I am just looking
 for feedback whether to use Datetime or Unixtime  (32 bit Int) for my
 timestamps.  From what I can tell here are the advantages and disavantages
 of each method:
...
 At the moment I am on the fence and would appriciate any feedback or
 experience that anyone has.

The issues you mentioned are:

- processor time -- I think this one's spurious,
- storage space (4 bytes vs 8 bytes) -- shouldn't matter except in cases
  where you're storing really really large numbers of records (we're
  only talking about a 4KB difference on a thousand records),
- compatibility with 3rd party tools -- which isn't a big issue, since
  strftime or equiv. is built into most programming languages
- user confusion -- shouldn't be an issue, since raw database *should*
  be hidden from users anyway.

I think the more important issues are:

- portability -- code using unixtime is less likely to rely on MySQL's
  date functions, and more easily ported to PostgreSQL, Foxbase, etc.
- ease of programming -- if *you* understand unixtimes, it may be faster
  to use them than refer to various MySQL date manipulation functions in
  the documentation,

Personally, I use both, depending on the requirements of the project.
If I know I'm never going to use anything but MySQL, I'll use datetime.
If I'm dealing with more than a few million records, I use unixtime.
Heck, I sometimes even store IP addresses in unsigned INTs.  It all
depends on the requirements of the project.

-- 
  Paul Chvostek [EMAIL PROTECTED]
  Operations / Abuse / Whatever
  it.canada, hosting and development   http://www.it.ca/


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

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



probably bug

2003-03-12 Thread Ing.Peter Misovic

You seem to have found a bug in the SQL parser.
Please submit a bug report with the data chunk below:
--BEGIN CUT--
JElkOiBzcWxwYXJzZXIubGliLnBocCx2IDEuMTUgMjAwMi8wNy8yNiAxODozMDo1OSBsZW05IEV4
cCAkPGJyIC8+CldoeSBkaWQgd2UgZ2V0IGhlcmU/IDUgNiAxNDY8YnIgLz4KTGVmdG92ZXI6IOE8
YnIgLz4KQTogNSA2PGJyIC8+ClNRTDogRGF0YWLhemUgcGl6emEgLSBUYWJ1bGthIHNpY2lsaWFu
b190YWdlc19tZW51IG5hIGxvY2FsaG9zdCANCklOU0VSVCBJTlRPIHNpY2lsaWFub19jYXRlZ29y
eV90YWdlc19tZW51IFZBTFVFUyAoMSwgJ0FudGlwYXN0aScsICdLYWx0ZSBWb3JzcGVpc2VuJyk=
---END CUT---  

-- 
S pozdravom,
Ing.Peter Misovic,
Kybernetika s.r.o
Orgovanova 8
Kosice,040 01
ICQ 85285774
http://thailon.at.box.sk/public_key.txt



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

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

2003-03-12 Thread DuSTiN KRySaK
Hi there - I have a database and I am using mysqlcc to admin the mysql
server.

At anyrate - when I am connected and I am trying to create a new table, and
I get the error:

Could not load Field Types.  Please select the location of the Syntax File
in 'Options-General-Sql Editor' and re-open this dialog.

Any ideas?

I mean the file that is supposed to be there /home/user/syntax.txt is
missing - so how do I create this file?


   
  .::d::.

• --- THEbeatingsWILLcontinueUNTILmoraleIMPROVES --- •



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

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