Re: database slow down

2001-11-19 Thread Heikki Tuuri

Hi!

This is a followup to my previous messages indicating database slow down.
After noticing the queries start to slow down earlier i decided to try and
get some debug info. a show table status had one interesting thing.

| raw| InnoDB | Fixed  | 169681 |   1030 |
174817280 |

Sorry this is a known bug in SHOW TABLE STATUS in InnoDB. It estimates the
row count too big if you have big BLOBs in your table.

the 4th column being interesting. It seems to think there are 169,681 rows
but this isn't true. The query operates on about 2000 rows each time then
deletes and commits them so why does it think there are 170K rows? Could
this be a source of the problem. Any suggestions welcome.

No, the estimate has no effect on TRUNCATE TABLE. But if you are running
MySQL-3.23, then TRUNCATE TABLE actually internally is DELETE FROM... and it
should not run any faster than DELETE FROM...

If you need quick emptying in 3.23, use DROP TABLE + CREATE TABLE.

There is no particular query which causes this to happen because the same
batch of queries are happening over and over and over again. So What could
be wrong. It takes about 2 minutes to do a shutdown when its gets like this
and either way I can't afford to restart the database once its implemented.

As a note, a restart of the database sets the row count of raw to 0 so I
really think it is related to this. Most of the queries revolve around this
table so any problems with it are going to cause me big problems.

Any help much appreciated.
Richard

Regards,

Heikki



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

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




Ayez pitié....

2001-11-19 Thread rosalie . fardoux

Bonjour,
Je débute et cherche désespérement à envoyer à partir d'un client MySQL deux 
instructions à ma base. 
Que dois-je utiliser comme séparateur entre ces deux instructions pour les 
lancer en même temps?
Merci d'avance.

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

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




strange behaviour

2001-11-19 Thread behrens

Hello,
started a new compiled MysqlDataBase on my local Machine
everything okay sofar.
added a ./bin/mysqladmin -u root password '' (password omitted)
no problem
I tried it several times to log in to create a database but only getting
this:

behrens@ws8:/home/behrens/behrens_local/mysql-3.23.44.bin  cd
behrens@ws8:/home/behrens  mysqladmin -p create BIBLIOS;
Enter password: *
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'behrens@localhost' (Using password:
YES)'

All permissions on the various files are for behrens, i don`t know
what is wrong,newbie that i am

Best regards and thanks already
janB



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

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: Ayez pitié....

2001-11-19 Thread Jean-Luc Fontaine

[EMAIL PROTECTED] wrote:

Bonjour,
Je débute et cherche désespérement à envoyer à partir d'un client MySQL deux 
instructions à ma base. 
Que dois-je utiliser comme séparateur entre ces deux instructions pour les 
lancer en même temps?

;

Merci d'avance.

De rien.



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

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




Procedure and Funcion

2001-11-19 Thread Manish Mehta

Hello,

I am facing a big problem related to some queries. Is i use store
procedure or function in My SQL.
If yes , Please tells me the syntax.

Thanks

Manish Mehta
E-mail: [EMAIL PROTECTED]




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

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




Re: Inserting Data on top

2001-11-19 Thread Sandeep Murthy

Hi,

thanks for your suggestion but I already have an update query in my code...

Let me repeat the scenario..

I have 4 scroll boxes on my front page corresponding to SEC_ID1,2 3  4
respectively..

 Everytime I feed data thru a backoffice into a db, it updates the existing
first four fields in the database , the data shows up in the front page and
everything works fine.. BUT what happens is it overwrites the existing
data!!

what I am now trying to do is a way to archive the existing data to be
displayed later on another page while Replacing/Updating the first four
fields of the db to show the new data on my frontpage..

I hope I could convey what I need..

Would appreciate any more suggestions...

TIA,
sandeep
- Original Message -
From: jim barchuk [EMAIL PROTECTED]
To: Sandeep Murthy [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, November 17, 2001 3:25 AM
Subject: Re: Inserting Data on top


 Hello Sandeep!

  I am trying to insert data from a form which has 4 fields such that the
data
  always sits at the top in my database occupying locations :
 
  SEC_ID: 1, 2 , 3  4
 
  Everytime i insert data the data gets appended at the end i,e, if  the
first
  4 fields are occupied my data takes the postions 5,6,7  8 but this wont
  do..

 Well, if you have a TABLE that contains x records, and you INSERT y
 records, you now have x + y records. That is the purpose of INSERT and
 fortunately there is no way around that fact. :)

  Can anyone pl help me out with a suitable query to achieve the same??

 Sure! Try UPDATE. You will (as it says in O'Reilly,) 'change actual data
 within a table without altering the table itself.' Meaning you won't be
 adding or deleting any records, simply adjusting existing records.

 Have a :) day!

 jb

 --
 jim barchuk
 [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: mysql++ linker errors with VC++ ver6

2001-11-19 Thread Patrick Sherrill

Any clues on :

LINK : warning LNK4098: defaultlib MSVCRT conflicts with use of other
libs; use /NODEFAULTLIB:library

when attempting to link an MFC program using Mysql++ tweaked for MSVC?

Thanks,

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




How to compare a string with array-elements in a WHERE-clause?

2001-11-19 Thread Dieter Hansen

How to compare a string with array-elements in a WHERE-clause?

Hi!

I do have a string in a table and i do have an array from a muliselect-field out of an 
html-site. The string of the table is one of about 20 possible strings, the array 
could contain no, one or more of these strings.
I have tried this 

MysqlQuery( SELECT * FROM $db_angebotetabelle WHERE (( $multiselect == '') OR 
($db_mytable.TheOneString IN ('$multiselect')) ORDER BY TheOneString )

Which doesn't work ):

Could you help me, please?

Dieter Hansen
[EMAIL PROTECTED]

Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! 
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13



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

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




max size of index file

2001-11-19 Thread takahara

I'm running MySQL 3.23.21 on Windows98.

I initialized a MYISAM table as follows:

create table test1_i
(id char(10) not null primary key,pwd char(17)) raid_type = 1;

If a lot of data are inserted on it, the index file (MYI) cannot exceed 
65536*1024-16 bytes,
and comes to return the error code 136 (HA_ERR_INDEX_FILE_FULL). 

I think that it is the error code that the mi_write function of myisam/
mi_write.c has returned.

Are there any method or patch which change this maximum size by the safe 
method?

 I also think that I will shift to Windows2000 and MySQL4.0.
What max size of an index file in MySQL4.0? 
If the max size of the index is less than 2G and an index size becomes 
more than 2G, how should it be coped with?

Takahara

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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

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: full text search of Mysql support Korean language ?

2001-11-19 Thread Sergei Golubchik

Hi!

Unfortunately, I get too many e-mails to handle help requests
which are sent directly to me.

If you have purchased MySQL support, you may write to
[EMAIL PROTECTED], and will get an answer quickly.  If you
would like to purchase support, please see the Support
section of our web site:

http://www.mysql.com/support/

If you do not want to purchase support, please send e-mail
to the appropriate mailing list.  We host several mailing
lists related to MySQL:

http://www.mysql.com/documentation/lists.html

When you post your question, be sure to follow these hints
about how to ask effective questions:


http://www.mysql.com/documentation/mysql/commented/manual.php?section=Asking_questions

On Nov 19, ±èÅÂÈ£ wrote:
 Dear Sir,
 
 I'm testing Full-text Search of Mysql. 
 I tried to search using SELECT * FROM table where MATCH(description,
 title) AGAINST ('test') in English. The result was very good. 
 
 But I failed to search with full text search in Korean language.
 Please let me know whether full text search support Korean language
 or not. If yes, how can I setting it?
 
 Best regards,
 T. H. Kim

I don't kow about Korean.

The answer is that Full-text search in MySQL for now does NOT support
multi-byte charsets. I'm afraid Korean is one of them :-(

However, making fulltext search suitable for multi-byte charsets is
rather high in our todo (taking into account a number of requests for it :-)

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




mysql_select_db() returns CR_COMMANDS_OUT_OF_SYNC

2001-11-19 Thread Tichawa Anton

Hi all,

I am trying to optimize my database tables at midnight, using winnt, delphi,
and libmysql.dll. I want to execute a sequence like:

mysql_select_db(sql, some_database);
mysql_query(sql, 'OPTIMIZE TABLE MyTable');
mysql_select_db(sql, another_database);// error
mysql_query(sql, 'OPTIMIZE TABLE MyTable');
.
.
.

But the second call to mysql_select_db returns an error (commands out of
sync). Why? After successfull optimization, are there any reasons for not
changing the selected database?

TIA,

Anton Tichawa.



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

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: HANDLER strange behaviour

2001-11-19 Thread Sinisa Milivojevic

Ian Collins writes:
 If you open a table using HANDLER,
  
 e.g, HANDLER MYTABLE OPEN;
  
 then during the course of your application truncate that table, 
  
 e.g, TRUNCATE TABLE MYTABLE;
  
 then you get some really wierd behaviour (my wierd behaviour was the
 application rolling on a free in a completely different part of the
 program).
  
 I hadn't even used a HANDLER READ when it had crashed - just the OPEN.
  
 I guess it's kind of understandable, and not something that happens a lot,
 but it may be worth adding this caveat to the documentation (to save some
 other lost soul hours of screen kicking).
  
 Regards,
 Ian Collins.
 

Thank you for your report.

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


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

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




Re: shutdown still a problem on Darwin

2001-11-19 Thread Michael Widenius


Hi!

 Sinisa == Sinisa Milivojevic [EMAIL PROTECTED] writes:

Sinisa Erik Price writes:
 Sinisa, everyone,
 
 That's great news!  I'm excited to hear that.  Which version would that
 be... 4.0?  Or perhaps another 3.x version?
 
 In the meantime, my boss is going to wonder why I'm not populating a
 database for him.  He will make me use Access if I don't get cracking,
 so... do you know of a working version of MySQL for Darwin 1.4.1 ?
 
 Alternatively, I am open to a workaround until the working version is
 released.  I can actually use MySQL (as far as I know), it's just the
 shutdown that hangs.  I have to use kill -9 in order to kill the
 daemon.  This makes me worry about my data, since this command has the
 potential to cause corruption.  Is there some way that I can preserve
 the data, or protect it from corruption, so that at the end of the day
 when I shut down my laptop I can use kill -9 without fear of damaging
 the contents?

You can do the following unilt 3.23.45 is released (probably by the
end of this week).

Make a short perl program that executes
'FLUSH TABLES WITH READ LOCK'

followed by a kill -9 on the mysqld process.

If you know that no client is connected to mysqld, you can just do:

mysqladmin flush-tables

and then issue the kill -9

cut

 PS: do you advise that I beta-test the upcoming MySQL version?  I would
 be open to this idea, especially if it fixes my problem, but I am
 working in a production environment and so would be best served with as
 stable a release as is available.

We run a lot of test on each MySQL release, and even alpha versions
are usually 'reasonable stable';  Even if many people are already using
4.0 in a production environment we encourage you to test it throughly
in your setup before converting to use this!

Regards,
Monty

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

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




Re: strange behaviour

2001-11-19 Thread Ian Barwick

On Monday 19 November 2001 09:51, you wrote:
 Hello,
 started a new compiled MysqlDataBase on my local Machine
 everything okay sofar.
 added a ./bin/mysqladmin -u root password '' (password omitted)
 no problem
 I tried it several times to log in to create a database but only getting

 this:
 behrens@ws8:/home/behrens/behrens_local/mysql-3.23.44.bin  cd
 behrens@ws8:/home/behrens  mysqladmin -p create BIBLIOS;
 Enter password: *
 mysqladmin: connect to server at 'localhost' failed
 error: 'Access denied for user: 'behrens@localhost' (Using password:

 YES)'

 All permissions on the various files are for behrens, i don`t know
 what is wrong,newbie that i am

 Best regards and thanks already
 janB


You probably haven't created a MySQL user 'behrens'.

Try
  mysqladmin -uroot -p create BIBLIOS;

to connect as the existing root user.

Note: there is no correspondence between MySQL users and local system users.

HTH

-- 
Ian Barwick - Developer - [EMAIL PROTECTED]
akademie.de asp GmbH - http://www.akademie.de

To query tables in a MySQL database is more fun than eating spam

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

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++ linker errors with VC++ ver6

2001-11-19 Thread Sinisa Milivojevic

Patrick Sherrill writes:
 Any clues on :
 
 LINK : warning LNK4098: defaultlib MSVCRT conflicts with use of other
 libs; use /NODEFAULTLIB:library
 
 when attempting to link an MFC program using Mysql++ tweaked for MSVC?
 
 Thanks,
 
 Pat...
 [EMAIL PROTECTED]

Hi!

The latest VC++ version of MySQL++ available from MySQL++ page was
fully tested with all MFC classes and worked just fine.

And you could set the above NODEFAULT...

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


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

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




Privileges question.

2001-11-19 Thread Jarek Jarzebowski


Hi All,

I have some database named DB1 and one table in it named TBL1. In TBL1
there is 3 columns: name, address, id.

There is mysql user named dbuser.

Now, I want to give to 'dbuser' privileges to read ONLY 'name' and
'address' columns from table 'TBL1'.
So, I added record to mysql.user table (with no global privileges) -
thans to thar 'dbuser' is able to connect to MySQL server, and it
works OK. Further I added records to mysql.column_privileges:

mysql insert into columns_priv values('localhost','DB1','dbuser','TBL1','address', 
'', 'Select');

and I assume that now 'dbuser' will be able only to read 'address'
column from 'TBL1' table in 'DB1' database... but it is not true.

When 'dbuser' tries to do command

mysql use DB1;

he got 'Access denied to DB1 for user dbuser@localhost' - the reason
is that there is no record in mysql.db table for database 'DB1' (I
assume). But if I give SELECT privileges to 'DB1' in mysql.db table
'dbuser' is able to read all columns in all tables in database DB1 -
it is obvious.

My question is:
Is there anybody who can tell me what I am doing wrong, or how can I
give privileges to read only several columns from table?

I use MySQL 3.23.33 on Debian Potato Linux.

Best Regards,
-- 
Jarek Jarzebowski


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

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




Re: database slow down

2001-11-19 Thread Richard Clarke

There is definitly something to do with this row count that is causing a
problem. My table uses no blobs.
CREATE TABLE `raw` (
  `cid` int(11) default NULL,
  `agent` char(255) default NULL,
  `referer` char(255) default NULL,
  `addr` char(15) default NULL,
  `via` char(255) default NULL,
  `forward` char(15) default NULL,
  `ctime` datetime default NULL,
  `uniq` int(1) default NULL,
  KEY `age` (`ctime`)
) TYPE=InnoDB

again just now the database slowed down to a crawl and a table status shows
| raw| InnoDB | Fixed  | 178241 |   1027 |
18372 |NULL |  4734976 | 0 |   NULL |
NULL| NULL| NULL   ||
InnoDB free: 3225600 kB |

that again it seems to think is has 180K rows when there can't be more than
2K-5K rows. I tried changing the table truncate to a delete from which
solved nothing. To give you an example of the slowdown. Here is a query
running properly

   CREATE TEMPORARY TABLE `pagehits_tmp` (
   `cid` int(11) default NULL,
   `referer` char(255) default NULL,
   `hits` bigint(21) NOT NULL
default '0',
   `ctime` datetime default NULL,
   index day (ctime,cid,referer)
   ) TYPE=innodb

inserting summary of pagehits into pagehits_tmp -
insert into pagehits_tmp select cid,referer,count(*) as hits,
date_format(ctime,'%Y-%m-%d %H:00:00') as ctime from raw WHERE uniq=1 group
by cid,referer

create sum of old hits + new hits -
create temporary table pagehits_sum select s1.cid as cid,s1.referer as
val,s1.hits+ifnull(s2.hits,0) as hits, s1.ctime from pagehits_tmp as s1 left
join pagehits_hr as s2 on s1.cid=s2.cid AND s1.referer=s2.val

replace new sum's into pagehits_hr -
replace into pagehits_hr (cid,val,hits,ctime) select cid,val,hits,ctime from
pagehits_sum
drop temporary tables

Time taken = 0.858478 secs

... and here is after it starts slowing down

CREATE TEMPORARY TABLE `pagehits_tmp` (
   `cid` int(11) default NULL,
   `referer` char(255) default NULL,
   `hits` bigint(21) NOT NULL
default '0',
   `ctime` datetime default NULL,
   index day (ctime,cid,referer)
   ) TYPE=innodb

inserting summary of pagehits into pagehits_tmp
insert into pagehits_tmp select cid,referer,count(*) as hits,
date_format(ctime,'%Y-%m-%d %H:00:00') as ctime from raw WHERE uniq=1 group
by cid,referer
create sum of old hits + new hits
create temporary table pagehits_sum select s1.cid as cid,s1.referer as
val,s1.hits+ifnull(s2.hits,0) as hits, s1.ctime from pagehits_tmp as s1 left
join pagehits_hr as s2 on s1.cid=s2.cid AND s1.referer=s2.val
replace new sum's into pagehits_hr
replace into pagehits_hr (cid,val,hits,ctime) select cid,val,hits,ctime from
pagehits_sum
drop temporary tables

Time taken = 26.724891 secs (0 rows/sec)


...

Raw contains no more rows than before and pagehits_hr contains at most 20K
rows.

Any ideas would be really welcome. Maybe I should change the delete from to
a drop and create.

Rich


- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 8:10 AM
Subject: Re: database slow down


 Hi!

 This is a followup to my previous messages indicating database slow down.
 After noticing the queries start to slow down earlier i decided to try
and
 get some debug info. a show table status had one interesting thing.
 
 | raw| InnoDB | Fixed  | 169681 |   1030 |
 174817280 |

 Sorry this is a known bug in SHOW TABLE STATUS in InnoDB. It estimates the
 row count too big if you have big BLOBs in your table.

 the 4th column being interesting. It seems to think there are 169,681
rows
 but this isn't true. The query operates on about 2000 rows each time then
 deletes and commits them so why does it think there are 170K rows? Could
 this be a source of the problem. Any suggestions welcome.

 No, the estimate has no effect on TRUNCATE TABLE. But if you are running
 MySQL-3.23, then TRUNCATE TABLE actually internally is DELETE FROM... and
it
 should not run any faster than DELETE FROM...

 If you need quick emptying in 3.23, use DROP TABLE + CREATE TABLE.

 There is no particular query which causes this to happen because the same
 batch of queries are happening over and over and over again. So What
could
 be wrong. It takes about 2 minutes to do a shutdown when its gets like
this
 and either way I can't afford to restart the database once its
implemented.
 
 As a note, a restart of the database sets the row count of raw to 0 so I
 really 

RE: Privileges question.

2001-11-19 Thread Carsten H. Pedersen

 Hi All,

cut

 Now, I want to give to 'dbuser' privileges to read ONLY 'name' and
 'address' columns from table 'TBL1'.
 So, I added record to mysql.user table (with no global privileges) -
 thans to thar 'dbuser' is able to connect to MySQL server, and it
 works OK. Further I added records to mysql.column_privileges:

cut

 My question is:
 Is there anybody who can tell me what I am doing wrong, or how can I
 give privileges to read only several columns from table?

cut s'more

Don't mess around with the privilege tables. Use the GRANT
and REVOKE commands instead. You might also want to read
http://www.bitbybit.dk/mysqlfaq/faq.html#ch11_0_0

/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq

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

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




[Solaris 2.7] Problem: MySQL lockup

2001-11-19 Thread Cedric Lebrun

I'm using MySQL 3.23.39 on Sun UltraSparc with Solaris 2.7.
MySQL is started with bin/safe_mysqld
When executing many SELECT in a short time (i.e. near 200 SELECT in 1
second), the mysqld process uses more an more CPU (96%) and seems to be
locked :  requests (SELECT) don't receive answers and are in a waiting
state.
When executing mysqladmin processlist, a thread is on closing state and
another is on opening state. But both work on different tables !
I have tested with MySQL 3.23.44 and problem is the same.


Anybody knows this problem ?



C.L.



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

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




Re: database slow down

2001-11-19 Thread Heikki Tuuri

Richard,

are you sure you do not have open transactions in your system?

How do you update the table raw or insert to it?

Note that also an ordinary SELECT starts a transaction.

The problem could be caused by old versions of rows in table raw. InnoDB
cannot purge them if there is a transaction open which might still see the
old versions.

The table status means that your table is occupying about 183 MB.

If you disconnect your application and wait for a while, does the table raw
shrink to a realistic size because purge is done in the background?

Regards,

Heikki


At 01:55 PM 11/19/01 -, you wrote:
There is definitly something to do with this row count that is causing a
problem. My table uses no blobs.
CREATE TABLE `raw` (
  `cid` int(11) default NULL,
  `agent` char(255) default NULL,
  `referer` char(255) default NULL,
  `addr` char(15) default NULL,
  `via` char(255) default NULL,
  `forward` char(15) default NULL,
  `ctime` datetime default NULL,
  `uniq` int(1) default NULL,
  KEY `age` (`ctime`)
) TYPE=InnoDB

again just now the database slowed down to a crawl and a table status shows
| raw| InnoDB | Fixed  | 178241 |   1027 |
18372 |NULL |  4734976 | 0 |   NULL |
NULL| NULL| NULL   ||
InnoDB free: 3225600 kB |

that again it seems to think is has 180K rows when there can't be more than
2K-5K rows. I tried changing the table truncate to a delete from which
solved nothing. To give you an example of the slowdown. Here is a query
running properly

   CREATE TEMPORARY TABLE `pagehits_tmp` (
   `cid` int(11) default NULL,
   `referer` char(255) default NULL,
   `hits` bigint(21) NOT NULL
default '0',
   `ctime` datetime default NULL,
   index day (ctime,cid,referer)
   ) TYPE=innodb

inserting summary of pagehits into pagehits_tmp -
insert into pagehits_tmp select cid,referer,count(*) as hits,
date_format(ctime,'%Y-%m-%d %H:00:00') as ctime from raw WHERE uniq=1 group
by cid,referer

create sum of old hits + new hits -
create temporary table pagehits_sum select s1.cid as cid,s1.referer as
val,s1.hits+ifnull(s2.hits,0) as hits, s1.ctime from pagehits_tmp as s1 left
join pagehits_hr as s2 on s1.cid=s2.cid AND s1.referer=s2.val

replace new sum's into pagehits_hr -
replace into pagehits_hr (cid,val,hits,ctime) select cid,val,hits,ctime from
pagehits_sum
drop temporary tables

Time taken = 0.858478 secs

... and here is after it starts slowing down

CREATE TEMPORARY TABLE `pagehits_tmp` (
   `cid` int(11) default NULL,
   `referer` char(255) default NULL,
   `hits` bigint(21) NOT NULL
default '0',
   `ctime` datetime default NULL,
   index day (ctime,cid,referer)
   ) TYPE=innodb

inserting summary of pagehits into pagehits_tmp
insert into pagehits_tmp select cid,referer,count(*) as hits,
date_format(ctime,'%Y-%m-%d %H:00:00') as ctime from raw WHERE uniq=1 group
by cid,referer
create sum of old hits + new hits
create temporary table pagehits_sum select s1.cid as cid,s1.referer as
val,s1.hits+ifnull(s2.hits,0) as hits, s1.ctime from pagehits_tmp as s1 left
join pagehits_hr as s2 on s1.cid=s2.cid AND s1.referer=s2.val
replace new sum's into pagehits_hr
replace into pagehits_hr (cid,val,hits,ctime) select cid,val,hits,ctime from
pagehits_sum
drop temporary tables

Time taken = 26.724891 secs (0 rows/sec)


...

Raw contains no more rows than before and pagehits_hr contains at most 20K
rows.

Any ideas would be really welcome. Maybe I should change the delete from to
a drop and create.

Rich


- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 8:10 AM
Subject: Re: database slow down


 Hi!

 This is a followup to my previous messages indicating database slow down.
 After noticing the queries start to slow down earlier i decided to try
and
 get some debug info. a show table status had one interesting thing.
 
 | raw| InnoDB | Fixed  | 169681 |   1030 |
 174817280 |

 Sorry this is a known bug in SHOW TABLE STATUS in InnoDB. It estimates the
 row count too big if you have big BLOBs in your table.

 the 4th column being interesting. It seems to think there are 169,681
rows
 but this isn't true. The query operates on about 2000 rows each time then
 deletes and commits them so why does it think there are 170K rows? Could
 this be a source of the problem. Any suggestions welcome.

 No, the estimate has no effect on TRUNCATE 

How I can make an sql++ file under kdevelop

2001-11-19 Thread Iordache Dorin

Somebody help me!

I have an sqlpluplus file and I want compile and make it . I work with
kdevelop.
I set the following project options:
COMPILER : -I/usr/local/include/mysql -I/usr/local/include/sqlplusint
LINKER: -L/usr/lib/mysql -L/usr/lib/sqlplusint

When I compile that file I don't have any error but when I try to link it I
have many errors.
If I make this file under the distributions file of sql++ directory it works
very well, but not under kdevelop medium.

Thank you.


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

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




how to login to dbases under mysql

2001-11-19 Thread behrens


first a thank to Ian Barwick,his tip saved my day.
But now the next newbie Question! I want to insert  users into the
usertable of the mysql Tables
how do i login?
haven't found an answer sofar.
Does anyone knows where such questions were already answered,
so that i have not to put my  nescience to display :)


solong janB

[EMAIL PROTECTED]
==
a different set of mind


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

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




segfault in mysql client

2001-11-19 Thread Attila Soki

hi,

just for information:

i know the following line is bugous but, if i execute it
in shell then i get a segfault.

mysqldump -uCHANGED -pCHANGED --add-drop-table CHANGED
Acc9200101Users,Acc9200101BonusCollectors,Acc9200101BonusFlow,Acc9200101Bonu
sFlowLogs,Acc9200101CumulativeBonusCollectors,Acc9200101,Acc9200101Invoices,
Invoices,InvoiceItemBonuses,InvoiceItems,InvoicePaymentStatusLog,BonusCollec
tors abr1.sql

the problem occurs because the table names is separated with commas, not
with spaces.
i dont know is this a dangerous bug or not

cheers,

ati

Debian 2.2.19/MySql 3.23.36-log/i386
Debian 2.2.19/MySql 3.23.37-log/i386


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

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




innodb locks

2001-11-19 Thread Beno Attila

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I'm a regular mysql user, and a very newbie to innodb. :)

I would like to use innodb because of its row-level locking feature.
Presently I have to use table locks, and they're causing lots of speed
problems. (I've tried Gemini tables, but mysql always crashed even with
the simplest tests. Innodb seems to be very stable so far.)

I could not find anything in the docs about whether or not the following
can be done:

I have 2 tables, one with data about users, and one with market data.
(This is a game, and users can buy and sell their stuff.)

The market database has the following relevant columns: good, quantity,
price, owner.

When someone buys a particular type of good, I would like to lock those
rows from the table, but since the quantity will change, I don't even want
other users to see these rows until I'm finished. When I lock the entire
table, I can do this. When I use for update, or lock in share mode,
other threads cannot update, but they can still see these rows.

Is there a way to lock ROWS, so they're not VISIBLE until the first thread
is done with them? I would like to be able to use other rows though from
other threads.

At this point, it seems to me that I can only do this by locking the
entire table.

Any suggestions?

Thanks,

Attila

...
Even if you're on the right track, you still get run over if you don't keep
moving.

- ---
Public key: http://civ.hu/attila.asc

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7+TpvDeyfLhmXxQwRAvTkAJ9gsThDTNhJPwwJV2nhraQSmTK+iQCffXbl
AjS3/1Qk9G+TLMll+Nve+aM=
=nQJU
-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




undelete records ?

2001-11-19 Thread Steve Wright


I've had a dig around the mysql website / google  can't find an answer so 
maybe someone here can help...

we've noticed data/records deleted from mysql databases still appear to exist 
in the /var/lib/mysql/database/ files ?

I presume they are flagged for deletion at a later date, if this is true can 
anyone tell me when they are really deleted and if until then they can be 
recovered?

A point in the right direction / website would be great.

Thanks
Steve. 

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

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




RE: Benchmarking

2001-11-19 Thread Venu

Hi, 

 -Original Message-
 From: Rachman M.H [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, November 18, 2001 11:02 PM
 To: [EMAIL PROTECTED]
 Subject: Benchmarking
 
 
 Dear all,
 
 I've been trying benchmark MySQL, SQL Server 7, and M$ Access 97.
 But, SQL Server 7 and M$ Access is won when connected and opening
 recordset using ADO, Even i'm using MyODBC with TCP/IP connections.
 
 If i'm use cursorlocation=serverside with adOpenDynamic, and 
 adLockOptimistic,
 still MyODBC is looses.

Something interesting. When I did a small research on this, 
I got MyODBC as the best result for most of the cases.

Is it possible for you to pass the following info, 
so that we can also cross check:

1. Test scenarios
2. Comparision analysis for various tools/applications
3. MyODBC version and the DLL type (debug/share version)
4. MySQL version

 
 How can i make speed up the connection and opening recordset for MySQL ?

It also depends up on your SELECT query and how the table is structured.
You can find more information on this in the manual ( 5. MySQL 
optimisation).

Regards, venu
-- 
For technical support contracts, go to https://order.mysql.com
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Venu [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/ California, USA
   ___/ 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: undelete records ?

2001-11-19 Thread Andrew Schmidt

the deleted rows will get re-used by inserts.

however,  you can always run OPTIMIZE TABLE XXX  and that will clear the
deleted rows

thanks,

-- Andrew

- Original Message -
From: Steve Wright [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 12:03 PM
Subject: undelete records ?



 I've had a dig around the mysql website / google  can't find an answer so
 maybe someone here can help...

 we've noticed data/records deleted from mysql databases still appear to
exist
 in the /var/lib/mysql/database/ files ?

 I presume they are flagged for deletion at a later date, if this is true
can
 anyone tell me when they are really deleted and if until then they can be
 recovered?

 A point in the right direction / website would be great.

 Thanks
 Steve.

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

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




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

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: Any suggestions on how to improve this SELECT query?

2001-11-19 Thread Benjamin Pflugmann

Hi.

On Fri, Nov 16, 2001 at 01:58:54PM -0700, [EMAIL PROTECTED] wrote:
 
 Hi there,
 
 I'm wondering if someone can help me figure out how the following SELECT can
 be improved.
 
 SELECT count(*)
   FROM mm_ind_intrst mm0 STRAIGHT_JOIN ind
  STRAIGHT_JOIN mm_ind_intrst mm1
  WHERE ind.cust=8 AND ind.mail_list=1
AND ( (mm0.intrst='148' AND mm0.ind=ind.id)
  AND (mm1.intrst='178' AND mm1.ind=ind.id)
   OR ind.email='[EMAIL PROTECTED]' ) ;

First, with the use of STRAIGHT_JOIN you take away most of the
possibilities for optimization which MySQL has. Why do you use it?

The problem is:

 (mm0.intrst='148' AND mm0.ind=ind.id)
 AND (mm1.intrst='178' AND mm1.ind=ind.id)
 OR ind.email='[EMAIL PROTECTED]')

MySQL isn't able to use indexes for OR in the WHERE clause yet and
therefore the additional OR prevents optimal use of indexes.

Aside from that, if ind.email indeed is [EMAIL PROTECTED], the expression
will evalute to true for _any_ mm0 and mm1 row and therefore you will
get COUNT(mm_ind_intrst)^2 rows as a result (579.730*579.730 =
336.086.872.900), which will indeed take quite some time to gather
together.

So I assume, something with your WHERE condition is flawed.

[...]
 The SELECT ran 10 minutes before I finally killed it.  I've read the
 multiple column index, SELECT speed, and EXPLAIN document pages a few times,
 but haven't been able to parse out what needs to be done to fix it.  Below
 are the results from the EXPLAIN for the above SELECT:
 
 +---+---+---
 +-+-+---
 --++-+
 | table | type  | possible_keys   | key | key_len |
 ref | rows   | Extra |
 +---+---+---
 +-+-+---
 --++-+
 | mm0   | index | ind_intrst  | ind_intrst  |   8 |
 NULL| 579730 | Using index |
 | ind   | ref   |
 PRIMARY,email,ind_mainindex,email_cust,mail_list_cust,ind_cust_mail_list_id_
 email | ind_cust_mail_list_id_email |   5 | const,const | 180226 | where
 used; Using index |
 | mm1   | index | ind_intrst  | ind_intrst  |   8 |
 NULL| 579730 | where used; Using index |
 +---+---+---
 +-+-+---
 --++-+
[...]
 Can someone tell me why the first SELECT needs to look at so many more rows
 than the 2nd?  And if there is something that can be done to make it work
 better?
 
 Any suggestions are most appreciated and please let me know if more
 information is needed.

Bye,

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: ??Sourcing in sections of a database create file

2001-11-19 Thread Dibo Chen

Benjamin Pflugmann wrote:
 
 Hi.
 
 On Fri, Nov 09, 2001 at 08:21:34AM -0500, [EMAIL PROTECTED] wrote:
  Years ago I worked on an RDBMS that had a feature to allow execution of
  'sections' of a command file, avoiding others.  I am still ign scanning the
  docs, but have not found anything similar in MySQL.
 
For example, in a database creation table one could enter (in MySQL format)
  the following:
 
mysql  source master_DB_creation(table_a, table_c, consistency_check);
 
  Where the file master_DB_creation file would contain:
  ---
  ?section table_a
  drop table if exists table_a;
  create table table_a
 [...]
  Does anyone know whether this functionality exists in MySQL?

If your 'source ...' is UNIX's source/exec/eval, yes you can write a
script to execute any sections/parts of your databases. In MySQL, you
run it as ...
mysql -h host -u user -ppasswd  your_script


 
 It doesn't exist.
 
 Bye,
 
 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

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

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




help adding /rempoving users

2001-11-19 Thread DIANA CLEVELAND

We had a student setup the MySQL program and had written instructions on how to add 
users.  Somehow those instructions got lost.  I tried a grant command and an insert 
command but neither gave me a line in db that looked like the ones previous.  How do I 
remove those lines to try again?  Also do I need to create a database before the 
insert command or will the insert command create the database as well as the user if 
they don't exist?

I am running version  3.22.32 on AIX 4.3.3.

A line from the  db file looks like: 


| localhost | wolfe\_% | wolfe| Y   | Y   | Y
| Y   | Y   | Y | N  | Y   | Y
| Y  |

with this header:


| Host  | Db   | User | Select_priv | Insert_priv | Update_priv
| Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_
riv | Alter_priv |


 a line from the user file looks like: 

 | N | N  | N   | N  | N  |
| localhost | wolfe| encrypted password here| N   | N   | N
| N   | N   | N | N   | N | N
 | N | N  | N   | N  | N  |

with a header line of :


| Host  | User | Password | Select_priv | Insert_priv | Update_
riv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Pro
ess_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv |


Thank you,

Diana


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

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 speed seems wrong...

2001-11-19 Thread Anthony R. J. Ball


3.23.41 on Solaris

  I have an indexed table of cusips (9 character identifiers)
which I am comparing against a lookup tables of over
1,000,000 securities, also keyed by cusip, both fields are
char(9) fields.

  My query is taking over 3 seconds, which may be the best I
can do, but I'm hoping I am missing something. Also, unless
I use STRAIGHT_JOIN, it takes MUCH longer, since the optimizer
is starting with the 1,000,000 record table (which is a MERGE 
table, BTW).

  The explains look like:
mysql explain select lid from TEST_1006199805 AS A,
  pool_lookup.lkup AS L WHERE A.cusip = L.cusip;

+---++---+-+-+-+-+-+
| table | type   | possible_keys | key | key_len | ref | rows| Extra   
||
+---++---+-+-+-+-+-+
| L | ALL| cusip | NULL|NULL | NULL| 1296422 | 
||
| A | eq_ref | PRIMARY   | PRIMARY |   9 | L.cusip |   1 | Using index 
||
+---++---+-+-+-+-+-+

mysql explain select lid from TEST_1006199805 AS A 
  STRAIGHT_JOIN pool_lookup.lkup AS L WHERE A.cusip = L.cusip;

+---+---+---+-+-+-+--+-+
| table | type  | possible_keys | key | key_len | ref | rows | Extra   |
+---+---+---+-+-+-+--+-+
| A | index | PRIMARY   | PRIMARY |   9 | NULL| 1995 | Using index |
| L | ref   | cusip | cusip   |   9 | A.cusip |  768 | |
+---+---+---+-+-+-+--+-+

   I'm not sure what the 768 rows in L is, since all but 4 of the
1995 records in A have matches L... though sometimes there will
be more than one match, but not more than 4 or so...

   Any suggestions on speeding this up?

-- 
 ___  __  ____  _  _  _  _     
/ __)(  )(  )  /__\( \/ )( ___)  ( \( )( ___)(_  _)
\__ \ )(__)(  /(__)\\  /  )__))  (  )__)   )(  
(___/(__)(__)(__)\/  ()()(_)\_)() (__) 
An attacker must vanquish, a defender need only survive.


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

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: Sub Count

2001-11-19 Thread Benjamin Pflugmann

Hi.

On Mon, Nov 12, 2001 at 01:26:01PM -0800, [EMAIL PROTECTED] wrote:
 Howdy,
 
 I'm trying to write a select statement that produces a SUB COUNT of column
 PORT_STATUS where (A) PORT_STATUS = 'up' and (B) PORT_STATUS = 'down'. I'd
 like to do this in one statment with GROUP by LOCATION_T.ADDRESS,
 LOCATION_T.CITY  without altering the outer select. This sort of thing is
 simple to do with PL/SQL. However, this is a mysql database with select
 only. Is it somehow possible to do a sub select into a variable i.e. --
 SELECT COUNT(DISTINCT COLUMN) INTO VARIABLE WHERE COLUMN = 'up'  ?
 
 SELECT LOCATION_T.ADDRESS
  , LOCATION_T.CITY
  , COUNT(DISTINCT
-- COUNT THE NUMBER OF ROUTERS AT EACH LOCATION
  , COUNT(DISTINCT
  -- COUNT TOTAL # OF SLOTS AT EACH LOCATION
  , COUNT(DISTINCT
  -- COUNT TOTAL # OF PORTS AT EACH LOCATION
  , COUNT(DISTINCT
 -- ??  SEPARATE COUNT WHERE HARDWARE_T.PORT_STATUS =
 'up' FOR EACH LOCATION  ??
  , COUNT(DISTINCT
 -- ??  SEPARATE COUNT WHERE HARDWARE_T.PORT_STATUS =
 'down' FOR EACH LOCATION  ??

If I understand you correctly, you want something like

SUM(HARDWARE_T.PORT_STATUS = 'up'),
SUM(HARDWARE_T.PORT_STATUS = 'down')

This is the short from, the (more) correct form is 

SUM( IF(HARDWARE_T.PORT_STATUS = 'up'), 1, 0 ),
SUM( IF(HARDWARE_T.PORT_STATUS = 'down'), 1, 0 )

But since MySQL handles bool values as 1 and 0 one can also use the
first form.

 FROM LOCATION_T, HARDWARE_T
 WHERE LOCATION_T.IP = HARDWARE_T.IP
 GROUP BY LOCATION_T.ADDRESS, LOCATION_T.CITY
[...]

Bye,

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




No curses/termcap library found

2001-11-19 Thread Gabriel Richards

I'm trying to compile MySQL from source, the above subject is the error I
get after ./configure --prefix=/usr/local/mysql

Help is sincerely appreciated!

Gabe

-
Ender Technology
Websites, Database Applications, Hosting
(310) 516-7411
[EMAIL PROTECTED]
http://www.endertechnology.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: help adding /rempoving users

2001-11-19 Thread DIANA CLEVELAND

Please disregard this help request.  I have found the notes I needed to add more 
students.

Thank you,

Diana

 DIANA CLEVELAND [EMAIL PROTECTED] 11/19/01 2:57:05 PM 
We had a student setup the MySQL program and had written instructions on how to add 
users.  Somehow those instructions got lost.  I tried a grant command and an insert 
command but neither gave me a line in db that looked like the ones previous.  How do I 
remove those lines to try again?  Also do I need to create a database before the 
insert command or will the insert command create the database as well as the user if 
they don't exist?

I am running version  3.22.32 on AIX 4.3.3.

A line from the  db file looks like: 


| localhost | wolfe\_% | wolfe| Y   | Y   | Y
| Y   | Y   | Y | N  | Y   | Y
| Y  |

with this header:


| Host  | Db   | User | Select_priv | Insert_priv | Update_priv
| Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_
riv | Alter_priv |


 a line from the user file looks like: 

 | N | N  | N   | N  | N  |
| localhost | wolfe| encrypted password here| N   | N   | N
| N   | N   | N | N   | N | N
 | N | N  | N   | N  | N  |

with a header line of :


| Host  | User | Password | Select_priv | Insert_priv | Update_
riv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Pro
ess_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv |


Thank you,

Diana


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

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: No curses/termcap library found

2001-11-19 Thread Gabriel Richards

Thanks for the quick reply!

Running ldconfig -r | grep curses gives me an error saying option requires
an argument -- r

What is ncurses library and an ld path? If I find / -type f -name termcap
the file is found at /etc/termcap.

Thank you for your help!

Gabe

-Original Message-
From: Colin Faber [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 12:45 PM
To: Gabriel Richards; [EMAIL PROTECTED]
Subject: Re: No curses/termcap library found


Make sure you have an ncurses library installed and is in your ld path

ldconfig -r | grep curses


Gabriel Richards wrote:

 I'm trying to compile MySQL from source, the above subject is the error I
 get after ./configure --prefix=/usr/local/mysql

 Help is sincerely appreciated!

 Gabe

 -
 Ender Technology
 Websites, Database Applications, Hosting
 (310) 516-7411
 [EMAIL PROTECTED]
 http://www.endertechnology.com/

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

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

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

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




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

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




Re: No curses/termcap library found

2001-11-19 Thread Colin Faber

Sorry; you'll have to check your local man page for the syntax to match
your machine.

ncurses - CRT screen handling and optimization package

http://www.gnu.org/software/ncurses/ncurses.html

If this is a solaris machine you can probably find a pre-built package
at sunfreeware.com


Gabriel Richards wrote:
 
 Thanks for the quick reply!
 
 Running ldconfig -r | grep curses gives me an error saying option requires
 an argument -- r
 
 What is ncurses library and an ld path? If I find / -type f -name termcap
 the file is found at /etc/termcap.
 
 Thank you for your help!
 
 Gabe
 
 -Original Message-
 From: Colin Faber [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 12:45 PM
 To: Gabriel Richards; [EMAIL PROTECTED]
 Subject: Re: No curses/termcap library found
 
 Make sure you have an ncurses library installed and is in your ld path
 
 ldconfig -r | grep curses
 
 Gabriel Richards wrote:
 
  I'm trying to compile MySQL from source, the above subject is the error I
  get after ./configure --prefix=/usr/local/mysql
 
  Help is sincerely appreciated!
 
  Gabe
 
  -
  Ender Technology
  Websites, Database Applications, Hosting
  (310) 516-7411
  [EMAIL PROTECTED]
  http://www.endertechnology.com/
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: help adding /rempoving users

2001-11-19 Thread Ken Kinder

Diana, in regard to adding and removing users. What I do is just login to the 
database 'mysql' which holds the actual mysql information:

connect mysql;

Then, you can insert directly into the user table. Do you know enough about 
SQL to understand how the insert statement works? Basically the Y/N fields in 
the user table reflect the access this user will have to certain statements. 
My advice is to look at a row for a user who your student inserted, and copy 
the Y's and N's, thus giving your new user the same permissions.

Don't forget to run mysqladmin reload after you modify the user table.

In regard to creating databases: I'm not sure what you mean. Each database 
should be created using the mysqladmin command:

mysqladmin create database

All of this is well-documented on the mysql web site, mysql.com. I suggest 
you take a look at its chapters on creating users, databases, etc.

On Monday 19 November 2001 12:57 pm, DIANA CLEVELAND wrote:
 We had a student setup the MySQL program and had written instructions on
 how to add users.  Somehow those instructions got lost.  I tried a grant
 command and an insert command but neither gave me a line in db that looked
 like the ones previous.  How do I remove those lines to try again?  Also do
 I need to create a database before the insert command or will the insert
 command create the database as well as the user if they don't exist?

 I am running version  3.22.32 on AIX 4.3.3.

 A line from the  db file looks like:
 | localhost | wolfe\_% | wolfe| Y   | Y   | Y
 | Y   | Y   | Y | N  | Y   | Y
 |
 | Y  |

 with this header:
 | Host  | Db   | User | Select_priv | Insert_priv |
 | Update_priv Delete_priv | Create_priv | Drop_priv | Grant_priv |
 | References_priv | Index_

 riv | Alter_priv |

  a line from the user file looks like:
  | N | N  | N   | N  | N   
  |   |
 |
 | localhost | wolfe| encrypted password here| N   | N  
 | | N
 |
 | N   | N   | N | N   | N |
 | N
 |
  | N | N  | N   | N  | N   
  |   |

 with a header line of :
 | Host  | User | Password | Select_priv | Insert_priv |
 | Update_

 riv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv |
 Pro ess_priv | File_priv | Grant_priv | References_priv | Index_priv |
 Alter_priv |


 Thank you,

 Diana


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

 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: SSL Support

2001-11-19 Thread Benjamin Pflugmann

Hi.

AFAIK, MySQL-Max is MySQL with different configure options (and
therefore different components compiled in by default). The source
tarball you found should contain everything you need to create your
own MySQL-Max binary.

Bye,

Benjamin.



On Wed, Nov 14, 2001 at 01:46:36PM +0200, [EMAIL PROTECTED] wrote:
 Thx Sinisa
 
 Obviously I'm pretty tired today :)
 
 I found MySQL 4.00 tarball, but it was the MySQL-Max I wanted .. 
 There's only a binary rpm which I can't get to work.
 
 I'm running Slackware, so I prefer tarballs.
 
 // Joachim

-- 
[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: dec is treated as a reserved word.

2001-11-19 Thread Carsten H. Pedersen

 Description:
   The name dec does not work as an unqualified name
 when creating tables on inside queries. A syntax error is 
 given.  If
 escaped as `dec`, no error is given.  dec is not on
 the list of reserved words.  Thus this could be
 either a documentation or software bug.

It's a documentation bug. Although not on the list of reserved
words, the manual does say:
---
6.2.1 Numeric Types
... and the keyword DEC is a synonym for DECIMAL. 
---

/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq



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

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: Zip Code proximity search

2001-11-19 Thread Benjamin Pflugmann

Hi.

On Wed, Nov 14, 2001 at 10:02:54AM -0500, [EMAIL PROTECTED] wrote:
 Currently, I am using the following query:
 
 SELECT DISTINCT o.szZipCode FROM tblZips z,tblZips o WHERE
 z.szZipCode=$szZip AND (3956 * (2 *
 ASIN(SQRT(POWER(SIN(((z.dblLat-o.dblLat)*0.017453293)/2),2) +
 COS(z.dblLat*0.017453293) * COS(o.dblLat*0.017453293) *
 POWER(SIN(((z.dblLon-o.dblLon)*0.017453293)/2),2)  $iRadius

Well, the main problem is probably not the complexity of the
expression, but rather the expression itself. MySQL cannot use
indexes, when the columns are within expressions.  

 where $iRadius is the Radius of search
 and $szZip is the zip code (char)
 
 This runs rather slowly over the 76 thousand zip codes in the US.
 
 Here are my three solutions:
 
 1) Use a subquery (not an option on 3.23)

I don't see how that could speed up the query? Could you give an
example?

 2) Compute the max/min latitude/longitude and then query on that range
 (proximity becomes a square, but that's not a big deal)

I would take that, rewrite it to a form where MySQL can use indexes
(i.e. o.dblLat between x and y) and keep the calculation above behind
an AND.

So the query can use index to restrict the matching rows to that
square and only calculate the complicated expression for all remaining
zip codes. That should give a nice performace boost.

 3) Since I am using only 3 radius (10,25,50), compute for those three
 ranges over the entire table and make a new table (I guess around 1.5
 million records will be created, so around 350 MB of space)

You could reduce that to the 50 miles radius and use that condition to
reduces the matching rows with an index and afterwards compute the
complicated expression again.

Bye,

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




Removing all escape Characters?

2001-11-19 Thread berndt

Hi,

I am currently trying to hack some coldfusion code into submission, and
success grows closer and closer by the minute.  But what would make my life
INFINITELY easier would be to be able to disable all escape characters in
varchars and other similar column types.  Basically I am porting from a
Microsoft sql server environment over to mysql and i deal with alot of \'s.
 I'm processing it all with coldfusion and i can't find a good coldfusion
function like there was in php to make all the inserts safe (i dont
remember the function name, but it automatically \\'d the \'s etc.).  So I
need either
1. a flag that i have yet to find to turn off escape characters completely
2. a coldfusion function to make the sql statements safe.

Thanks 

David Berndt


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

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 clients hang on error (4.0, Tru64 precompiled)

2001-11-19 Thread mkc

Description:
The mysql clients hang on a server error with mysql 4.0 (Tru64
precompiled).  I can see with truss that the client is receiving an
error message from the server, but it doesn't react.
How-To-Repeat:
$ mysqlshow mysql notable
Fix:
?

Submitter-Id:  submitter ID
Originator:Mike Coleman
Organization:
MySQL support: none
Synopsis:  mysql clients hang on error (4.0, Tru64 precompiled)
Severity:  critical
Priority:  high
Category:  mysql
Class: sw-bug
Release:   mysql-4.0.0-alpha (Official MySQL binary)
Server: /usr/local/mysql/bin/mysqladmin  Ver 8.22 Distrib 4.0.0-alpha, for dec-osf5.1 
on alphaev6
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.0-alpha
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 2 days 5 hours 18 min 7 sec

Threads: 2  Questions: 221  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 
6  Queries per second avg: 0.001
Environment:
Tru64 Unix 5.1 (gs80)
System: OSF1 gskc01.stowers-institute.org V5.1 732 alpha
Machine: alpha
Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/alphaev67-dec-osf5.1/3.0.2/specs
Configured with: ../gcc-3.0.2/configure --host=alphaev67-dec-osf5.1
Thread model: single
gcc version 3.0.2
Compilation info: CC='cc -pthread'  CFLAGS='-O4 -ansi_alias -ansi_args -fast -inline 
speed -speculate all'  CXX='cxx -pthread'  CXXFLAGS='-O4 -ansi_alias -fast -inline 
speed -speculate all -noexceptions -nortti'  LDFLAGS=''
LIBC: 
lrwxrwxrwx   1 root system17 Jul 17 18:40 /lib/libc.a - ../ccs/lib/libc.a
lrwxrwxrwx   1 root system17 Jul 17 18:40 /usr/lib/libc.a - 
../ccs/lib/libc.a
Configure command: ./configure  --prefix=/usr/local/mysql '--with-comment=Official 
MySQL binary' --with-extra-charsets=complex --with-server-suffix= 
--enable-thread-safe-client --with-prefix=/usr/local/mysql 
--with-mysqld-ldflags=-all-static --disable-shared '--with-named-thread-libs=-lpthread 
-lmach -lexc -lc' --disable-shared

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

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




Removing all escape Characters?

2001-11-19 Thread Christopher Book

2. a coldfusion function to make the sql statements safe. 

You only have to escape like 3 characters.  ', , and \.  You could just
do 3 string replacements or create your own function to perform 3 string
replacements.
Chris


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

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




Re: Removing all escape Characters?

2001-11-19 Thread berndt

Problem with this unfortunately though is that i have probably 100+ sql
queries spread over several hundred cfm pages to find and change. Plus if i
ever want to go back to ms sql i have to switch them all back again.

Dave

At 05:07 PM 11/19/2001 -0500, you wrote:
2. a coldfusion function to make the sql statements safe. 

You only have to escape like 3 characters.  ', , and \.  You could just
do 3 string replacements or create your own function to perform 3 string
replacements.
Chris


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

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




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

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: downloading manual

2001-11-19 Thread Benjamin Pflugmann

Hi.

Is there a problem with the ones on
http://www.mysql.com/documentation/mysql/alternate.html ?

You are a bit unspecific regarding where from you try to download.

Alternatively try downloading a binary distribution (which will also
contain the manual).

Bye,

Benjamin.

On Sat, Nov 17, 2001 at 06:28:56PM -0800, [EMAIL PROTECTED] wrote:
 Is there a way to download the latest MySQL manual? The only manual I am
 able to
 download appears to be an outdated version.


-- 
[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: Removing all escape Characters?

2001-11-19 Thread Ken Kinder

So, then even if you make a quote function that's too much work?

On Monday 19 November 2001 03:21 pm, berndt wrote:
 Problem with this unfortunately though is that i have probably 100+ sql
 queries spread over several hundred cfm pages to find and change. Plus if i
 ever want to go back to ms sql i have to switch them all back again.

 Dave

 At 05:07 PM 11/19/2001 -0500, you wrote:
 2. a coldfusion function to make the sql statements safe.
 
 You only have to escape like 3 characters.  ', , and \.  You could
  just do 3 string replacements or create your own function to perform 3
  string replacements.
 Chris
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
  [EMAIL PROTECTED] Trouble
  unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

 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: Query speed seems wrong...

2001-11-19 Thread Jeremy Zawodny

On Mon, Nov 19, 2001 at 03:29:26PM -0500, Anthony R. J. Ball wrote:
 
 3.23.41 on Solaris
 
   I have an indexed table of cusips (9 character identifiers)
 which I am comparing against a lookup tables of over
 1,000,000 securities, also keyed by cusip, both fields are
 char(9) fields.

How large is your key buffer?

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

MySQL 3.23.41-max: up 74 days, processed 1,610,499,363 queries (249/sec. avg)

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

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




Query problem

2001-11-19 Thread Auri Net SAC

Hi
please help me, 
i have a query and in the where clause i want to compare dates,
 for example in asp i used
select * from table where col_date1 = now and col_date2 = now

what is the similar using mysql

thanks for your answers




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

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




Nusphere is spamming me

2001-11-19 Thread Michael A. Peters

This e-mail address is brand new.

I used it to subscribe to the MySQL list.
I sent one e-mail to the MySQL list.
I used it to send two e-mails to my web hosting provider.
I used it to send one e-mail to [EMAIL PROTECTED]

That's it! No others yet.

I know my web hosting provider did not sell my e-mail address to nusphere.
I know that php.net did not.

They got my brand spanking new e-mail address of of the one post I made to
this list.
I'm sure that is a violation, it is with most mail lists.

If you use MySQL I respectfully ask to to avoid NuSphere.
Do not support spammers.

This really ticks me off, I mean really ticks me off big time.
Have they no shame?

If someone at mysql.com would like the e-mail they spammed me with for
further investigation, I would be happy to provide it.

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

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




Re: Query problem

2001-11-19 Thread jim barchuk

Hello!

 i have a query and in the where clause i want to compare dates,
  for example in asp i used
 select * from table where col_date1 = now and col_date2 = now

 what is the similar using mysql

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

Look up 'date'.

See especially Date and Time Types, Date and Time Functions, and Date
Calculations.

Have a :) day!

jb

-- 
jim barchuk
[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: Nusphere is spamming me

2001-11-19 Thread Ken Kinder

I can confirm that NuSphere subscribes to mailing lists and spams its 
posters, as this has happened to me too, under similar circumstances. Perhaps 
the admins of this list should remove NuSphere.

On Monday 19 November 2001 04:55 pm, Michael A. Peters wrote:
 This e-mail address is brand new.

 I used it to subscribe to the MySQL list.
 I sent one e-mail to the MySQL list.
 I used it to send two e-mails to my web hosting provider.
 I used it to send one e-mail to [EMAIL PROTECTED]

 That's it! No others yet.

 I know my web hosting provider did not sell my e-mail address to nusphere.
 I know that php.net did not.

 They got my brand spanking new e-mail address of of the one post I made to
 this list.
 I'm sure that is a violation, it is with most mail lists.

 If you use MySQL I respectfully ask to to avoid NuSphere.
 Do not support spammers.

 This really ticks me off, I mean really ticks me off big time.
 Have they no shame?

 If someone at mysql.com would like the e-mail they spammed me with for
 further investigation, I would be happy to provide it.

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

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

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

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: Nusphere is spamming me

2001-11-19 Thread Jeremy Zawodny

On Mon, Nov 19, 2001 at 03:55:48PM -0800, Michael A. Peters wrote:

 If you use MySQL I respectfully ask to to avoid NuSphere.  Do not
 support spammers.
 
 This really ticks me off, I mean really ticks me off big time.  Have
 they no shame?

I suspect they're getting desperate.  Maybe their parent company
wants to see more of a return on their investment--not that spamming
will help in the long term if it just pisses people off.

 If someone at mysql.com would like the e-mail they spammed me with
 for further investigation, I would be happy to provide it.

It'd be interesting to know if A LOT of people have had this happen.
If so, maybe we should apply some social pressure and see if they're
see the error of their ways.

Thoughts?

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

MySQL 3.23.41-max: up 74 days, processed 1,613,533,564 queries (249/sec. avg)

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

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




Re: question!!!

2001-11-19 Thread Arjen G. Lentz

Hi,

- Original Message -
From: Webmaster [EMAIL PROTECTED]


 I have Mysql,Php and apache webserver running on Freebsd 4.3 RELEASE, I
 need to connect via Web to an application done in php but that requests me
 user and password.

You may wish to be more specific about exactly what you are trying to do,
posting relevant PHP code and the error message you get. Most likely you have
not set up your permissions in the MySQL server yet, but it's a bit hard to
tell with so little info!



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

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




compile failed on raq2 (MIPS Linux)

2001-11-19 Thread Paul Schreiber

Machine info:
---
-
$ uname -a
Linux www 2.0.34 #1 Thu Feb 25 21:04:19 PST 1999 mips unknown

$ gcc -v
Reading specs from /usr/lib/gcc-lib/mipsel-redhat-linux/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)


Configure command:
---
-
./configure --with-low-memory --disable-assembler --disable-shared \
--with-mysqld-ldflags=-all-static 
--with-client-ldflags=-all-static \
mipsel-unknown-linux-gnu

The error:
---
-
In file included from mini_client.cc:43:
../include/global.h:680: warning: abstract declarator used as declaration
mini_client.cc: In function `int mc_sock_connect(int, const struct 
sockaddr *, unsigned int, unsigned int)':
mini_client.cc:318: warning: passing `int *' as argument 5 of 
`getsockopt(int, int, int, void *, unsigned int *)' changes signedness
mini_client.cc: In function `struct st_mysql * mc_mysql_connect(struct 
st_mysql *, const char *, const char *, const char *, const char *, 
unsigned int, const char *, unsigned int)':
mini_client.cc:623: passing `int *' as argument 5 of 
`gethostbyname_r(const char *, hostent *, char *, unsigned int, hostent 
**, int *)'
make[3]: *** [mini_client.o] Error 1
make[3]: Leaving directory 
`/home/sites/home/users/admin/mysql-3.23.44/sql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/home/sites/home/users/admin/mysql-3.23.44/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sites/home/users/admin/mysql-3.23.44'
make: *** [all-recursive-am] Error 2


What's going on / how do I fix this?


Paul

 shad 96c / uw cs 2001 / mac activist / eda / fumbler
fan of / jewel / sophie b. / sarah slean / steve poltz / emm gryner /
   / x-files / buffy / dawson's creek / habs / bills / 49ers /
 
 t h i n k  d i f f e r e n t.

Craziness that is you! -- JS


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

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: dec is treated as a reserved word.

2001-11-19 Thread Arjen G. Lentz

Hi Carsten, Tom,

- Original Message -
From: Carsten H. Pedersen [EMAIL PROTECTED]
To: Tom McGlynn [EMAIL PROTECTED]


  Description:
  The name dec does not work as an unqualified name
  when creating tables on inside queries. A syntax error
  is given.  If escaped as `dec`, no error is given.  dec is
  not on the list of reserved words.  Thus this could be
  either a documentation or software bug.
 It's a documentation bug. Although not on the list of reserved
 words, the manual does say:
 ---
 6.2.1 Numeric Types
 ... and the keyword DEC is a synonym for DECIMAL.
 ---

Yea.
We use a script to grab the reserved words from the source; it's not a
straightforward dump of all symbols since many are in fact allowed. Based on
your info I checked the script and made some changes: 2 keywords and all 15
synonyms had been missing. DEC was one of the synonyms, of course. The online
manual should reflect this change soon.
So, thanks for the feedback!


Regards,
Arjen.

--
MySQL Training Worldwide, http://www.mysql.com/training/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Arjen G. Lentz [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Technical Writer
/_/  /_/\_, /___/\___\_\___/   Brisbane, QLD Australia
   ___/   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: does MySql support Procedures, Events and Sequences

2001-11-19 Thread Omkar

Hi,

I am developing an application which shows Meta Data of the MySql database
in Tree Structure.
In this i am displaying nodes like Tables and its childs are Tables in the
database, Indexes and its child nodes are indexes on all tables etc.
I am confused weather MySql support Procedures, Events and Sequences. If
there is a support i can also include these nodes in my Tree.
Please respond to this as it is high priority for me.

Thanks  Regards,
Omkaram Sangem
iNuCom (India) Ltd
Secunderabad:53
Phones:+91-40-7893817/7812959
Fax:+91-40-7809071
Email: [EMAIL PROTECTED]
www.inucom.com

  Quality is Everything 



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

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




how to repair myisam file .?

2001-11-19 Thread JunSeon Oh

mysql select * from abc1212 ;
ERROR 1033: Incorrect information in file: './webbbs/abc1212.frm'

mysql optimize table abc1212 ;
++--+--+---+
| Table  | Op   | Msg_type | Msg_text  
||
++--+--+---+
| webbbs.abc1212 | optimize | error| Incorrect information in file: 
|'./webbbs/abc1212.frm' |
++--+--+---+

mysql \q

cream# cd /var/db/mysql/webbbs
cream# myisamchk abc1212
myisamchk: error: 'abc1212' doesn't have a correct index definition. You need to 
recreate it before you can do a repair
cream# myisamchk -o abc1212
myisamchk: error: 'abc1212' doesn't have a correct index definition. You need to 
recreate it before you can do a repair
cream# myisamchk -r abc1212
myisamchk: error: 'abc1212' doesn't have a correct index definition. You need to 
recreate it before you can do a repair


what can i do .?

please reply to us.


-
Software Development Team / Manager / JunSeon Oh
Email : [EMAIL PROTECTED]
Internet total solutions - holynet  (http://www.holywar.net)
-


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

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




Exporting Data

2001-11-19 Thread Mike(mickalo)Blezien

Hello,

Sorry about the OT, but I need to export data from various MySQL tables and
import into Excell spread sheets. Was hoping someone could suggest the best
format, TAB, CSV..etc delimited, which is the preferred format?

thanks,

mysql database

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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

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




problem in SQL

2001-11-19 Thread Manish Mehta

Hello,

I have a problem related SQL Query

SELECT a.cAction_Name,a.nAction_ID  FROM tbl_actionmaster a  LEFT  JOIN
tbl_roleactionrelation b ON  a.nAction_ID != b.nAction_ID
WHERE b.nRole_ID = 3
group by a.cAction_Name

In this query i wants to find Action name and Action Id from the Action
Master table.
As comparing with RoleActionReation table (field - nAction_ID , nRole_ID )

I need those Action Name which are not mapped with the Role Name .

This Query shows me those field also which are already mapped.

Thanks

Manish Mehta
E-mail: [EMAIL PROTECTED]




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

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




Error List

2001-11-19 Thread Manish Mehta

hello 

I wants to Know of web site where's i found the list of errors mysql have.

thanks

Manish Mehta
E-mail: [EMAIL PROTECTED]




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

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




Some amazing query numbers from MySQL 4.0

2001-11-19 Thread Craig Vincet

Just wanted to gloat about how much I love the new 4.0 version =)

===
Server version: 4.0.0-alpha-log
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/tmp/mysql.sock
Uptime: 9 days 12 hours 19 min 55 sec

Threads: 408  Questions: 183163443  Slow queries: 4009  Opens: 43522  Flush
tables: 1  Open tables: 239  Queries per second avg: 222.828
===

This is running on a dual 1K cpu with a gig of ram (2.4.14 Linux kernel).
The beauty is that even with these numbers MySQL isn't coughing/crashing or
corrupting any data.  I've actually gone as high as 250 QPS and still not
seen any slowdowns or problems with MySQL.  3.23 seemed to have some
problems handling such a load with this system configuration4.0 was a
major blessing to me.

Excellent work to the MySQL dev team =)

Sincerely,

Craig Vincent


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

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