phpMyAdmin

2002-08-21 Thread Steve Jackson

Is it possible to use phpMyAdmin to add new databases (not tables whole
databases) to my website? I ask because currently my host has provided
me with one database and I don't want to mix database tables when adding
new features (such as shopping carts and bulletin boards)? I am new to
MySQL and PHP so would like some advice, is the way I describe
(databases for each website function) a good way to design or should I
have all my functions in one large database?

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159




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

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




Utility for importing Paradox tables to MYSQL

2002-08-21 Thread Nick Lazidis

Hi,

I used DbTools as Crecio O. Silva mentioned in his mail and I managed to
import Paradox tables to MySQL successfully..
There is still a problem with the imported data which are not imported
correctly because of the Greek chars that appear in the string fields.

Could anyone have a clue how we can overcome the problem

Thanks a lot !

Nikos



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

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

2002-08-21 Thread OZGUR GENC

Hi All,
I am very new with mysql. I have just installed it to Sun OS but there
is a message  ERROR 2002: Can't connect to local MySql server thought
'/tmp/mysql.sock' (2). 
Does anyone have knowledge about problem and help me?
Regards,


***
Bu elektronik posta ve onunla iletilen btn dosyalar sadece gndericisi tarafndan 
almas amalanan yetkili gerek ya da tzel kiinin kullanm iindir.Eer sz konusu 
yetkili alc deilseniz bu elektronik postann ieriini aklamanz,kopyalamanz, 
ynlendirmeniz ve kullanmanz kesinlikle yasaktr ve bu elektronik postay derhal 
silmeniz gerekmektedir
TURKCELL bu mesajn ierdii bilgilerin doruluu veya eksiksiz olduu konusunda 
herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne ekilde olursa olsun 
ieriinden, iletilmesinden, alnmasndan ve saklanmasndan sorumlu deildir. Bu 
mesajdaki grler yalnzca gnderen kiiye aittir ve TURKCELL'in grlerini 
yanstmayabilir
Bu e-posta bilinen btn bilgisayar virslerine kar taranmtr.
***
This e-mail and any files transmitted with it are confidential and intended solely for 
the use of the individual or entity to whom they are addressed. If you are not the 
intended recipient you are hereby notified that any dissemination, forwarding, copying 
or use of any of the information is strictly prohibited, and the e-mail should 
immediately be deleted.
TURKCELL makes no warranty as to the accuracy or completeness of any information 
contained in this message and hereby excludes any liability of any kind for the 
information contained therein or for the information transmission, reception, storage 
or use of such in any way whatsoever.The opinions expressed in this message belong to 
sender alone and may not necessarily reflect the opinions of TURKCELL.
This e-mail has been scanned for all known computer viruses.
***

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

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: Constraint Hell

2002-08-21 Thread Dr. Frank Ullrich

Jim,

Jim Bailey schrieb:
 
 sql, Query
 Hark ye experts!
 
 Here I stand an expert grunt.
 Trying to understand,
 The syntax of constraint.
 
 I was directed to the constraint doc.
 And found the constraint doc doth suck.
 
 Here's my ploy, renewed, refined.
 Please see if you can help.
 
 To create my Foreign table I used the following script
 
 CREATE TABLE IIM_InventoryItemMaster(
 IIM_InventoryItemMaster_ID MEDIUMINT(8) NOT NULL,
 IIM_ItemNm VARCHAR(64),
 IIM_ItemDescCD VARCHAR(1) DEFAULT 'U',
 IIM_GenderCD VARCHAR(1),
 IIM_ItemPN VARCHAR(36),
 IIM_Spec1Nm VARCHAR(48),
 IIM_Spec2Nm VARCHAR(48),
 IIM_RecordCreatedBY VARCHAR(24),
 IIM_RecordCreatedDT DATETIME,
 IIM_LastEditBY VARCHAR(24),
 IIM_LastEditDT DATETIME,
 PRIMARY KEY(IIM_InventoryItemMaster_ID),
 KEY(IIM_GenderCD),
 KEY(IIM_ITEMNm),
 KEY(IIM_ItemDescCD),
 key(IIM_ItemPN)
 )
 Type = INNoDB;


Shouldn't this be TYPE=InnoDB?
I'm afraid that case matters here!

Regards,
   Frank.

 
 Then SHOW CREATE TABLE Told  me the table type
 is MyISAM. Don't I need InnoDB to use Constraints?
 
 Does INNoDB cause it woe?
 ===
 Now for some clear and Poignant questions about MySQL hell?
 ===
 From the following URL:http://www.mysql.com/doc/en/CREATE_TABLE.html
 I found Constraint docs
 ===
 [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...)
 [reference_definition: REFERENCES tbl_name [(index_col_name,...)] [MATCH
 FULL | MATCH PARTIAL] [ON DELETE reference_option] [ON UPDATE
 reference_option]
 ===
 
 Question I.
 If there is a Foreign Key in a Foreign Table, then there must be a Native
 key in a Native Table.
 What is the correct technical name of the {Native} Field?
 
 Question II
 I understand CONSTRAINT symbol to be the name of the constraint.
 true or false?
 
 Then there is FOREIGN KEY [index_name]
 What Index_name, The name of the Foreign Key field's Index
 (located in the Foreign Table?)
 So this is the name of an index in the Foreign Table?
 
 Question III.
 Then comes (index_col_name,...)
 I guess this means the name of the Foreign Key Field(s)?
 true or false;
 
 Question IV.
 Next comes REFERENCES tbl_name. [(index_col_name,...)]
 The name of the Native Table or he Fireign Table?
 [(index_col_name)], This must mean the name of the Foreign Key Field(s)
 AGAIN?
 true or false
 
 Question V.
 I suppose I should include the Constraint syntax in the SQL that creates the
 Native Table and not in the SQL that creats the Foreign Table?
 True or false?
 
 Thanks for your help
 Jim Bailey
 
 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 
Dr. Frank Ullrich, Netzwerkadministration 
Heise Zeitschriften Verlag GmbH  Co KG, Helstorfer Str. 7, D-30625
Hannover
E-Mail: [EMAIL PROTECTED]
Phone: +49 511 5352 587; FAX: +49 511 5352 538

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

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

2002-08-21 Thread OZGUR GENC


 Hi All,
 I am very new with mysql. I have just installed it to Sun OS but there
 is a message  ERROR 2002: Can't connect to local MySql server thought
 '/tmp/mysql.sock' (2). 
 Does anyone have knowledge about problem and help me?
 Regards,


***
Bu elektronik posta ve onunla iletilen btn dosyalar sadece gndericisi tarafndan 
almas amalanan yetkili gerek ya da tzel kiinin kullanm iindir.Eer sz konusu 
yetkili alc deilseniz bu elektronik postann ieriini aklamanz,kopyalamanz, 
ynlendirmeniz ve kullanmanz kesinlikle yasaktr ve bu elektronik postay derhal 
silmeniz gerekmektedir
TURKCELL bu mesajn ierdii bilgilerin doruluu veya eksiksiz olduu konusunda 
herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne ekilde olursa olsun 
ieriinden, iletilmesinden, alnmasndan ve saklanmasndan sorumlu deildir. Bu 
mesajdaki grler yalnzca gnderen kiiye aittir ve TURKCELL'in grlerini 
yanstmayabilir
Bu e-posta bilinen btn bilgisayar virslerine kar taranmtr.
***
This e-mail and any files transmitted with it are confidential and intended solely for 
the use of the individual or entity to whom they are addressed. If you are not the 
intended recipient you are hereby notified that any dissemination, forwarding, copying 
or use of any of the information is strictly prohibited, and the e-mail should 
immediately be deleted.
TURKCELL makes no warranty as to the accuracy or completeness of any information 
contained in this message and hereby excludes any liability of any kind for the 
information contained therein or for the information transmission, reception, storage 
or use of such in any way whatsoever.The opinions expressed in this message belong to 
sender alone and may not necessarily reflect the opinions of TURKCELL.
This e-mail has been scanned for all known computer viruses.
***

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

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 tutorials, users passwords, interface.

2002-08-21 Thread Frank Shute

On Wed, Aug 21, 2002 at 03:59:20AM +0100, Donna Robinson wrote:

 Filter fodder: query, sql
 
 On Wednesday 21 August 2002 3:03 am, Nathaniel Mallet wrote:
  I haven't read Managing and Using MySQL, but I do own (and read cover to
  cover) MySQL and mSQL. While it's not a bad book, it's definitely not
  for anyone wanting to do anything serious. It's about 460 pages that
  covers *two* databases, plus references for half a dozen APIs, which
  means they skim most topics.
 
 Yo,
 
 okay - but if you recall Gavin said I am just starting out - and that's why 
 I recommended these books :-)  and I think they are pretty good jumping-off 
 points.
 Besides which, I don't think I agree about the serious bit - all beginners 
 have to start somewhere. ( 'course, I was mad fool enough to jump in with 
 just the online manual to hand ...)

I'd agree with the sentiment that it's not for those wishing to do
anything `serious' as the important topics of relational database
design  implementation are rather skimmed over eg. normalisation,
concurrency  such like. Hence I see a lot of posts to this list where
people have huge non-normalised tables with their resulting problems.

SQL itself and it's particular implementation is the easy bit, it's
the design that's the hard bit but it seems to be frequently ignored.

-- 

 Frank 

*-*-*-*-*-*-*-*-*-*-*
   Boroughbridge.
 -
PGP keyID: 0xC0B341A3
*-*-*-*-*-*-*-*-*-*-*

http://www.esperance-linux.co.uk/

If I had to quantify Iraq's threat, I would say (it is) zero.
 --
Scott Ritter, former UN weapons inspector.

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

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 and Access Control

2002-08-21 Thread Juri Nysschen

Hi

I have a problem with privileges on MySql NT 3.23.52. I hope that someone
can provide me with a solution.

If a user has USAGE privileges on the mysql db (*.*), and ALL privileges on
another db (CUSTOMDB) in the system, that user can't login nor can they
access the CUSTOMDB. The error reported is: you have no access to database
CUSTOMDB. Yet, according to the documentation, this user setup is valid.

The Sql Statements are:
GRANT USAGE  on *.* to newuser identified by password 'mypassword'
GRANT ALL on CUSTOMDB to newuser
FLUSH PRIVILIGES

SHOW GRANTS for newuser
Returns:
GRANT USAGE ON *.* TO ' newuser'@'%'
GRANT ALL PRIVILIGES ON CUSTOMDB.* TO ' newuser'@'%'

The purpose of this user setup is to prevent access to the mysql.user table,
should the login be compromised.

Juri Nysschen

The Digital Message Network (Pty) Ltd
Tel. +27.(0)11.4750300
Fax. +27.(0)11.4056300
Http://www.dmnet.co.za




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

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




Another 'Too many connections' question...

2002-08-21 Thread Tom Norwood

A couple of weeks ago I came across this error which effectively closed down
our site.

Two things:
(1) I am using Perl DBI to interface mySQL is there any way to effectively
capture such errors and provide an alternate web page?  I guess there has to
be, but I experimented with the 'PrintError' and 'RaiseError' with little
joy.

(2) At present our MySQL needs are provided by our ISP by means of a shared
server (dedicated to MySQL I think!).  The 'max_connections' variable (SHOW
VARIABLES) is currently set to 300, which seems a bit on low side for a
server with 770 databases (SHOW DATABASES) with I don't know how many
tables.
What causes this error, 'any' connection, admin type connections, etc.?
And does this error require a server/mysqld restart on the part of our ISP?
They were typically unhelpful when I spoke to them (hope that's not due to
ignorance.)

Have been looking at dedicated hosting for a while now, but finding the cash
and moreover the time to move is proving a slow process.

Any help gratefully Rx'd,
Tom.


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

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 problem

2002-08-21 Thread B.L. Choy

 Description:
 Replication cannot be started
 How-To-Repeat:
 Following the set up instructions in section 4.10 Replication in 
MySQL of the MySQL documentation
 Fix:
 Not known

 Submitter-Id:
 Originator:B.L. Choy
 Organization:
 MySQL support: none
 Synopsis:
 Related messages in hermes1.err file (master - 192.168.60.1):
   Nil
 Grand tables on hermes1 (master - 192.168.60.1):
   --
   -- Dumping data for table 'user'
   --
   INSERT INTO user VALUES 
('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
   INSERT INTO user VALUES 
('hermes1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
   INSERT INTO user VALUES 
('localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
   INSERT INTO user VALUES 
('hermes1','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
   INSERT INTO user VALUES 
('192.168.60.2','repl','','N','N','N','N','N','N','N','N','N','Y','N','N','N','N');
 Related messages in hermes2.err file (slave - 192.168.60.2):
   020821 17:34:47  Slave: connected to master 
'[EMAIL PROTECTED]:3306',  replication started in log 'FIRST' at position 32
   020821 17:34:47  Slave: received 0 length packet from server, 
apparent master shutdown:
   020821 17:34:47  Slave: Failed reading log event, reconnecting 
to retry, log 'FIRST' position 32
   020821 17:34:47  Slave: reconnected to master 
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 32
   020821 17:34:47  Slave: received 0 length packet from server, 
apparent master shutdown:
   ...last 3 lines repeats...
 Related messages using 'mysqladmin processlist' command:
   
++-+---++-+--+--+--+
| Id | User| Host  | db | Command | Time | 
State| Info |
   
++-+---++-+--+--+--+
| 1  | system user | none  || Connect | 10   | Waiting 
to reconnect after a failed read |  |
| 3  | root| localhost || Query   | 
0|  | show processlist |
   
++-+---++-+--+--+--+
 Severity:  critical
 Priority:  high
 Category:  mysql
 Class: sw-bug
 Release:   mysql-3.23.52 (Source distribution)
 Server: /usr/bin/mysqladmin  Ver 8.23 Distrib 3.23.52, for pc-linux-gnu 
on i686
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.52-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /var/run/mysql/mysql.sock
Uptime: 3 min 38 sec

Threads: 1  Questions: 10  Slow queries: 0  Opens: 6  Flush tables: 1  Open 
tables: 0 Queries per second avg: 0.046
 Environment:
 machine, os, target, libraries (multiple lines)
System: Linux hermes2 2.4.18 #1 SMP Mon Jul 8 15:30:39 HKT 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-slackware-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc'  CFLAGS='-O3 
-march=i486'  CXX='gcc'  CXXFLAGS='-O3 -march=i486 -felide-constructors 
-fno-except
ions -fno-rtti'  LDFLAGS=''
LIBC:
lrwxrwxrwx1 root root   13 Jul  8 19:21 /lib/libc.so.6 - 
libc-2.2.5.so
-rwxr-xr-x1 root root  5029105 May 18 11:54 /lib/libc-2.2.5.so
-rw-r--r--1 root root 24991240 May 18 11:53 /usr/lib/libc.a
-rw-r--r--1 root root  178 May 18 11:53 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr --with-mysqld-user=mysql 
--with-unix-socket-path=/var/run/mysql/mysql.sock --l
ocalstatedir=/var/lib/mysql --with-pthread --enable-thread-safe-client 
--enable-assembler --with-raid --with-libwrap --with
out-bench '--with-mysqld-ldflags=-all-static 
-L/tmp/glibc-2.2.5/linuxthreads' --with-charset=latin1 --with-extra-charset=bi
g5,gb2312 --with-berkeley-db --with-innobase 'CFLAGS=-O3 -march=i486' 
'CXXFLAGS=-O3 -march=i486 -felide-constructors -fno-e
xceptions -fno-rtti' CXX=gcc


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

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, 

MySQL hangs unexpedtedly

2002-08-21 Thread lcalero


  Hi. These last days, after some months of running relatively smoothly,
I've been having some trouble with MySQL. Sometimes (yesterday 4 times) it
just goes astray and virtually hangs. Load goes up to +200%, all
connections are occupied and it just doesn't do anything. The only way to
stop it is to killall -9 mysql because a mysqladmin shutdown won't do.

  Looking though the error file I get this:

mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked agaist is corrupt, improperly built,
[...]

key_buffer_size=402649088
record_buffer=8384512
sort_buffer=33554424
max_used_connections=352
max_connections=400
threads_connected=287
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 4192696 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

  (Is it ok? Box is a Dual 1Ghz, 1Gb ram, Linux 2.4.16 dedicated only to
MySQL)

Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Stack range sanity check OK, backtrace follows:
0x806ede4
0x8120148
0x814ba77
0x80a147f
0x807561a
0x8073f97

[...]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd-query at (nil)  is invalid pointer
thd-thread_id=1733

  Everytime the box hangs I get the same stack backtrace, I have resolved
it and it's:

0x806ede4 pack__12Field_stringPcPCcUi + 20
0x8120148 regatoi + 8
0x814ba6f __printf_fp + 5719
0x80a147f join_read_const__FP13st_join_table + 35
0x807561a push_front__t4List1Z3KeyP3Key + 18
0x8073f97 prepare__13select_exportRt4List1Z4Item + 443

  ...but when I try to find the thread that caused it (1733 in this case)
in the binary log it doesn't appear so I'm unable to determine what's
causing the error.

  I thought at first that it could be a load peak issue, but this error is
from today at 6am, and this isn't a busy hour. Everytime I get this i run
myisamchk -r *.MYI. It seems that after some time (+30 minutes usually)
mysql restarts and starts running again.

  Any thoughts on this? Anything I can do to resolve it?

  Thanks.

--
  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: Another 'Too many connections' question...

2002-08-21 Thread Simon Green

Too many connections
Is the message you get when all are used up. The limit is about 1000 (Linux)
but can be set higher.
With MySQL you can set a limit for each user. So I would set this to say 100
for each user and 1000 in total.
What courses this is pconnects or threads that will not drop. If you use
pconnects and don't re use them client side these can had around till they
are dropped (8 hours standard). The other thing that can happen is when a
table is locked by backups or a log question other connections can get
backed up. 
Hope this helps
Simon

-Original Message-
From: Tom Norwood [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2002 10:55
To: mysql-list
Subject: Another 'Too many connections' question...


A couple of weeks ago I came across this error which effectively closed down
our site.

Two things:
(1) I am using Perl DBI to interface mySQL is there any way to effectively
capture such errors and provide an alternate web page?  I guess there has to
be, but I experimented with the 'PrintError' and 'RaiseError' with little
joy.

(2) At present our MySQL needs are provided by our ISP by means of a shared
server (dedicated to MySQL I think!).  The 'max_connections' variable (SHOW
VARIABLES) is currently set to 300, which seems a bit on low side for a
server with 770 databases (SHOW DATABASES) with I don't know how many
tables.
What causes this error, 'any' connection, admin type connections, etc.?
And does this error require a server/mysqld restart on the part of our ISP?
They were typically unhelpful when I spoke to them (hope that's not due to
ignorance.)

Have been looking at dedicated hosting for a while now, but finding the cash
and moreover the time to move is proving a slow process.

Any help gratefully Rx'd,
Tom.


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

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




merging databases

2002-08-21 Thread Mozzi

Hope this is the right term ;-)

Background:
I log my radius logs to mysql
I had a problem (self inflicted) with the table where I logged it into.

I copied the files out and recreated the database so that I don't ose to 
many logs.

I took the old files .MYDetc and recreated the database on another 
machine and saved the data(verey cool mysql)

Now my problem:
I want to get the data of the recovered database back into the database 
that has been logging for about a week now.

I was thinking mysqldump, but the id's are written in so it will clash 
same with dumping to a comma delimited textfile.
Any ideas ?
Just a url or similar to kick me in the right direction will do fine ;-)

Tnx

Mozzi



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

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




Problemint he fields

2002-08-21 Thread Jaskaran Singh


Dear Friends

I observed the very strange problem with my Mysql , My be this is the feature or I 
have not configured it properly
please do tell me the reasons and remedy.

Problem is 
I am inserting the fields through VB.
When I insert the record in the table of Mysql  . Mysql inserts the record properly 
(very first record) with the contents of the fields
shorter than the length of the field. If I try to insert another records in the table 
with length of the variable greater than thelength i inserted firstly then this gives 
me error. 
e.g

Name is the field in the table with Length 50.

Firstly when I insert name=Anil Kumar Gupta lets say then 16 character has been fed 
in it
then in the second record if I try to insert name=jaskaran singh modi with length as 
19 
this gives me error if th name=bobby then it will insert.

why Mysql takes the length as the length of the field as the first record where as 
description shows the length of the field is 50.
but I can not insert it . So I inserted the first record with length 50 characters and 
then I started inserting any name with any length ofcourse not more than 50 characters.

Please help me.. to rectify this problem.

With Warm regards 

JS Modi

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

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: calculating date difference in days

2002-08-21 Thread Kai Vermehr

Hi Neil,

after some help from Aron Pilhofer and the online manual I got this
statement

select  (to_days(deadline)) - (to_days(current_date))

thanks!! K:)

on 21/8/02 7:58 Uhr, Neil Mansilla at [EMAIL PROTECTED] wrote:

 On Wed, 21 Aug 2002, Kai Vermehr wrote:
 
 how can I calculate the difference between two dates in days? I'd like to
 get the days to go between current_date and a job-deadline in the future.
 
 thank)s to MySQL
 
 --
 Kai Vermehr
 eBoy Graphics
 http://www.eboy.com
 
 Using a single MySQL select query to give me the date difference, I'd use
 something like this:
 
 SELECT (UNIX_TIMESTAMP('2002-11-12')-UNIX_TIMESTAMP())/86400;
 
 Just performed that query and it gave me '82.96' -- so November 12, 2002
 is 82.96 days away.  Of course, you'd substitute 2002-11-12 with something
 more meaningful, such as your job-deadline date.
 
 Regards,
 Neil Mansilla
 whatUseek.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
 

-- 
Kai Vermehr
eBoy Graphics
http://www.eboy.com


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

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




MySQL 4.0.2 doesn't unlock certain tables

2002-08-21 Thread Jacob Friis Larsen

The MySQL database we use is a 4.0.2 source RPM on a RedHat 7.3

MySQL locks tables while they are being updated and unlocks the table
when the update is finished. But sometimes MySQL doesn't unlock certain
tables. And in the process list their is nothing being processed.

Does anybody know why or how I can fix this?


Regards

Jacob Friis Larsen

[ JFL WebCom | www.sharksforum.com | www.eksperten.dk | +45 7027 0767 ] 


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

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




LVM snapshots and MySQL ?

2002-08-21 Thread Antoine


Hi,

I use LVM (Linux Volume Manager) on my box. The MySQL datadir is mounted
on a specific ext3-formatted logical volume ; thus I am able to make live
snapshots of the database using the LVM snapshot fonctionnality.
Internally, LVM snapshots function by syncing the original partition to
disk and then backing up all further modified contents onto the snapshot
partition. So it is fast (creating the snapshot itself takes less than one
second), does not consume much disk (only changes are written to the snapshot
partition) and very convenient : one creates the snapshot, takes the time
to backup its contents onto a tape (or whatever), and then removes the
snapshot. All the while, the database is alive and can be written to by
MySQL without disturbing the backup.

The question is : although the snapshot syncs the partition, is it sufficient
to guarantee that the data is in a consistent state ? That is, if it occurs
in the middle of a write by MySQL, will the MYD file be in good state or
may it be corrupted ? If consistency is not guaranteed, then I'll just
shutdown MySQL before creating the snapshot : this will make the database
unavailable for a few seconds - not a really big deal ;-).

Does anyone already use this kind of setup ? Any comments about it ?

Thank you

Antoine.




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

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




Constraint HELL

2002-08-21 Thread Jim Bailey

sql, query
I understand I must use InnoDB tables if I plan to use constraints.

If I:
   CREATE TABLE TEMP_TEST(A CHAR(2),B CHAR(2))
   TYPE = InnoDB;

Well the test table gets created, but it is, according to
SHOW TABLE STATUS, a MyISAM table.  How can I set Type to InnoDB
and make it stick.

And if it is true that InnoDB tables can contain
only 1000 or fewer rows, what's the use. I could do that with a text file.

Jim Bailey




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


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

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




Please help me with this fulltext query!

2002-08-21 Thread Peter Engström

Hi!

I have 2 tables

Table 'candidate_index' holds information like
firstName,lastName,phoneNumber etc.
Example

id | firstName | lastName | phoneNumber
1 | Peter   | Engström | 3236363
2 | John| Smith   | 3773737
...

Table 'candidate_skills' holds the skills a candidate have
Example

id | candidateID | skill |
1 | 1 | Office 2000 |
2 | 1 | PHP |
3 | 2 | C++ |
4 | 1 | Java |
4 | 2 | Java |
...


I want to make a fulltext search in both the candidate information + the
skills. Is this possible? How do I do it?

If I for example search for '+peter +java' I want candidate 1 to come
up as a hit.  Do I need to group the skills with the candidate info?
How do I do this?

Is it a good idea to create an extra table called 'candidate_fulltext'
with one big 'text' column and insert all the information and just
make the fulltext search in this table?

Table 'candidate_fulltext' holds the details about the candidates + the
skills
Example

candidateID | bigtext_to_use_for_searching
id| Peter Engström 3236363 Office 2000 PHP Java

Or is there another solution?

Best regards
/Peter

Ps I have 50 000 candidates and each candidate have about 10 skills Ds.



sql,query



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

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




Re: Problemint he fields

2002-08-21 Thread Roger Baklund

* Jaskaran Singh 
 I am inserting the fields through VB.
 When I insert the record in the table of Mysql  . Mysql inserts 
 the record properly (very first record) with the contents of the fields
 shorter than the length of the field. If I try to insert another 
 records in the table with length of the variable greater than 
 thelength i inserted firstly then this gives me error. 

Can you please quote the error?

 Name is the field in the table with Length 50.
 
 Firstly when I insert name=Anil Kumar Gupta lets say then 16 
 character has been fed in it
 then in the second record if I try to insert name=jaskaran singh 
 modi with length as 19 
 this gives me error if th name=bobby then it will insert.

Strange. I don't think this has anything to do with mysql.
 
-- 
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: mysql.sock

2002-08-21 Thread Bryant Hester

 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ozgur,

I would make sure that your MySQL server is running. I believe this
problem has been asked many a-time, and should be covered in the
documentation.

HTH,
Bryant Hester
Juxtapose, inc.


 Hi All,
 I am very new with mysql. I have just installed it to Sun OS but
 there  is a message  ERROR 2002: Can't connect to local MySql
 server thought  '/tmp/mysql.sock' (2). Does anyone have knowledge
 about problem and  help me? Regards,


**
*
Bu elektronik posta ve onunla iletilen bütün dosyalar sadece
göndericisi tarafýndan almasý amaçlanan yetkili gerçek ya da tüzel
kiþinin kullanýmý içindir.Eðer söz konusu yetkili alýcý deðilseniz bu
elektronik postanýn içeriðini açýklamanýz,kopyalamanýz,
yönlendirmeniz ve kullanmanýz kesinlikle yasaktýr ve bu elektronik
postayý derhal silmeniz gerekmektedir TURKCELL bu mesajýn içerdiði
bilgilerin doðruluðu veya eksiksiz olduðu konusunda herhangi bir
garanti vermemektedir. Bu nedenle bu bilgilerin ne þekilde olursa
olsun içeriðinden, iletilmesinden, alýnmasýndan ve saklanmasýndan
sorumlu deðildir. Bu mesajdaki görüþler yalnýzca gönderen kiþiye
aittir ve TURKCELL'in görüþlerini yansýtmayabilir Bu e-posta bilinen
bütün bilgisayar virüslerine karþý taranmýþtýr.
**
*
This e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you are not the intended recipient you are hereby
notified that any dissemination, forwarding, copying or use of any of
the information is strictly prohibited, and the e-mail should
immediately be deleted. TURKCELL makes no warranty as to the accuracy
or completeness of any information contained in this message and
hereby excludes any liability of any kind for the information
contained therein or for the information transmission, reception,
storage or use of such in any way whatsoever.The opinions expressed
in this message belong to sender alone and may not necessarily
reflect the opinions of TURKCELL. This e-mail has been scanned for
all known computer viruses.
**
*

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

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

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

iQA/AwUBPWOGOUlWu7/HFp4nEQIgEACfVCoDAuH4oTI5P8UwVGPqFGPPWSkAoJTI
QX8ah/d46+L+e0v3CinPp8ws
=/Wmv
-END PGP SIGNATURE-


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

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




Re: LVM snapshots and MySQL ?

2002-08-21 Thread Joseph Bueno

Antoine wrote:
 Hi,
 
 I use LVM (Linux Volume Manager) on my box. The MySQL datadir is mounted
 on a specific ext3-formatted logical volume ; thus I am able to make live
 snapshots of the database using the LVM snapshot fonctionnality.
 Internally, LVM snapshots function by syncing the original partition to
 disk and then backing up all further modified contents onto the snapshot
 partition. So it is fast (creating the snapshot itself takes less than one
 second), does not consume much disk (only changes are written to the snapshot
 partition) and very convenient : one creates the snapshot, takes the time
 to backup its contents onto a tape (or whatever), and then removes the
 snapshot. All the while, the database is alive and can be written to by
 MySQL without disturbing the backup.
 
 The question is : although the snapshot syncs the partition, is it sufficient
 to guarantee that the data is in a consistent state ? That is, if it occurs
 in the middle of a write by MySQL, will the MYD file be in good state or
 may it be corrupted ? If consistency is not guaranteed, then I'll just
 shutdown MySQL before creating the snapshot : this will make the database
 unavailable for a few seconds - not a really big deal ;-).
 
 Does anyone already use this kind of setup ? Any comments about it ?
 
 Thank you
 
 Antoine.
 
Hi,

According to the documentation, you can use:
FLUSH TABLES WITH READ LOCK
for that.
See http://www.mysql.com/doc/en/FLUSH.html
for details

Regards
-- 
Joseph Beuno





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

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




Win98 +upgrade to MySQL 3.23.52 hangs with innodb tables.

2002-08-21 Thread Ireneusz Piasecki

Hi.

I have problem.
I would like to upgrad from 3.23.51 on my win98 to 3.23.52 but with innodb
tables 3.23.52 hang on starting. and my win98 goes slowly and slowly.
ctrl-alt-del helps :)


In log i see:
010820 20:20:13  C:\MYSQL\BIN\MYSQLD.EXE: Got signal 2. Aborting!

010820 20:20:13  Aborting

010820 20:20:16  InnoDB: Warning: shutting down a not properly started
 InnoDB: or created database!

I made downgrading to 3.23.51 all is allright. Server is going.

Any idea ?

P.s. I have frontpage 2002 instaled on my win98 box, during instalation some
files were changed by frontpage 2002 instalator.

regards, Irek


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

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: LVM snapshots and MySQL ?

2002-08-21 Thread Antoine


Hi,

 According to the documentation, you can use:
 FLUSH TABLES WITH READ LOCK
 for that.
 See http://www.mysql.com/doc/en/FLUSH.html
 for details

Well, that seems perfect. I guess I should have RTFM before ;))

Thanks a lot

Antoine.




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

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: Privileges and Access Control

2002-08-21 Thread Gerald Clark

You seem to havew a leading space in your newuser account.

Juri Nysschen wrote:

Hi

I have a problem with privileges on MySql NT 3.23.52. I hope that someone
can provide me with a solution.

If a user has USAGE privileges on the mysql db (*.*), and ALL privileges on
another db (CUSTOMDB) in the system, that user can't login nor can they
access the CUSTOMDB. The error reported is: you have no access to database
CUSTOMDB. Yet, according to the documentation, this user setup is valid.

The Sql Statements are:
GRANT USAGE  on *.* to newuser identified by password 'mypassword'
GRANT ALL on CUSTOMDB to newuser
FLUSH PRIVILIGES

SHOW GRANTS for newuser
Returns:
GRANT USAGE ON *.* TO ' newuser'@'%'
GRANT ALL PRIVILIGES ON CUSTOMDB.* TO ' newuser'@'%'

The purpose of this user setup is to prevent access to the mysql.user table,
should the login be compromised.

Juri Nysschen

The Digital Message Network (Pty) Ltd
Tel. +27.(0)11.4750300
Fax. +27.(0)11.4056300
Http://www.dmnet.co.za




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

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: MySQL hangs unexpedtedly

2002-08-21 Thread Gerald Clark

Hardware?
Operating System and version?
MySql version?
Precompiled, you compiled?
Which compiler?




[EMAIL PROTECTED] wrote:

  Hi. These last days, after some months of running relatively smoothly,
I've been having some trouble with MySQL. Sometimes (yesterday 4 times) it
just goes astray and virtually hangs. Load goes up to +200%, all
connections are occupied and it just doesn't do anything. The only way to
stop it is to killall -9 mysql because a mysqladmin shutdown won't do.

  Looking though the error file I get this:

mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked agaist is corrupt, improperly built,
[...]

key_buffer_size=402649088
record_buffer=8384512
sort_buffer=33554424
max_used_connections=352
max_connections=400
threads_connected=287
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 4192696 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

  (Is it ok? Box is a Dual 1Ghz, 1Gb ram, Linux 2.4.16 dedicated only to
MySQL)

Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Stack range sanity check OK, backtrace follows:
0x806ede4
0x8120148
0x814ba77
0x80a147f
0x807561a
0x8073f97

[...]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd-query at (nil)  is invalid pointer
thd-thread_id=1733

  Everytime the box hangs I get the same stack backtrace, I have resolved
it and it's:

0x806ede4 pack__12Field_stringPcPCcUi + 20
0x8120148 regatoi + 8
0x814ba6f __printf_fp + 5719
0x80a147f join_read_const__FP13st_join_table + 35
0x807561a push_front__t4List1Z3KeyP3Key + 18
0x8073f97 prepare__13select_exportRt4List1Z4Item + 443

  ...but when I try to find the thread that caused it (1733 in this case)
in the binary log it doesn't appear so I'm unable to determine what's
causing the error.

  I thought at first that it could be a load peak issue, but this error is
from today at 6am, and this isn't a busy hour. Everytime I get this i run
myisamchk -r *.MYI. It seems that after some time (+30 minutes usually)
mysql restarts and starts running again.

  Any thoughts on this? Anything I can do to resolve it?

  Thanks.

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





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

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




Problem with LOAD LOCAL DATA INFILE

2002-08-21 Thread compo guy

I am using MySQL version 3.23.11-alpha on Win98. I have created a 
database with a table borrower whose description is as follow:

mysql describe borrower;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| customer_name | varchar(20) | YES  | | NULL|   |
| loan_number   | varchar(5)  | YES  | | NULL|   |
+---+-+--+-+-+---+
2 rows in set (0.00 sec)

I use the following to load the data stored in borrower.txt into 
the table borrower :

mysql load data local infile c:\\data\\borrower.txt into table 
borrower;
Query OK, 8 rows affected (0.00 sec)
Records: 8  Deleted: 0  Skipped: 0  Warnings: 1

Case 1:
The file borrower.txt looks like the following :

Adams   L-16
Curry   L-93
Hayes   L-15
Jackson L-14
Jones   L-17
Smith   L- 11
Smith   L-23
WilliamsL-17

When I run a select query i get the following output :
mysql select * from borrower;
+---+-+
| customer_name | loan_number |
+---+-+
| Adams | L-16|
| Curry | L-93|
|| L-15
|n   | L-14
|| L-17
| Smith | L- 11   |
|| L-23
| Williams  | L-17|
+---+-+
8 rows in set (0.06 sec)

Case 2:
When the contents of borrower.txt is changed to no spaces in 
between name and loan_number :

AdamsL-16
CurryL-93
HayesL-15
JacksonL-14
JonesL-17
SmithL-11
SmithL-23
WilliamsL-17

The data stored in the table is:

mysql select * from borrower;
+---+-+
| customer_name | loan_number |
+---+-+
 | NULL|
 | NULL|
 | NULL|
   | NULL|
 | NULL|
 | NULL|
 | NULL|
  | NULL|
+---+-+
8 rows in set (0.00 sec)


Why was the data not correctly loaded into the table? Please Help 
me.

Regards,
Vaibhav Jha.

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

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

2002-08-21 Thread lcalero


 Hardware?
 Operating System and version?
 MySql version?
 Precompiled, you compiled?
 Which compiler?

  Intel Dual 1Ghz, 1Gb RAM, RedHat Linux 6.2, kernel 2.4.16, MySQL 3.23.52
from rpms (happened the same with 3.23.46). As I said before, this only
happens the last few days, we were running for almost a year without much
problems.

  Anyone can explain/understand the stack trace?

  Cheers

--
  L


 [EMAIL PROTECTED] wrote:

   Hi. These last days, after some months of running relatively smoothly,
 I've been having some trouble with MySQL. Sometimes (yesterday 4 times) it
 just goes astray and virtually hangs. Load goes up to +200%, all
 connections are occupied and it just doesn't do anything. The only way to
 stop it is to killall -9 mysql because a mysqladmin shutdown won't do.
 
   Looking though the error file I get this:
 
 mysqld got signal 11;
 This could be because you hit a bug. It is also possible that this binary
 or one of the libraries it was linked agaist is corrupt, improperly built,
 [...]
 
 key_buffer_size=402649088
 record_buffer=8384512
 sort_buffer=33554424
 max_used_connections=352
 max_connections=400
 threads_connected=287
 It is possible that mysqld could use up to
 key_buffer_size + (record_buffer + sort_buffer)*max_connections = 4192696 K
 bytes of memory
 Hope that's ok, if not, decrease some variables in the equation
 
   (Is it ok? Box is a Dual 1Ghz, 1Gb ram, Linux 2.4.16 dedicated only to
 MySQL)
 
 Attempting backtrace. You can use the following information to find out
 where mysqld died. If you see no messages after this, something went
 terribly wrong...
 Stack range sanity check OK, backtrace follows:
 0x806ede4
 0x8120148
 0x814ba77
 0x80a147f
 0x807561a
 0x8073f97
 
 [...]
 
 Trying to get some variables.
 Some pointers may be invalid and cause the dump to abort...
 thd-query at (nil)  is invalid pointer
 thd-thread_id=1733
 
   Everytime the box hangs I get the same stack backtrace, I have resolved
 it and it's:
 
 0x806ede4 pack__12Field_stringPcPCcUi + 20
 0x8120148 regatoi + 8
 0x814ba6f __printf_fp + 5719
 0x80a147f join_read_const__FP13st_join_table + 35
 0x807561a push_front__t4List1Z3KeyP3Key + 18
 0x8073f97 prepare__13select_exportRt4List1Z4Item + 443
 
   ...but when I try to find the thread that caused it (1733 in this case)
 in the binary log it doesn't appear so I'm unable to determine what's
 causing the error.
 
   I thought at first that it could be a load peak issue, but this error is
 from today at 6am, and this isn't a busy hour. Everytime I get this i run
 myisamchk -r *.MYI. It seems that after some time (+30 minutes usually)
 mysql restarts and starts running again.
 



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

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




Win98, mysql 3.23.52 (problems) and 3.23.51 (is ok) with innodb

2002-08-21 Thread Ireneusz Piasecki

Hi.

I have problem.
I would like to upgrad from 3.23.51 on my win98 to 3.23.52 but with innodb
tables 3.23.52 hang on starting. and my win98 goes slowly and slowly.
ctrl-alt-del helps :)


In log i see:
010820 20:20:13  C:\MYSQL\BIN\MYSQLD.EXE: Got signal 2. Aborting!

010820 20:20:13  Aborting

010820 20:20:16  InnoDB: Warning: shutting down a not properly started
 InnoDB: or created database!

I made downgrading to 3.23.51 all is allright. Server is going.

Any idea ?

P.s. I have frontpage 2002 instaled on my win98 box, during instalation some
files were changed by frontpage 2002 instalator.

regards, Irek


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

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




Exact word search

2002-08-21 Thread Robert Macwange

Hello y'all,

I guess this is easy, but it is defeating me.
I am having a problem with this query:

$keyword = search;
SELECT * FROM table WHERE field LIKE '%$keyword%'

The problem is I don't want sear or earch but exactly search.

What am I missing?

 ..
Regards, Robert (Newbie)



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

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: Constraint HELL

2002-08-21 Thread Larry Irwin

Jim, it must be that the innodb parameters aren't set up in /etc/my.cnf.
Case doesn't matter on the type=innodb.
I've set up a tablespace called pracexpr1 that has the following section for
innodb in my my.cnf:

# Uncomment the following if you are using Innobase tables
innodb_data_file_path = pracexpr1:400M
innodb_data_home_dir = /u/sqldata
innodb_log_group_home_dir = /u/sqllog
innodb_log_arch_dir = /u/sqllog
set-variable = innodb_mirrored_log_groups=1
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=5M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=16M
set-variable = innodb_additional_mem_pool_size=2M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50

Hope this helps,
Larry Irwin
CCA Medical
sql, query


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

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




Re: Exact word search

2002-08-21 Thread Dmitry Dorofeev



Robert Macwange wrote:
 Hello y'all,
 
 I guess this is easy, but it is defeating me.
 I am having a problem with this query:
 
 $keyword = search;
 SELECT * FROM table WHERE field LIKE '%$keyword%'

Hint, for 'search' in middle of phrase:

SELECT * FROM table WHERE field LIKE '% $keyword %'

but you are really looking for REGEXP mysql function.

 
 The problem is I don't want sear or earch but exactly search.
 
 What am I missing?
 
  ..
 Regards, Robert (Newbie)
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


-- 
Deem0N** [EMAIL PROTECTED] **
Natural born YASPer   http://www.yasp.com/
Just Another Perl Monger  http://spb.pm.org/
R U X Y founder   http://www.ruxy.org.ru/


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

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: Exact word search

2002-08-21 Thread Mikhail Entaltsev

Robert,

 ... WHERE field LIKE '%search%'

means everything that contains search.
Examples: abcsearch, searchabc, abcsearchabc.
But it doesn't mean abcearch, searcabc, searc.

Best regards,
Mikhail.

- Original Message -
From: Robert Macwange [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 4:18 PM
Subject: Exact word search


 Hello y'all,

 I guess this is easy, but it is defeating me.
 I am having a problem with this query:

 $keyword = search;
 SELECT * FROM table WHERE field LIKE '%$keyword%'

 The problem is I don't want sear or earch but exactly search.

 What am I missing?

  ..
 Regards, Robert (Newbie)



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

 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: Exact word search

2002-08-21 Thread Brian Moon

Use FullText indexing or a REGEXP.

Brian.

- Original Message -
From: Robert Macwange [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 9:18 AM
Subject: Exact word search


| Hello y'all,
|
| I guess this is easy, but it is defeating me.
| I am having a problem with this query:
|
| $keyword = search;
| SELECT * FROM table WHERE field LIKE '%$keyword%'
|
| The problem is I don't want sear or earch but exactly search.
|
| What am I missing?
|
|  ..
| Regards, Robert (Newbie)
|
|
|
| -
| Before posting, please check:
|http://www.mysql.com/manual.php   (the manual)
|http://lists.mysql.com/   (the list archive)
|
| 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: Exact word search

2002-08-21 Thread tibyke



 Hello y'all,
 
 I guess this is easy, but it is defeating me.
 I am having a problem with this query:
 
 $keyword = search;
 SELECT * FROM table WHERE field LIKE '%$keyword%'
 
 The problem is I don't want sear or earch but exactly search.

like % $keyword %;



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

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: max_allowed_packet (was: Re: 4.0.x bug with LONGTEXT?)

2002-08-21 Thread Victoria Reznichenko

Roger,
Tuesday, August 20, 2002, 5:34:25 PM, you wrote:

RB Maybe... :)

RB On the other hand:

RB 1) The documentation on max_allowed_packet talks only about transferring
RB data, not storing. (This should be easy to fix.)

Agreed..

RB 2) The mere existence of LONGBLOB and LONGTEXT suggests that fields of this
RB size could be inserted in a table. Again, a warning in the docs could be
RB very helpfull, but imo the types should not even be there, if they can not
RB be utilized.

As you wrote below, it has been changed in 4.0

RB 3) How can the server know that the max_allowed_packet for _this_ connection
RB (the UPDATE'ing connection) isn't smaller than the max_allowed_packet value
RB for a future SELECT connection? (I could do the UPDATE ... CONCAT(... with
RB max_allowed_packet=1M, and later do selects with max_allowed_packet=16M)

Roger, there is no max_allowed_packet for connection. There are
max_allowed_packet for the server and max_allowed_packet for the
client. You can't insert data (and have result string) bigger than
max_allowed_packet on the server and can't retrieve data on the client bigger than
value of the client max_allowed_packet.

RB 4) We can of course insert more rows in a table than would be allowed to
RB receive with a single select statement, this is not an argument to prohibit
RB many _rows_ in a table. It's not the exact same thing, but I think it is
RB similar. I would prefer if mysql was not 'baby-sitting' for me... :)

RB 5) It could be usefull in some cases, for instance when you store large xml
RB documents, you can extract relevant parts of the column, so that the packet
RB transferred to the client is smaller than max_allowed_packet.

RB The upper limit for max_allowed_packet has been lifted in 4.0.x, so this
RB will probably not be a problem in the future, but the docs should mention
RB this limitation for 3.23.




-- 
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: RE: MIN/MAX( IF( ...) ) problems: min bigger than max

2002-08-21 Thread Victoria Reznichenko

Richard,
Tuesday, August 20, 2002, 9:04:05 PM, you wrote:

RU Is it fixed only in MySQL 4.x, or will it be in the next point 
RU release of 3.x as well?

No, it wasn't changed in 3.23, only in 4.0.3..




-- 
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: mysql.sock

2002-08-21 Thread Egor Egorov

OZGUR,
Wednesday, August 21, 2002, 10:09:06 AM, you wrote:

OG I am very new with mysql. I have just installed it to Sun OS but there
OG is a message  ERROR 2002: Can't connect to local MySql server thought
OG '/tmp/mysql.sock' (2). 
OG Does anyone have knowledge about problem and help me?

Check if MySQL server is running. If so, check where the socket file is
located. Check permissions on the socket file.



-- 
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: temp tables

2002-08-21 Thread Egor Egorov

John,
Tuesday, August 20, 2002, 5:27:27 PM, you wrote:

JW Ta,

JW But is it normal to have Temp table bigger than 10meg? And a lot of them?

JW Here is my latest data from STATUS
JW Created_tmp_disk_tables 46598
JW Created_tmp_tables 87839
JW Uptime 81773

JW And I have set tmp_table_cache to 10M

JW I know I could just up the tmp_table_size but I am more concerned about the
JW size of the tmp tables and the number of them.

JW I am running an in house build CMS and running phorum. I get about 100,000
JW page views an hour.

It depends on your queries and tables that are involved. MySQL uses
temporary table for some queries. So, if tables are large,
temporary tables are also large..





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



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

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




Re: Is this a bug with comments? (fwd)

2002-08-21 Thread Victoria Reznichenko

sherzodr,
Wednesday, August 21, 2002, 9:01:44 AM, you wrote:

s If i have a single quote (') inside the /* */ comments,
s it gives me a syntax error. Why?

Because the single quote even in the comments means that quoted string
begun:
  http://www.mysql.com/doc/en/Comments.html






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




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

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




Re: innob question

2002-08-21 Thread Egor Egorov

Randy,
Tuesday, August 20, 2002, 7:49:09 PM, you wrote:

RJ  in a innodb table type using mysql max

RJ  is a begin statement the same as set autocommitt = 0??
 
Yes.





-- 
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: Constraint HELL

2002-08-21 Thread Victoria Reznichenko

Jim,
Wednesday, August 21, 2002, 2:51:51 PM, you wrote:

JB sql, query
JB I understand I must use InnoDB tables if I plan to use constraints.

JB If I:
JBCREATE TABLE TEMP_TEST(A CHAR(2),B CHAR(2))
JBTYPE = InnoDB;

JB Well the test table gets created, but it is, according to
JB SHOW TABLE STATUS, a MyISAM table.  How can I set Type to InnoDB
JB and make it stick.

If you install MySQL from binary distribution you should use MySQL-Max
or you should configure MySQL server with --with-innodb option:
   http://www.mysql.com/doc/en/InnoDB_overview.html

JB And if it is true that InnoDB tables can contain
JB only 1000 or fewer rows, what's the use. I could do that with a text file.

You are so credulous :)

No, it's not true. You can store more that 1000 rows in the InnoDB
table.




-- 
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: Problem with LOAD LOCAL DATA INFILE

2002-08-21 Thread Gerald Clark

You have carriage returns in your data file.
Try adding a 'terminated by'  to your load data.

compo guy wrote:

 I am using MySQL version 3.23.11-alpha on Win98. I have created a 
 database with a table borrower whose description is as follow:

 mysql describe borrower;
 +---+-+--+-+-+---+
 | Field | Type| Null | Key | Default | Extra |
 +---+-+--+-+-+---+
 | customer_name | varchar(20) | YES  | | NULL|   |
 | loan_number   | varchar(5)  | YES  | | NULL|   |
 +---+-+--+-+-+---+
 2 rows in set (0.00 sec)

 I use the following to load the data stored in borrower.txt into the 
 table borrower :

 mysql load data local infile c:\\data\\borrower.txt into table 
 borrower;
 Query OK, 8 rows affected (0.00 sec)
 Records: 8  Deleted: 0  Skipped: 0  Warnings: 1

 Case 1:
 The file borrower.txt looks like the following :

 AdamsL-16
 CurryL-93
 HayesL-15
 JacksonL-14
 JonesL-17
 SmithL- 11
 SmithL-23
 WilliamsL-17

 When I run a select query i get the following output :
 mysql select * from borrower;
 +---+-+
 | customer_name | loan_number |
 +---+-+
 | Adams | L-16|
 | Curry | L-93|
|| L-15
|n   | L-14
|| L-17
 | Smith | L- 11   |
|| L-23
 | Williams  | L-17|
 +---+-+
 8 rows in set (0.06 sec)

 Case 2:
 When the contents of borrower.txt is changed to no spaces in between 
 name and loan_number :

 AdamsL-16
 CurryL-93
 HayesL-15
 JacksonL-14
 JonesL-17
 SmithL-11
 SmithL-23
 WilliamsL-17

 The data stored in the table is:

 mysql select * from borrower;
 +---+-+
 | customer_name | loan_number |
 +---+-+
 | NULL|
 | NULL|
 | NULL|
   | NULL|
 | NULL|
 | NULL|
 | NULL|
  | NULL|
 +---+-+
 8 rows in set (0.00 sec)


 Why was the data not correctly loaded into the table? Please Help me.

 Regards,
 Vaibhav Jha.

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

 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: Exact word search

2002-08-21 Thread Shaun Bramley

Robert,

 when you use the LIKE statement any word that is similar to your desired
search criteria will be selected.

if you desire an exact match then use:

SELECT * FROM table WHERE field = value


Shaun
- Original Message -
From: Robert Macwange [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 10:18 AM
Subject: Exact word search


 Hello y'all,

 I guess this is easy, but it is defeating me.
 I am having a problem with this query:

 $keyword = search;
 SELECT * FROM table WHERE field LIKE '%$keyword%'

 The problem is I don't want sear or earch but exactly search.

 What am I missing?

  ..
 Regards, Robert (Newbie)



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

 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: Exact word search

2002-08-21 Thread Keith C. Ivey

On 21 Aug 2002, at 16:27, tibyke wrote:

  $keyword = search;
  SELECT * FROM table WHERE field LIKE '%$keyword%'
  
  The problem is I don't want sear or earch but exactly search.
 
 like % $keyword %;

But that won't find search if it's at the beginning or end of a 
string, or preceded or followed by punctuation.

Robert's question is strange, because field LIKE '%search%' 
shouldn't be finding anything with just sear or earch.  If his 
real question is how to avoid finding research or searching, then 
the best answer is probably a full-text index:

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

That will also be a lot faster than using LIKE if his tables are at 
all large.

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.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: replication problem

2002-08-21 Thread Froilan Mendoza

At 05:27 PM 8/20/2002 -0400, walt wrote:
  I have added this one, thanks.
Hmmm...
When you set up the master database, did you copy all the *.frm, *.MYD, *.MYI
to the slave database?

Ok, after a lot of hair-pulling, I downgraded and used 3.23, and what do 
you know, replication worked out fine without any hitch!  I was using MySQL 
4.0.2 and for some reason, replication doesn't work.  Is this is a bug?

FWIW, when i use 4.0.2 and do a show processlist on the master server, it 
doesn't display Slave connection: waiting for binlog update.

(I know, I know, 4.0 is supposed to be alpha :))

Thanks again walt

Froilan


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

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: Exact word search

2002-08-21 Thread Neil Mansilla

 I guess this is easy, but it is defeating me.
 I am having a problem with this query:

 $keyword = search;
 SELECT * FROM table WHERE field LIKE '%$keyword%'

 The problem is I don't want sear or earch but exactly search.

If you're looking for an exact match, where field will contain NOTHING BUT
the $keyword, then:

   WHERE $field = '$keyword'

But if you're looking within a sentence or paragraph of text, try
something like this (double-bracket POSIX regexp -- to be honest, I just
found this online, and so far it appears to work -- if anyone could
expound on the :: and :: that would be swell:

   WHERE $fields REGEXP '[[::]]$keyword[[::]]'

Regards,
Neil Mansilla
whatUseek.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




To share with MySql friends in net?

2002-08-21 Thread Ray da Costa

Oi, for gentility!  

Could inform which the procedure to share the MySql that is in my machine
with the escritorio friends.  

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

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 building mysql-3.23.51 on Solaris 9

2002-08-21 Thread Russell Premont

I am trying to install MYSQL on Solaris 9 sparc edition. I am using the
following options:

CFLAGS=-O3 -mcpu=v8 -Wa,-xarch=v8plusa CXX=gcc
CXXFLAGS=-O3 -mcpu=v8 -Wa,-xarch=v8plusa -felide-constructors -fno-exceptio
ns -fno-rtti
./configure --prefix=/usr/local/mysql --localstatedir=/www_data/mysql/data -
-enable-assembler --with-innodb --with-low-memory --with-berkeley-db --with-
libwrap --with-named-z-lib=no  --with-debug=full

configure runs fine but when I run make I get the following:

gcc -g -DSAFE_MUTEX -DSAFEMALLOC -O3 -mcpu=v8 -Wa,-xarch=v8plusa -felide-con
structors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions 
-fno-rtti -DUSE_MYSYS_NEW -DHAVE_RWLOCK_T -o .libs/mysql mysql.o readline.o
sql_string.o completion_hash.o ../readline/libreadline.a -lcurses
../libmysql/.libs/libmysqlclient.so -lz -lcrypt -lgen -lsocket -lnsl -lm -Wl
,--defsym -Wl,__cxa_pure_virtual=0 -lz -lcrypt -lgen -lsocket -lnsl -lm -R/u
sr/local/mysql/lib/mysql
/usr/ccs/bin/ld: illegal option -- -
ld: fatal: option -d has illegal argument `efsym'
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?]
file(s)
[-64]   enforce a 64-bit link-edit
[-a]create an absolute file
[-b]do not do special PIC relocations in a.out
[-B direct] specify `direct' bindings for executable when run
[-B dynamic | static]
search for shared libraries|archives
[-B eliminate]  eliminate unqualified global symbols from the
symbol table
[-B group]  relocate object from within group
[-B local]  reduce unqualified global symbols to local
[-B reduce] process symbol reductions
[-B symbolic]   bind external references to definitions when
creating
shared objects
[-c name]   record configuration file `name'
[-C]demangle C++ symbol name diagnostics
[-d y | n]  operate in dynamic|static mode
[-D token,...]  print diagnostic messages
[-e epsym]  use `epsym' as entry point address
[-f name]   specify library for which this file is an auxiliary
filter
[-F name]   specify library for which this file is a filter
[-G]create a shared object
[-h name]   use `name' as internal shared object identifier
[-i]ignore LD_LIBRARY_PATH setting
[-I name]   use `name' as path of interpreter
[-l x]  search for libx.so or libx.a
[-L path]   search for libraries in directory `path'
[-m]print memory map
[-M mapfile]use processing directives contained in `mapfile'
[-N string] create a dynamic dependency for `string'
[-o outfile]name the output file `outfile'
[-p auditlib]   identify audit library to accompany this object
[-P auditlib]   identify audit library for processing the
dependencies
of this object
[-Q y | n]  do|do not place version information in output file
[-r]create a relocatable object
[-R path]   specify a library search path to be used at run time
[-s]strip any symbol and debugging information
[-S supportlib]
specify a link-edit support library
[-t]do not warn of multiply-defined symbols that have
different sizes or alignments
[-u symname]create an undefined symbol `symname'
[-V]print version information
[-Y P,dirlist]  use `dirlist' as a default path when searching for
libraries
[-z absexec]when building an executable absolute symbols
referenced in dynamic objects are promoted to
the executable
[-z allextract | defaultextract | weakextract]
extract all member files, only members that resolve
undefined tor tentative symbols, or allow extraction
of
archive members to resolvetweak references from
archive files
[-z combreloc]  combine multiple relocation sections
[-z defs]   tdisallow undefined symbol references
[-z endfiltee]  marks a filtee such that it will terminate a filters
search
[-z finiarray=function]
name of function to be appended to the .finiarray
[-z groupperm | nogroupperm]
enable|disable setting of group permissions
on dynamic dependencies
[-z ignore | record]
ignore|record unused dynamic dependencies
[-z initarray=function]
name of function to be appended to the .initarray
 

question about replication - a very simple one - I know they all say that - but this is - sql, query

2002-08-21 Thread Norris, Joseph

(filter bypass words - Mysql, sql, query)

Group,

I have just got into a situation in which I need to explore replication and
I know nothing about it. Can any one direct me to specific documentation on
this and maybe a simple tutorial for the greener of us?


Thanks.

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

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




Re: max_allowed_packet (was: Re: 4.0.x bug with LONGTEXT?)

2002-08-21 Thread Roger Baklund

* Victoria Reznichenko
 RB 3) How can the server know that the max_allowed_packet for
 RB _this_ connection
 RB (the UPDATE'ing connection) isn't smaller than the
 RB max_allowed_packet value
 RB for a future SELECT connection? (I could do the UPDATE ...
 RB CONCAT(... with
 RB max_allowed_packet=1M, and later do selects with
 RB max_allowed_packet=16M)

 Roger, there is no max_allowed_packet for connection. There are
 max_allowed_packet for the server and max_allowed_packet for the
 client.

Maybe I didn't explain very well... :)

I meant the client-side max_allowed_packet setting for the connection

 You can't insert data (and have result string) bigger than
 max_allowed_packet on the server

ok, I see... it is the server-side max_allowed_packet that will prevent
updating the column to anything bigger than the current value, not the
client-side... This means if you have a server-side setting of 1M, you can
not insert (or update) 2M in a MEDIUMBLOB field, even if the client use
max_allowed_packet=16M?

 and can't retrieve data on the client bigger than
 value of the client max_allowed_packet.

...but you can retrieve data bigger than the server-side max_allowed_packet
setting? (Only client-side setting matters for retrieving, only server-side
setting matters for storing?)

Thanks. :)

--
Roger
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: Re: temp tables

2002-08-21 Thread John Wards

Is their anyway of finding out what queries are causing tmp tables to write
to disk?

Cheers
John Wards
- Original Message -
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 3:40 PM
Subject: Re: Re: temp tables


 John,
 Tuesday, August 20, 2002, 5:27:27 PM, you wrote:

 JW Ta,

 JW But is it normal to have Temp table bigger than 10meg? And a lot of
them?

 JW Here is my latest data from STATUS
 JW Created_tmp_disk_tables 46598
 JW Created_tmp_tables 87839
 JW Uptime 81773

 JW And I have set tmp_table_cache to 10M

 JW I know I could just up the tmp_table_size but I am more concerned
about the
 JW size of the tmp tables and the number of them.

 JW I am running an in house build CMS and running phorum. I get about
100,000
 JW page views an hour.

 It depends on your queries and tables that are involved. MySQL uses
 temporary table for some queries. So, if tables are large,
 temporary tables are also large..





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


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

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




Versions

2002-08-21 Thread Richard Morton

Hi,

I am looking for dates for new versions and the bug fixes they will have contained.

I am using 4.0.1... however I have a handles leak. I have been told by another source 
that this will be resolved in 4.1

My question is, using MyODBC(3.51.03)... Is this a problem with 3.x stable releases or 
just 4.0.x alpha releases.

If this is an issue with both, does anybody know when this will be fixed or what 
versions don't have a problem?

Does anybody else suffer with this? Has anybody found a resolution?

Thanks

Rich



Filter Fodder: 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




msql test post

2002-08-21 Thread Russell Premont

testing mysql list server to see if my posts are recieved

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

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 compiling MySQLGUI source rev 1.7.5

2002-08-21 Thread Michel DROZ

Hello

I have a compilation problem with MySQLGUI.

I have downloaded ans installed

MySQL using the following version

mysql-3.23.52
Msql-Mysql-modules-1.2219
DBI-1.18
Data-Dumper-2.101

MySQL pass all the tests and work OK.

then MYSQLGUI using the following version

fltk-1.0.9
mysql++-1.7.9
fl_editor-0.4
mysqlgui-src-1.7.5

In mysqlgui-src-1.7.5, I have updated the Makefile to use the correct
version of mysql++

When I compile MySQLGUI, I get the following error message  when
compiling the file main.cc :

g++ -O3 -g -pipe -fforce-mem -fforce-addr -I.
-I../mysql++-1.7.9/sqlplusint -I/usr/local/include/mysql  -c main.cc
main.cc: In function `void if_conn()':
main.cc:464: no matching function for call to
`MysqlConnection::clinet_info ()'
main.cc:529: no matching function for call to
`MysqlConnection::clinet_info ()'
make: *** [main.o] Error 1

The others files compile OK.

I have spend several days on this and I have not found the error, Is it
a known bug ? and have you a solution to this problem.

Many thanks for your answer


Michel DROZ

[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




ORDER

2002-08-21 Thread Fifield, Mike

I have a table with around 150 entries in it. I am querying the table with
the fallowing command. 
SELECT * FROM guestbook LIMIT 140,9
This is working fine I am getting the last 9 entries but I would like it to
return them in reverse order. Is there a way to do this? I tried this  
 SELECT * FROM guestbook order by id desc LIMIT 140,9
But then I get the first 9 entries not the last 9 in reverse order, any help
would be much appreciated. 


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

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: To share with MySql friends in net?

2002-08-21 Thread Brian Reichert

On Wed, Aug 21, 2002 at 12:30:02PM -0300, Ray da Costa wrote:
 Oi, for gentility!  
 
 Could inform which the procedure to share the MySql that is in my machine
 with the escritorio friends.  

I may be misunderstanding you.

If you have a MySQL database on your machine, and you want other people,
from other machines, to access it, you need to:

- make sure that MySQL is allowing network connentions (_don't_ use
  --skip-networking)

- create users (with or without passwords), and describe which hosts
  that can connect from.  See:

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

Hope this helps...

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA Intel architecture: the left-hand path

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

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

2002-08-21 Thread Gerald Clark



Fifield, Mike wrote:

I have a table with around 150 entries in it. I am querying the table with
the fallowing command. 
SELECT * FROM guestbook LIMIT 140,9
This is working fine I am getting the last 9 entries but I would like it to
return them in reverse order. Is there a way to do this? I tried this  
 SELECT * FROM guestbook order by id desc LIMIT 140,9
But then I get the first 9 entries not the last 9 in reverse order, any help
would be much appreciated. 

SELECT * FROM guestbook order by id desc LIMIT 9



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

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




Join VS 2 selects

2002-08-21 Thread Randy Johnson

I am guessing that it is quicker to join 2 tables based than it is to do 2
selects in a php script

opinions???

Randy

sql,query



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

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




Extention of table_map: not 64 bits clean

2002-08-21 Thread Yuri

I ran out of tables that I can join in
one select (31) and rebuilt MySQL with
table_map's typedef changed from ulong
to ulonglong.

First it all worked fine. But after
half a day of not very heavy load strange
things began happening. Indexes got
corrupted. So some of the joins that
worked before stopped working. Performance
dropped.

I think it's somewhere not 64-bits clean.
So it would be great if someone from
developers will change this typedef
and see where the problem is.

Yuri.

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

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: innob question

2002-08-21 Thread Tod Harter

On Wednesday 21 August 2002 10:40 am, Egor Egorov wrote:

Well, loosely...

SET AUTOCOMMIT=0

does not START a transaction, what it does is signal the database that from 
now on transactions will be explicit, not implicit. That means you NEED to 
have a transaction to get anything to stick in the database, any work done 
while autocommit is 0 that is not part of an explicit transaction is just not 
going to get stored in the database AT ALL. 

In other words when autocommit is 1 it is as if every statement is surrounded 
by a seperate transaction. When autocommit is 0 you must use transactions 
explicitly, THEY ARE NOT OPTIONAL!!! So really the 2 things are not very 
equivalent, in fact to do a transaction you would say

SET AUTOCOMMIT=0
BEGIN WORK

COMMIT (or ROLLBACK)

Note however that MySQL will 'toggle' out of autocommit mode if you initiate 
an explicit transaction, so in fact you can simply BEGIN WORK when you are at 
autocommit =1 and things will be fine. Once you COMMIT the database will go 
back to the standard autocommiting behaviour on its own.


 Randy,
 Tuesday, August 20, 2002, 7:49:09 PM, you wrote:

 RJ  in a innodb table type using mysql max

 RJ  is a begin statement the same as set autocommitt = 0??

 Yes.

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

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




Binary for Alpha EV56

2002-08-21 Thread Timothy Olden

All,

I have been using MySQL version 3.23.33 on my Alpha box for quite a
while now.  A month or two ago I tried to update to mysql-max-4.0.1 only
to learn that the binary was built on an EV6 processor and would not
work on the EV56 chip.

I could but knowing what a pain it would be for me to pull together all
the latest software to build my own... I was hoping MySQL AB might be
able to compile a binary package for an EV56 chip?  Or perhaps someone
has already built a binary that works on my Alpha box (uname and cpuinfo
below)?  BTW the reason I am using the EV56 is because the box was
free...

Upgrading is not a priority, my MySQL server is way underutilized, so if
it proves too time consuming or troublesome I just won't upgrade. 
However, I have an Intel PC operating as my replication slave which is
running 4.0.1 and the lack of symmetry bugs me.  Also I would like to
toy with some of the features in version 4 that are not in 3.23.

Tim

SuSE 7.1 Alpha Edition

uname -a
Linux alpha1 2.4.4 #2 Sun May 6 08:05:48 GMT 2001 alpha unknown

cat /proc/cpuinfo
cpu : Alpha
cpu model   : EV56
cpu variation   : 0
cpu revision: 0
cpu serial number   : Linux_is_Great!
system type : EB164
system variation: LX164
system revision : 0
system serial number: MILO-2.2-17
cycle frequency [Hz]: 5 
timer frequency [Hz]: 1024.00
page size [bytes]   : 8192
phys. address bits  : 40
max. addr. space #  : 127
BogoMIPS: 1059.80
kernel unaligned acc: 17 (pc=fc8c3bfc,va=fc0002447c8c)
user unaligned acc  : 0 (pc=0,va=0)
platform string : N/A
cpus detected   : 0




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

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)

2002-08-21 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.48 (Source distribution)

Environment:

System: Linux witch 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 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/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS='-O2 -march=i486 -mcpu=i686 
 -D_FILE_OFFSET_BITS=64  
-D_LARGEFILE_SOURCE -felide-constructors   
 -fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC: 
-rwxr-xr-x1 root root  1394238 Mar 23 19:34 /lib/libc.so.6
-rw-r--r--1 root root 25361424 Mar 23 19:05 /usr/lib/libc.a
-rw-r--r--1 root root  178 Mar 23 19:05 /usr/lib/libc.so
-rw-r--r--1 root root   869190 Mar 23 20:40 /usr/lib/libc-client.a
lrwxrwxrwx1 root root   20 May  3 20:09 /usr/lib/libc-client.so - 
libc-client.so.2001a
-rwxr-xr-x1 root root   725296 Mar 23 20:40 /usr/lib/libc-client.so.2001a
Configure command: ./configure  --disable-shared --with-mysqld-ldflags=-static 
--with-client-ldflags=-static --without-berkeley-db --without-innodb 
--enable-assembler --enable-large-files --infodir=/usr/share/info --libdir=/usr/lib 
--libexecdir=/usr/sbin --localstatedir=/var/lib/mysql --mandir=/usr/share/man 
--prefix=/usr --sysconfdir=/etc --with-mysqld-user=mysql --without-debug 
--datadir=/usr/share --includedir=/usr/include --with-extra-charsets=complex 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --with-libwrap


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

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




Not sure which list to use - this is a real strange one with ODBC

2002-08-21 Thread Norris, Joseph

Groups,

I have this snippet of code:

$dbh = DBI-connect( dbi:ODBC:${db_name}, $user, $pass)
 or DoError(Unable to connect: $DBI::errstr); 

#$dbh-debug(2);

$fsql = qq!select empl_no_a, user_ln, user_fn, user_mi, aka, 
   longname_a, longname_b, longname_c, useaka from activeempsinfo!; 

$db_action = $dbh-prepare($fsql);
$db_action-execute or DoError(could not do $fsql - $DBI::errstr );

The resource is set up for odbc as a system dsn it is setting on another
drive and I have a batch file running the script that contains the code
above which does the following:

@echo off
net use h: /delete
net use h: \\mcdsssql\hrdata
 
Then runs my script.

OK - here is the problem:
the execute above dies with the following error:

panic: dbd_error on bad handle type at update_from_hr.pl line 48.

However when I allow the debug statment above - it spews all of its debug
infor and the script finishes successfully and updates what it is supposed
to.

ANY IDEAS?? - very perplexing.

Thanks.

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

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




Re: Not sure which list to use - this is a real strange one with ODBC

2002-08-21 Thread Gerald Clark

Why use odbc when native drivers are available?

Norris, Joseph wrote:

Groups,

I have this snippet of code:

$dbh = DBI-connect( dbi:ODBC:${db_name}, $user, $pass)
 or DoError(Unable to connect: $DBI::errstr); 

#$dbh-debug(2);

$fsql = qq!select empl_no_a, user_ln, user_fn, user_mi, aka, 
   longname_a, longname_b, longname_c, useaka from activeempsinfo!; 

$db_action = $dbh-prepare($fsql);
$db_action-execute or DoError(could not do $fsql - $DBI::errstr );

The resource is set up for odbc as a system dsn it is setting on another
drive and I have a batch file running the script that contains the code
above which does the following:

@echo off
net use h: /delete
net use h: \\mcdsssql\hrdata
 
Then runs my script.

OK - here is the problem:
the execute above dies with the following error:

panic: dbd_error on bad handle type at update_from_hr.pl line 48.

However when I allow the debug statment above - it spews all of its debug
infor and the script finishes successfully and updates what it is supposed
to.

ANY IDEAS?? - very perplexing.

Thanks.




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

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




RE: Not sure which list to use - this is a real strange one with ODBC

2002-08-21 Thread Norris, Joseph

Agreed except in this case what I have to read is a FoxPro database -
(yuck!)

-Original Message-
From: Gerald Clark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 11:28 AM
To: Norris, Joseph
Cc: Mysql_List (E-mail); Perl Database (E-mail); Perl Web (E-mail); Perl
Win32 Users (E-mail)
Subject: Re: Not sure which list to use - this is a real strange one
with ODBC


Why use odbc when native drivers are available?

Norris, Joseph wrote:

Groups,

I have this snippet of code:

$dbh = DBI-connect( dbi:ODBC:${db_name}, $user, $pass)
 or DoError(Unable to connect: $DBI::errstr); 

#$dbh-debug(2);

$fsql = qq!select empl_no_a, user_ln, user_fn, user_mi, aka, 
   longname_a, longname_b, longname_c, useaka from activeempsinfo!; 

$db_action = $dbh-prepare($fsql);
$db_action-execute or DoError(could not do $fsql - $DBI::errstr );

The resource is set up for odbc as a system dsn it is setting on another
drive and I have a batch file running the script that contains the code
above which does the following:

@echo off
net use h: /delete
net use h: \\mcdsssql\hrdata
 
Then runs my script.

OK - here is the problem:
the execute above dies with the following error:

panic: dbd_error on bad handle type at update_from_hr.pl line 48.

However when I allow the debug statment above - it spews all of its debug
infor and the script finishes successfully and updates what it is supposed
to.

ANY IDEAS?? - very perplexing.

Thanks.



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

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




where is replication logged?

2002-08-21 Thread Thomas Seifert

Hi folks,

I was just wondering, where I can see, which queries are used from the bin-log.
I am using a setup with ...do-table so I restricted it but I am not sure if all the 
queries
are taken to update the tables.

is there a log where I can see, what was done?
I looked at the relay-log but mysqlbinlog (from 3.x.) didn't show all the lines in 
there!?

And for the records, 3.23.49 as master and 4.0.2 as slave, both on the same machine
with different ports and sockets.

Any ideas?


Thomas

PS: for the filter sql, query

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

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




mysqldump and mysqlimport

2002-08-21 Thread abw

Hello,

Having a problem here. I'm trying to get a Mysql 3.23 database from a Red 
Hat 7 machine over to a Mysql 3.23 on a Solaris Sparcstation.

I was able to dump the database using the mysqldump command. The database 
has 3 tables, and I used the following syntax:

mysqldump -u username -p database table_name  backup.sql

I repeated this for all 3 tables, giving the each sql file a different 
name. From my understanding, I can call the backup file anything I want. 
This seemed to work because each sql file I made had data in it, so all 
seemed well.

I copied the files to the sparc server and did a mysqlimport. I tried:

mysqlimport -u username -p database table_name

I am told that it cannot find the ISM (I think that was the name) file. 
Well, nowhere for the mysqldump that I could find did it mention anything 
about this.

Clearly I am doing something wrong. I searched for hours yesterday and 
searched google for different was to use these commands, but couldn't find 
anything other than the documentation and the syntax used above.

Any suggestions? Am I using mysqldump and mysqlimport correctly? I am 
logged on as root on both machines when I do this, and I have the right 
username and password for the database.

Thanks!
Aaron


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

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 service does not start

2002-08-21 Thread Saeed Karshenas

I did not have any problem installing mysql ver 3.23.52 on Windows NT
workstation or xp pro, however, on Windows 2000 server mysql service
does not start. When I try to start it I get error 1067-the process
terminated unexpectedly. In all cases I install the software on drive D
and create the my.ini file and set environment variables. Any solutions?
Thanks.

 

S. Karshenas


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

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: mysqldump and mysqlimport

2002-08-21 Thread Jesse Sheidlower

On Wed, Aug 21, 2002 at 11:37:57AM -0700, abw wrote:
 Hello,
 
 Having a problem here. I'm trying to get a Mysql 3.23 database from a Red 
 Hat 7 machine over to a Mysql 3.23 on a Solaris Sparcstation.
 
 I was able to dump the database using the mysqldump command. The database 
 has 3 tables, and I used the following syntax:

[...]

 I copied the files to the sparc server and did a mysqlimport. I tried:
 
 mysqlimport -u username -p database table_name
 
 I am told that it cannot find the ISM (I think that was the name) file. 
 Well, nowhere for the mysqldump that I could find did it mention anything 
 about this.
 
 Clearly I am doing something wrong. I searched for hours yesterday and 
 searched google for different was to use these commands, but couldn't find 
 anything other than the documentation and the syntax used above.
 
 Any suggestions? Am I using mysqldump and mysqlimport correctly?

mysqlimport is not the opposite of mysqldump; mysqlimport is used
to bulk-read the contents of textfiles into a MySQL database. 

If you have a mysqldump-generated file of SQL statements, you read
it back into a database with the mysql command, e.g. 

 mysql -u username -p database  backup-file.sql

Jesse Sheidlower

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

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 service does not start

2002-08-21 Thread Iikka Meriläinen

Hello,

See mysql\data\[hostname].err or mysql\data\mysql.err for what might have
gone wrong.

Also, you could try starting your mysqld with the following (not as a
service): mysqld-(max-)nt --console --standalone

Then, if there's something wrong in the error log, you can copy/paste the
last lines of it into here and I or somebody else will figure out what's
wrong.

Regards,
Iikka

Btw, this message would be better suited for the win32 list.

**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**

On Wed, 21 Aug 2002, Saeed Karshenas wrote:

 I did not have any problem installing mysql ver 3.23.52 on Windows NT
 workstation or xp pro, however, on Windows 2000 server mysql service
 does not start. When I try to start it I get error 1067-the process
 terminated unexpectedly. In all cases I install the software on drive D
 and create the my.ini file and set environment variables. Any solutions?
 Thanks.



 S. Karshenas


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

 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: Binary for Alpha EV56

2002-08-21 Thread Lenz Grimmer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi there,

On Wednesday 21 August 2002 20:17, Timothy Olden wrote:

 I have been using MySQL version 3.23.33 on my Alpha box for quite a
 while now.  A month or two ago I tried to update to mysql-max-4.0.1 only
 to learn that the binary was built on an EV6 processor and would not
 work on the EV56 chip.

That's correct. We build our Alpha binary with the Compaq C/C++ compiler on a 
Compaq DS-20, which has an EV6 processor. So far, we only used the compile 
option -fast, which by default optimizes for the platform it is currently 
running on and breaking backwards compatibility. The code will probably cause 
illegal instruction traps for you.

 I could but knowing what a pain it would be for me to pull together all
 the latest software to build my own... I was hoping MySQL AB might be
 able to compile a binary package for an EV56 chip? 

I have now added the compile flag -arch generic, which is supposed to make 
sure the code runs on all Alpha machines - all upcoming releases of MySQL 
will now be compiled with this flag.

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

iD8DBQE9Y+gKSVDhKrJykfIRAqymAJ99BGHPpOlUDpdvlShI6BYLZGhWjQCePJ97
Zf3NuOjhKyLAk3pLAIqYwJo=
=Lkhs
-END PGP SIGNATURE-


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

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




Re: insert command

2002-08-21 Thread Joseph Grundy


- Original Message -
From: Franklin Williams Jr. [EMAIL PROTECTED]
Date: Tue, 20 Aug 2002 18:24:52 -0400
To: Joseph Grundy [EMAIL PROTECTED]
Subject: Re: insert command


  - Original Message -
  From: Keith C. Ivey [EMAIL PROTECTED]
  Date: Tue, 20 Aug 2002 16:50:39 -0400
  To: [EMAIL PROTECTED]
  Subject: Re: insert command
  
  
   On 21 Aug 2002, at 4:27, Joseph Grundy wrote:
   
I need to know if there is a way to do a simple insert from a .txt
file, using insert and only populate one column. Its a streamline
  db
and I want to enter only a few of the columns.

I have exported all data into txt files at this point. I can not
  find
any mention on mysql's site other than doing all rows or leaving
  /n
spots with 3000 records and 35 columns can take a bit of time
   
   If I'm understanding what you want correctly, you need to either
   (1) preprocess your text file (with a line or two of Perl or
  whatever 
   you use for manipulating text files) to remove the columns you
  don't 
   want or (2) import all the columns and just drop the ones you don't 
   want.
   
   In the special case where the columns you do want happen to be the 
   ones at the start of each line, then you should be able to import 
   them with LOAD DATA without modifying the text file.
   
   -- 
   Keith C. Ivey [EMAIL PROTECTED]
   Tobacco Documents Online
   http://tobaccodocuments.org
   
   
  
  
  I have the text files created. 
  
  Example I have a table created lets say prices, in table prices
  there are 15 columns named 1 through 15. I want to be able to 
  populate one column say 8 with data I exported from a column 
  in a different database, using the txt file. Instead of populating
  by row.
  
  I was seeing if there was a way other than 
  nulling all columns but that one I wanted the data to go into.
  To put 2000 records directly into column 8 as above.
  
  Thanks
  
  Joseph.
  
 
 Hi,
 I think McNeil basically answered this oneuse Load data and provide the
 field list for ONLY the columns you wish to populate. Similar to:
 INSERT INTO tablename(fieldlist, ) VALUES(value list, )
 
 The number of items in the VALUE list MUST match the number of fields in the
 field list. Here is the syntax:
 
 LOAD DATA [LOCAL] INFILE 'file_name.txt'
 [REPLACE | IGNORE]
 INTO TABLE 'table_name' 
 [FIELDS
   [TERMINATED BY '\t' or ',']
   [ENCLOSED BY '']
   [ESCAPED BY '\\']
 ]
   
 [LINES TERMINATED BY '\n']
 [IGNORE number LINES]
 [(colname, ...)]
 
 LOCAL specifies client machine...without it mysql assumes file is on server
 REPLACE IGNORE controls duplicates...replace replaces existing rows with the
 same key, IGNORE skips those. leave out and any dups found returns error and
 stops processing.
 So in your case its pretty simple:
 LOAD DATA LOCAL INFILE 'file_name.txt'
 INTO TABLE table_name (colname1, colname2, ...);
 
 The qualifiers in the FIELDS section can be used to designate how the data is
 presented in the infile if that is a concern. You will not need them for a
 single column entry. 
 
 let me know if this DOES NOT work!! hehe 
 Franklin Williams
 
 

For the (colname1) if column was address, table was friends, and txt file was 
data.txt, would it look like this?

LOAD DATA LOCAL INFILE 'data.txt'
INTO TABLE friends (address);

when doing it this way i get error 1148 the used command is not allowed with this 
MySQL version.
also I am doing this on windows machine if that really makes a difference.
Thank you
Joseph

-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


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

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 with a query

2002-08-21 Thread Ajay Patel - SunService


I am a beginner at SQL and would appreciate any help with a simple
query.

I have two tables:

host
patch

The host table contains details for a particular host (OS, cpus, memory, etc)
and the patch table contains patches installed on that host.

For example:

Host:

hostid  hostnameOS  cpusmemory
8000abcdabacus  2.6 4   1024
8001abcequark   2.8 1   512
8008efd1sharp   2.9 2   2048

Patch:

hostid  patchnumber patchversion
8000abcd105181  31
8000abcd109201  01
8000abcd108701  15

8001abce108528  12
8001abce108655  10
8001abce106655  07
.
.
.

I am trying to write a query that would list all hosts that
do not have a particular patch installed.

TIA,
Ajay


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

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: Binary for Alpha EV56

2002-08-21 Thread Timothy Olden

On Wed, 2002-08-21 at 15:20, Lenz Grimmer wrote:

 That's correct. We build our Alpha binary with the Compaq C/C++ compiler on a 
 Compaq DS-20, which has an EV6 processor. So far, we only used the compile 
 option -fast, which by default optimizes for the platform it is currently 
 running on and breaking backwards compatibility. The code will probably cause 
 illegal instruction traps for you.

Yup... illegal instruction that is what happened to me...  It was at
that point I read the documentation about the build and found out why.
What can I say... I am a physicist, I take the experimental approach
first.   :)

 I have now added the compile flag -arch generic, which is supposed to make 
 sure the code runs on all Alpha machines - all upcoming releases of MySQL 
 will now be compiled with this flag.

This is why I love MySQL and MySQL AB... unparalleled database
performance and ease of use, unbeatable customer satisfaction and just
plain great people.

Thanks Lenz

Tim



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

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




[todd@fries.net: Re: Error: CHILD: exit on signal (11)]

2002-08-21 Thread Todd T. Fries

What happens when mysql_fetch_rows() returns a valid pointer to free'd memory?

Is this a bug in the library or ??

To reproduce this I'm running freeradius with about 10 different background
test clients repeatively testing a login feature, at the same time running
a script that randomly sleeps between stop'ing and start'ing the database.

SuSE 7.3# rpm -qa | grep mysql
mysql-shared-3.23.44-5
mysql-client-3.23.44-5

The expectation is that mysql_fetch_row() should either return NULL, as the
documentation suggests, or a valid pointer to valid memory.

I had to run this with electric fence, btw, to catch this.
-- 
Todd Fries .. [EMAIL PROTECTED]

(last updated $ToddFries: signature.p,v 1.2 2002/03/19 15:10:18 todd Exp $)

- Forwarded message from Todd T. Fries [EMAIL PROTECTED] -

Date: Wed, 21 Aug 2002 14:36:08 -0500
From: Todd T. Fries [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Error: CHILD: exit on signal (11)
In-Reply-To: [EMAIL PROTECTED]
X-Operating-System: OpenBSD shadow.fries.net 3.1 GENERIC
X-tra-email: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
X-IM: toddfries@AIM, toddfries@Yahoo, 115268457@ICQ, 
{toddfries,fr[1i]es}@*.irc.fries.net
Precedence: bulk

The code path this follows is ..

rlm_sql.c:static int rlm_sql_authorize(void *instance, REQUEST * request) {
[..]
  ret = rlm_sql_fetch_row(sqlsocket, inst);
 sql_mysql.c:int sql_fetch_row(SQLSOCK * sqlsocket, SQL_CONFIG *config) {
rlm_sql_mysql_sock *mysql_sock = sqlsocket-conn;

sqlsocket-row = mysql_fetch_row(mysql_sock-result);

if (sqlsocket-row == NULL) {
return sql_check_error(mysql_errno(mysql_sock-sock));
}
return 0;
 }


   if (ret) {
radlog(L_ERR, rlm_sql_authorize: query failed);
return RLM_MODULE_FAIL;
   }

   row = sqlsocket-row;
   if (row == NULL) {
radlog(L_ERR, rlm_sql_authorize: no rows returned from query (no such 
user));
return RLM_MODULE_OK;
   }

   if (row[0] == NULL) {
radlog(L_ERR, rlm_sql_authorize: row[0] returned NULL.);
return RLM_MODULE_OK;
   }
   if ((passwd_item = pairmake(User-Password,row[0],T_OP_SET)) != NULL)
pairadd(request-config_items,passwd_item);


Now please help me understand if I'm understanding this right.  It would
appear some kindof failure is happening in the mysql_fetch_row, and it is
instead of returning NULL, returning free'ed memory.  At least my research
suggests it SHOULD return NULL on any failure or valid, allocated memory
on success ...

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

On a side note, perhaps I should release the socket only when the access of
the 'row' pointer is done?  Or perhaps the api should be altered (again) to
pass a pointer array into fetch_row so that the socket can be released without
the potential for over-writing prior results?
-- 
Todd Fries .. [EMAIL PROTECTED]

(last updated $ToddFries: signature.p,v 1.2 2002/03/19 15:10:18 todd Exp $)

Penned by Todd T. Fries on Wed, Aug 21, 2002 at 01:54:34PM -0500, we have:
| ..more..
| 
| (gdb) bt full
| #0  rlm_sql_authorize (instance=0x42735fd0, request=0x42a5bf74)
| at rlm_sql.c:492
| check_tmp = (VALUE_PAIR *) 0x0
| reply_tmp = (VALUE_PAIR *) 0x0
| passwd_item = (VALUE_PAIR *) 0x42a81034
| found = 1
| sqlsocket = (SQLSOCK *) 0x427d1fe8
| row = 0x42a81034
| querystr = SELECT Value,Attribute FROM radcheck WHERE UserName = 'toddtest' 
|AND ( Attribute = 'User-Password' OR Attribute = 'Password' OR Attribute = 
|'Crypt-Password' ) ORDER BY Attribute DESC\000ergroup.GroupName...
| ret = 0
| sqlusername = toddtest, '\000' repeats 509 times
| #1  0x080569f0 in call_modsingle (component=1, sp=0x42729fcc, 
| request=0x42a5bf74, default_result=6) at modcall.c:211
| component = 1
| sp = (modsingle *) 0x42729fcc
| request = (REQUEST *) 0x42a5bf74
| myresult = 1118158708
| #2  0x08056b68 in modcall (component=1, c=0x42729fcc, request=0x42a5bf74)
| at modcall.c:315
| sp = (modsingle *) 0x42a81034
| c = (modcallable *) 0x42729fcc
| ---Type return to continue, or q return to quit---q
| Quit
| (gdb) print row
| $1 = 0x42a81034
| (gdb) print *row
| $2 = 0x42a81040 XKgM9N6tR3Xw2
| (gdb) print row[0]
| $3 = 0x42a81040 XKgM9N6tR3Xw2
| (gdb) 
| 
| -- 
| Todd Fries .. [EMAIL PROTECTED]
| 
| (last updated $ToddFries: signature.p,v 1.2 2002/03/19 15:10:18 todd Exp $)
| 
| Penned by Alan DeKok on Mon, Aug 19, 2002 at 02:42:19PM -0400, we have:
| | Todd T. Fries [EMAIL PROTECTED] wrote:
| |  It seems to happen when the database is doing a hot-backup and is
| |  unresponsive/slow for a few (10-15) minutes.
| | 
| |   If authorization depends on that database, and it goes down for
| | 10-15 minutes, then there's not much point in running the server

RE: help with a query

2002-08-21 Thread Mary Stickney


select hostid,patch.patchnumber from host
left join patch on host.hostid = patch.hostid
where patchnumber isnull


-Original Message-
From: Ajay Patel - SunService [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 2:27 PM
To: [EMAIL PROTECTED]
Subject: help with a query



I am a beginner at SQL and would appreciate any help with a simple
query.

I have two tables:

host
patch

The host table contains details for a particular host (OS, cpus, memory,
etc)
and the patch table contains patches installed on that host.

For example:

Host:

hostid  hostnameOS  cpusmemory
8000abcdabacus  2.6 4   1024
8001abcequark   2.8 1   512
8008efd1sharp   2.9 2   2048

Patch:

hostid  patchnumber patchversion
8000abcd105181  31
8000abcd109201  01
8000abcd108701  15

8001abce108528  12
8001abce108655  10
8001abce106655  07
.
.
.

I am trying to write a query that would list all hosts that
do not have a particular patch installed.

TIA,
Ajay


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

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 with a query

2002-08-21 Thread Gerald Clark



Ajay Patel - SunService wrote:

I am a beginner at SQL and would appreciate any help with a simple
query.

I have two tables:

host
patch

The host table contains details for a particular host (OS, cpus, memory, etc)
and the patch table contains patches installed on that host.

For example:

Host:

hostid hostnameOS  cpusmemory
8000abcd   abacus  2.6 4   1024
8001abce   quark   2.8 1   512
8008efd1   sharp   2.9 2   2048

Patch:

hostid patchnumber patchversion
8000abcd   105181  31
8000abcd   109201  01
8000abcd   108701  15

8001abce   108528  12
8001abce   108655  10
8001abce   106655  07
.
.
.

I am trying to write a query that would list all hosts that
do not have a particular patch installed.

TIA,
Ajay

SELECT patch.hostid
FROM patch left join host
ON patch.hostid=host.hostid
WHERE patchnumber=109201 and host.hostid is NULL;



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

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




getting around lack of subselects in mysql 3.23.*

2002-08-21 Thread Gabriel J Zimmerman


I need to figure out values in a column of a given table that do not 
exist in a a column of another given table without subselects.

For example:

If I have one table called TABLEA with column name id and values 
1,2,3,4,5,6,7,

and another table called TABLEB with column name id and values 3,4,5.

Is there any select statement I can do, which will return records in 
TABLEA with id values 1,2,6,7?

With subselects you could do it as such:
select id from TABLEA where id NOT IN select id from TABLEB

How can I do it in versions of MySQL that don't have subselects 
(multiple steps is fine)?

I really need help on this. Thanks in advance!

Gabe


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

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-based mysql high-availability scheme..

2002-08-21 Thread tom fogal

Hey all, i'm trying to setup a system in which a slave takes over as master in the 
case the master dies.
we're using innodb w/ databases of about 500 megs, so scp/rsyncing those every night 
is a pretty daunting task, not to mention we can never be sure that the secondary DB 
has the most recent data. so, i'm going to setup mysql a mysql slave and have it copy 
all of the data in that manner.

theres some concerns i have though, of course. when the master dies, the slave throws 
in a new my.cnf and starts up as a master; thats fine. but what about when the 
original master comes back up? the secondary/backup database could have had INSERTs to 
it, so the original master must sync those. my solution is just to have the original 
master startup as a slave to the new master.
eventually, everything will sync up. but when? how do i know, and how can i test this? 
when it does, id like everything to switch back.

perhaps theres not a way via mysql commands/variables to do this.. is there a specific 
file structure i could test for? like checking file sizes/existence of files in 
mysql's data/ directory?

also, when switching masters, what exactly is required? from searching some archives, 
it seems like i just need to remove master.info  hostname.index, and then RESET 
MASTER on the master:

'a' is primary/master
'b' is secondary/slave

a goes down, b restarts as a master
a comes back up,
rm's its master.info  hostname.index files
executes RESET MASTER on b
starts up as a slave to dopey

does this sound right? am i going to run into problems are there any other steps that 
should be added, particularly since we use InnoDB tables?

has/is anyone else setting up similar functionality? I noticed linux-ha, but this isnt 
exactly what im looking for.. anybody have anything more generalized?
ill share my results with the list, if i finish it in time..

thanks,

-tom

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

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: inserting into numerical fields fails with non-English locale

2002-08-21 Thread Luc Castermans

This is copied from http://www.openoffice.org/issues/show_bug.cgi?id=6600


Hi,
I encountered that MySQL only ask for english locale and doesn't work
if this locale is not available. As I remember they only ask for
LC_ENGLISH or something like that. Sorry that I could say more about,
I don't know if there exists already a bug by MySQL about this. From
our side we cann't fix the bug. All parameters we submit to the driver
are set via API calls. Our insert statement looks like this insert
into Table1 (?,?,?) so that we supply the orignal value to the ODBC
driver of MySQL. The conversion back into an ACSII string is done by
the driver itself. So the best way to fix this bug, 1. submit a bug to
MySQL, 2. install an englsih locale :-(

Hope this helps.

Best regards,
Ocke

Hi,

Hope you can recognize this as a bug in the driver.

-- 

Luc Castermans
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: getting around lack of subselects in mysql 3.23.*

2002-08-21 Thread Benjamin Pflugmann

Hello.

On Wed 2002-08-21 at 16:49:06 -0400, [EMAIL PROTECTED] wrote:
 
 I need to figure out values in a column of a given table that do not 
 exist in a a column of another given table without subselects.
 
 For example:
 
 If I have one table called TABLEA with column name id and values 
 1,2,3,4,5,6,7,
 
 and another table called TABLEB with column name id and values 3,4,5.
 
 Is there any select statement I can do, which will return records in 
 TABLEA with id values 1,2,6,7?
 
 With subselects you could do it as such:
 select id from TABLEA where id NOT IN select id from TABLEB
 
 How can I do it in versions of MySQL that don't have subselects 
 (multiple steps is fine)?

Well, that is explained in the manual section about missing
sub-selects (it even contains almost exactly your query as example):

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

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: Not sure which list to use - this is a real strange one with ODBC

2002-08-21 Thread Gerald Clark

Then it doesn't belong on the MySQl list, does it?

Norris, Joseph wrote:

Agreed except in this case what I have to read is a FoxPro database -
(yuck!)

-Original Message-
From: Gerald Clark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 11:28 AM
To: Norris, Joseph
Cc: Mysql_List (E-mail); Perl Database (E-mail); Perl Web (E-mail); Perl
Win32 Users (E-mail)
Subject: Re: Not sure which list to use - this is a real strange one
with ODBC


Why use odbc when native drivers are available?

Norris, Joseph wrote:

Groups,

I have this snippet of code:

$dbh = DBI-connect( dbi:ODBC:${db_name}, $user, $pass)
or DoError(Unable to connect: $DBI::errstr); 

#$dbh-debug(2);

$fsql = qq!select empl_no_a, user_ln, user_fn, user_mi, aka, 
  longname_a, longname_b, longname_c, useaka from activeempsinfo!; 

$db_action = $dbh-prepare($fsql);
$db_action-execute or DoError(could not do $fsql - $DBI::errstr );

The resource is set up for odbc as a system dsn it is setting on another
drive and I have a batch file running the script that contains the code
above which does the following:

@echo off
net use h: /delete
net use h: \\mcdsssql\hrdata

Then runs my script.

OK - here is the problem:
the execute above dies with the following error:

panic: dbd_error on bad handle type at update_from_hr.pl line 48.

However when I allow the debug statment above - it spews all of its debug
infor and the script finishes successfully and updates what it is supposed
to.

ANY IDEAS?? - very perplexing.

Thanks.






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

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




Can't build MySQL-3.23.52 with GCC 3.2 on Solaris 7

2002-08-21 Thread Karl A. Anderson

I just joined this list, so I hope my question is appropriate.  I'm trying to 
build mysql-3.23.52 on my UltraEnterprise 3500, running Solaris 7.  I can't use 
a pre-compiled binary because I need to install it in /opt/local rather than 
/usr/local.  I'm using GCC/G++ 3.2, in /opt/local/bin.  My $PATH is:

/opt/local/bin:/usr/ccs/bin:/usr/bin:/usr/sbin

Configuring with

./configure --prefix=/opt/local/mysql

generates no warnings, but make stops with:

Making all in client
make[2]: Entering directory `/opt/local/src/mysql-3.23.52/client'
/bin/sh ../libtool --mode=link g++  -O3 -DDBUG_OFF   -fno-implicit-templates 
-fno-exceptions -fno-rtti -DHAVE_CURSES_H -I/opt/local/src/mysql-3.23.52/include 
-DHAVE_RWLOCK_T  -o mysql  mysql.o readline.o sql_string.o completion_hash.o 
../readline/libreadline.a -lcurses ../libmysql/libmysqlclient.la  -lgen -lsocket 
-lnsl -lm
g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti 
-DHAVE_CURSES_H -I/opt/local/src/mysql-3.23.52/include -DHAVE_RWLOCK_T -o mysql 
mysql.o readline.o sql_string.o completion_hash.o ../readline/libreadline.a 
-lcurses ../libmysql/.libs/libmysqlclient.a -lgen -lsocket -lnsl -lm -lgen 
-lsocket -lnsl -lm
ld: fatal: library -lgcc_s: not found
ld: fatal: library -lgcc_s: not found
ld: fatal: File processing errors. No output written to mysql
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/opt/local/src/mysql-3.23.52/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/src/mysql-3.23.52'
make: *** [all-recursive-am] Error 2

Does anyone have a clue what the problem is?

Karl Anderson
Computer Sciences Corporation,
under contract to U.S. EPA


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

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: getting around lack of subselects in mysql 3.23.*

2002-08-21 Thread Gabriel J Zimmerman


Yes,

I see that now in the docs and it makes perfect sense. Sorry about that. 
My bad.

--Gabe

Benjamin Pflugmann wrote:

 Hello.
 
 On Wed 2002-08-21 at 16:49:06 -0400, [EMAIL PROTECTED] wrote:
 
I need to figure out values in a column of a given table that do not 
exist in a a column of another given table without subselects.

For example:

If I have one table called TABLEA with column name id and values 
1,2,3,4,5,6,7,

and another table called TABLEB with column name id and values 3,4,5.

Is there any select statement I can do, which will return records in 
TABLEA with id values 1,2,6,7?

With subselects you could do it as such:
select id from TABLEA where id NOT IN select id from TABLEB

How can I do it in versions of MySQL that don't have subselects 
(multiple steps is fine)?

 
 Well, that is explained in the manual section about missing
 sub-selects (it even contains almost exactly your query as example):
 
   http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html
 
 Bye,
 
   Benjamin.
 
 



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

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 handling/exit on error

2002-08-21 Thread Clark Wright


Being fairly new to mysql, I'm trying to do the following and coming up 
empty handed.

I'm in the process of writing a set of sql scripts (aka, text files to be 
sourced (\.) inside of the MySQL interpreter)

Ideally, I would like to be able to have the following behaviour:

On error, rollback the current transaction and stop execution.
If, in addition, the source can exit with an error code to facilitate 
nested behavior, all the better.

Why is this all being done via sql scripts and not perl/python/etc?

Because there is no need for a lot of control; in essence it is a bunch of 
create and populate table tasks.  Being able to stop cold on an error in 
these situations would be a great thing.

Any help on how to do on error... would be greatly appreciated.


- clark.


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

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 Table alteration question

2002-08-21 Thread Paul Maine

The following table uses order_id as the primary key. My problem is that I
need to be able to change order_id so that it is not a primary key. Next, I
want to add a new auto incrementing key. What sql commands should I use to
first back up the table and then to accomplish this modification. This is a
production table so I must be very careful.


mysql describe transaction_response;
+---+---+--+-+-+---+
| Field | Type  | Null | Key | Default | Extra |
+---+---+--+-+-+---+
| order_id  | int(11)   |  | PRI | 0   |   |
| result| tinyint(16)   | YES  | | NULL|   |
| pnref | varchar(12)   | YES  | | NULL|   |
| respmsg   | varchar(128)  | YES  | | NULL|   |
| authcode  | varchar(6)| YES  | | NULL|   |
| avsaddr   | char(1)   | YES  | | NULL|   |
| avszip| char(1)   | YES  | | NULL|   |
| timestamp | timestamp(14) | YES  | | NULL|   |
| merchant_name | varchar(20)   | YES  | | NULL|   |
+---+---+--+-+-+---+


Thank You
Paul


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

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




Currency Problem

2002-08-21 Thread delz

Hi,

I just want to know if mysql can set the output of a certain currency to
this pattern :

$1,500.00

If I use a comma on a certain amount then I add it up to another amount with
a comma I get the wrong
answer. I'm using php  mysql by the way.

Any hints on this one?

Regards,

Delz


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

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: Not sure which list to use - this is a real strange one with ODBC

2002-08-21 Thread Jeff Urlwin

I definitely fixed some problems when using Foxpro in DBD::ODBC in the
later/latest versions.  However, I do not believe that ActiveState has
caught up with me yet.  Use search.cpan.org searching for DBD::ODBC to check
the changes information and compare that with the version you are running
now.  I *know* there's a line about finally fixing Foxpro stuff...

I suggest getting the latest and the *latest* binary is on:

ftp://ftp.esoftmatic.com/outgoing/DBI

Get *both* DBI and DBD::ODBC if you use my binaries.  They are a pair.
Better yet, if you have a compiler, build the latest yourself which is
version 0.45_15.

Regards,

Jeff

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of
 Norris, Joseph
 Sent: Wednesday, August 21, 2002 2:35 PM
 To: 'Gerald Clark'; Norris, Joseph
 Cc: Mysql_List (E-mail); Perl Database (E-mail); Perl Web (E-mail); Perl
 Win32 Users (E-mail)
 Subject: RE: Not sure which list to use - this is a real strange one
 with ODBC


 Agreed except in this case what I have to read is a FoxPro database -
 (yuck!)

 -Original Message-
 From: Gerald Clark [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 21, 2002 11:28 AM
 To: Norris, Joseph
 Cc: Mysql_List (E-mail); Perl Database (E-mail); Perl Web (E-mail); Perl
 Win32 Users (E-mail)
 Subject: Re: Not sure which list to use - this is a real strange one
 with ODBC


 Why use odbc when native drivers are available?

 Norris, Joseph wrote:

 Groups,
 
 I have this snippet of code:
 
 $dbh = DBI-connect( dbi:ODBC:${db_name}, $user, $pass)
  or DoError(Unable to connect: $DBI::errstr);
 
 #$dbh-debug(2);
 
 $fsql = qq!select empl_no_a, user_ln, user_fn, user_mi, aka,
longname_a, longname_b, longname_c, useaka from activeempsinfo!;
 
 $db_action = $dbh-prepare($fsql);
 $db_action-execute or DoError(could not do $fsql - $DBI::errstr );
 
 The resource is set up for odbc as a system dsn it is setting on another
 drive and I have a batch file running the script that contains the code
 above which does the following:
 
 @echo off
 net use h: /delete
 net use h: \\mcdsssql\hrdata
 
 Then runs my script.
 
 OK - here is the problem:
 the execute above dies with the following error:
 
 panic: dbd_error on bad handle type at update_from_hr.pl line 48.
 
 However when I allow the debug statment above - it spews all of its debug
 infor and the script finishes successfully and updates what it
 is supposed
 to.
 
 ANY IDEAS?? - very perplexing.
 
 Thanks.
 

 ___
 Perl-Win32-Database mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs




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

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 Quota

2002-08-21 Thread Alex John


Hi,

We want to set quota per user. Is that possible on MySQL ? If so
how can that be done?

Alex




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

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




Keys, Wheres, and Order bys

2002-08-21 Thread Brian Moon

If I have a query like:

select field1 from table where field2=0 order by field3 desc limit 30;

and I have keys:

key field2 (field2)
key field3 (field3)

Will MySQL use one key to select and one to order?  Or do I need a:

key field2_field3 (field2, field3)

This is a big table and i don't want to have to alter it unless I need too.

thanks,

Brian.


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

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

2002-08-21 Thread Dave Reinhardt

this is a php question, try:
http://www.php.net/manual/en/function.number-format.php

 Hi,
 
 I just want to know if mysql can set the output of a certain currency to
 this pattern :
 
 $1,500.00
 
 If I use a comma on a certain amount then I add it up to another amount with
 a comma I get the wrong
 answer. I'm using php  mysql by the way.
 
 Any hints on this one?
 
 Regards,
 
 Delz
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Keys, Wheres, and Order bys

2002-08-21 Thread Dave Reinhardt

try select * from table where field2=0 order by field3 desc limit 30
I think you need the column to compare.

 If I have a query like:
 
 select field1 from table where field2=0 order by field3 desc limit 30;
 
 and I have keys:
 
 key field2 (field2)
 key field3 (field3)
 
 Will MySQL use one key to select and one to order?  Or do I need a:
 
 key field2_field3 (field2, field3)
 
 This is a big table and i don't want to have to alter it unless I need too.
 
 thanks,
 
 Brian.
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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 Connector/J 2.0.14 issue

2002-08-21 Thread anand v

Hi,

I have redhat 7.1 and I am using mysql server 3.23.36
and I could login as a user to the linux server and run
mysql program from the command line and connect to database
I want to and do all SQL commands without any problems...

But when I run a program that has

Class.forName(org.gjt.mm.mysql.Driver).newInstance();
Connection connection = java.sql.DriverManager.getConnection(
 jdbc:mysql://localhost:3306/test);

I am getting this error when I run this code

java.sql.SQLException: Invalid authorization specification: Access denied 
for us
er: '[EMAIL PROTECTED]' (Using password: NO)
at com.mysql.jdbc.MysqlIO.init(Unknown Source)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:199)
at DateTest.main(DateTest.java:20)

But I can connect to this database from command line prompt
without any problems

Thanks

Anand

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

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




Stability of 4.0.x

2002-08-21 Thread Jerry van Leeuwen


I find myself in the position where I really would like to use 4.0.x in a 
production environment where currently 3.23.x is being used. (Mainly because 
of the ability of 4.0.x to use indexes on ORDER BY ... DESC, which are 
currently just too slow).

What I need to know is how stable can I consider the 3.23.x features to be 
inside 4.0.x? ... have there been (m)any recent bugs in the 4.0.x tree for 
features that used to work fine in 3.23.x?

Any indications (especially from the MySQL developers) would be appreciated 
greatly,

  Jerry van Leeuwen

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

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

2002-08-21 Thread Andrew Conkling

Hey, I’m trying to create a db on a server (over which I have no
control) and I keep getting this error:
 
mysqladmin: CREATE DATABASE failed; error: 'Access denied for user:
'@localhost' to database 'musica''
 
Any suggestions?
Andrew

My homepage
http://www.andrewski.fr.st



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

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 can I do this query ? (Join with a preselction)

2002-08-21 Thread Andreas

Hi

I'm just getting started with mysql so please bear with me.  =8-}

I do a 3 table query like:

SELECT a.x, b.y, c.z
FROM a, b, c
WHERE a.b_fk = b.id AND a.c_fk = c.id;

That works so far.

In c can be rows which aren't active anymore.
There is a good_from and a good_until DATETIME field which should be 
respected in the query above. Can I filter the old rows out before I do 
the SELECT ?
I'd like to reduce the workload.

In Access I used to have stored queries that I used as views on the 
tables that have such livetime limitations.
As I understand there are no views available right now.


Thanks ... Andreas


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

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




Getting rid of filesort

2002-08-21 Thread Brian Moon

I have a table:

CREATE TABLE `single_table` (
  `forum_id` int(10) unsigned NOT NULL default '0',
  `id` int(10) unsigned NOT NULL auto_increment,
  `datestamp` datetime NOT NULL default '-00-00 00:00:00',
  `thread` int(10) unsigned NOT NULL default '0',
  `parent` int(10) unsigned NOT NULL default '0',
  `author` varchar(37) NOT NULL default '',
  `subject` varchar(255) NOT NULL default '',
  `email` varchar(200) NOT NULL default '',
  `attachment` varchar(64) NOT NULL default '',
  `host` varchar(50) NOT NULL default '',
  `email_reply` char(1) NOT NULL default 'N',
  `approved` char(1) NOT NULL default 'N',
  `msgid` varchar(100) NOT NULL default '',
  `viewcount` int(11) NOT NULL default '0',
  `modifystamp` int(10) unsigned NOT NULL default '0',
  `userid` int(10) unsigned NOT NULL default '0',
  `body` text NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `forum_id_3` (`forum_id`,`thread`,`modifystamp`,`approved`),
  KEY `approved` (`approved`,`datestamp`),
  KEY `parent` (`parent`),
  FULLTEXT KEY `body` (`body`,`author`,`subject`)
) TYPE=MyISAM


If I run a query like:

select id from single_table where forum_id=5818 and parent=0 order by
modifystamp desc

It runs really slow (a minute) and explain says it is using filesort.

However this query:

select id from single_table where forum_id=5818 and parent=0 order by thread
desc

runs in .2 seconds and does not use a filesort.  Is MySQL using the first
part of forum_id_3 key for this query?  Do I need to create a forum_id,
parent, modifystamp key?

This table has like 1.13 mill rows, so experimenting takes for ever.  That
is normally what I would.  Just try stuff.

Brian.


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

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: Stability of 4.0.x

2002-08-21 Thread Jeremy Zawodny

On Thu, Aug 22, 2002 at 02:40:54PM +1000, Jerry van Leeuwen wrote:
 
 I find myself in the position where I really would like to use 4.0.x in a 
 production environment where currently 3.23.x is being used. (Mainly because 
 of the ability of 4.0.x to use indexes on ORDER BY ... DESC, which are 
 currently just too slow).

That's why we're running it on our slaves.  I just put 4.0.3 on 2 of
them earlier today.  (Well, *my* build of 4.0.3, but I suspect that
it's really close to the offical one coming out.)

I hope to upgrade the master soon too...

 What I need to know is how stable can I consider the 3.23.x features to be 
 inside 4.0.x? ... have there been (m)any recent bugs in the 4.0.x tree for 
 features that used to work fine in 3.23.x?

I've found 4.0.x to be solid.  We've run hundreds of millions of
queries thru it so far.  The ORDER BY optimizaiton is great.  And
we've begun using the query cache in demand mode--very nice too.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 15 days, processed 323,375,166 queries (235/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: Getting rid of filesort

2002-08-21 Thread Jeremy Zawodny

On Wed, Aug 21, 2002 at 11:57:53PM -0500, Brian Moon wrote:
 I have a table:
 
 CREATE TABLE `single_table` (
   `forum_id` int(10) unsigned NOT NULL default '0',
   `id` int(10) unsigned NOT NULL auto_increment,
   `datestamp` datetime NOT NULL default '-00-00 00:00:00',
   `thread` int(10) unsigned NOT NULL default '0',
   `parent` int(10) unsigned NOT NULL default '0',
   `author` varchar(37) NOT NULL default '',
   `subject` varchar(255) NOT NULL default '',
   `email` varchar(200) NOT NULL default '',
   `attachment` varchar(64) NOT NULL default '',
   `host` varchar(50) NOT NULL default '',
   `email_reply` char(1) NOT NULL default 'N',
   `approved` char(1) NOT NULL default 'N',
   `msgid` varchar(100) NOT NULL default '',
   `viewcount` int(11) NOT NULL default '0',
   `modifystamp` int(10) unsigned NOT NULL default '0',
   `userid` int(10) unsigned NOT NULL default '0',
   `body` text NOT NULL,
   PRIMARY KEY  (`id`),
   KEY `forum_id_3` (`forum_id`,`thread`,`modifystamp`,`approved`),
   KEY `approved` (`approved`,`datestamp`),
   KEY `parent` (`parent`),
   FULLTEXT KEY `body` (`body`,`author`,`subject`)
 ) TYPE=MyISAM
 
 
 If I run a query like:
 
 select id from single_table where forum_id=5818 and parent=0 order by
 modifystamp desc
 
 It runs really slow (a minute) and explain says it is using filesort.
 
 However this query:
 
 select id from single_table where forum_id=5818 and parent=0 order by thread
 desc
 
 runs in .2 seconds and does not use a filesort.  Is MySQL using the first
 part of forum_id_3 key for this query?  Do I need to create a forum_id,
 parent, modifystamp key?

That should do the trick, yes.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 15 days, processed 323,657,916 queries (235/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: Keys, Wheres, and Order bys

2002-08-21 Thread Neil Mansilla


On Wed, 21 Aug 2002, Brian Moon wrote:

 If I have a query like:
 select field1 from table where field2=0 order by field3 desc limit 30;
 and I have keys:
 key field2 (field2)
 key field3 (field3)

 Will MySQL use one key to select and one to order?  Or do I need a:

 key field2_field3 (field2, field3)

 This is a big table and i don't want to have to alter it unless I need
 too.

Hi Brian,

In reading this:

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

Two points stick out re: your situation:

  The following queries will use the index to resolve the ORDER BY /
   GROUP BY part:

   ..
   ..
   SELECT * FROM t1 WHERE key_part1=constant ORDER BY key_part2
  

and..

  Some cases where MySQL can not use indexes to resolve the ORDER BY:
   (Note that MySQL will still use indexes to find the rows that matches
   the WHERE clause):

   ..
   The key used to fetch the rows are not the same one that is used to do
   the ORDER BY: SELECT * FROM t1 WHERE key2=constant ORDER BY key1
  

Sorry -- no direct answer, but just in case you haven't read the above, I
hope it helps.  According to that second quote, your ORDER BY will not use
the key on field3 for a speedy order.

Regards,
Neil Mansilla
whatUseek.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




  1   2   >