Re: msvcr70.dll was not found error when double click on desktop icon

2004-03-30 Thread Joe Audette
d r wrote:

I am a personal user who just downloaded the version
4.0 and 
mysql
 

   administrator. The first time I clicked on the 
Administrator icon
   on my desktop I get an error that says failed
   

to start because
 

   msvcr70.dll was not found. Try to reinstall.  I
   

did remove the
 

   program and then reinstalled it and got the same
   

error. I just
 

   purchased a lern mysql book and need to download
   

the 
 

program so I can
   learn it.
   



 


I had this same error and i searched my hard drive and found that file 
and put it in the bin folder where MySqlAdministrator is installed and 
it fixed it. I found it in a folder related to MS Outlook. Hope that 
helps, if you don't find it let me know and I'll send you mine.


Best Regards,

Joe Audette

 




Re: Getting around 2 queries

2004-03-30 Thread Egor Egorov
Scott Haneda [EMAIL PROTECTED] wrote:
 I currently run this, which is 2 hits to the database.
 
 Select serial from blacklist  where serial = '23'
 Select serial from seriallist where serial = '23'
 
 I only desire to know if either of the 2 has at least one row, I am only
 testing for existence here.  Is there some way I can get around 2 queries
 and do this as one?
 

Use UNION:
http://www.mysql.com/doc/en/UNION.html



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




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



Re: Best Performing Hardware/OS/MySQL?

2004-03-30 Thread Tim Cutts
On 29 Mar 2004, at 23:55, Donny Simonton wrote:

SCSI, 15,000 RPM drives and a decent amount of memory 2-16 gigs.  Dual 
procs
definitely do help; we have tried it with dual procs with 
hyperthreading and
without and with hyperthreading seems to be much faster.

Besides that, you can run it on any OS; we use Fedora, with Linux 
2.6.x.
But that's our choice.
Until recently, we ran it mainly on Tru64 Alpha boxes.  We've recently 
been looking at new machines.  Xeon machines running Linux are great if 
your databases are small enough for 2GB to be enough memory for the 
MySQL server.  Many of ours are not (the human genome is 3 billion base 
pairs, for example, so the DNA table alone exceeds 2GB, and that pales 
into insignificance compared to the annotation tables)

For those, we are starting to look at Itanium2 machines running Debian. 
 Like Donny, we're using the 2.6 kernel.  MySQL is about twice as fast 
on an Itanium2 running the 2.6 kernel as it is on the same machine 
running a 2.4 kernel.  We've just received a quad-CPU-Opteron machine 
and will be testing that as soon as we can find an OS for it that 
actually works...

But just say no to IDE drives!
SATA RAID devices aren't that bad, you know, and they are a lot cheaper 
than equivalent amounts of SCSI storage.  We've used NexSan ATABoy 
devices, which are relatively cheap, and get you a lot of storage in 
very little space (10GB in a 3U box).

Having said that, our production MySQL servers disks are 15K RPM 
FibreChannel disks on HP StorageWorks HSV110 controllers, which is 
rather more at the upper end of the scale.  ;-)

Tim

--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute
Hinxton, Cambridge, CB10 1SA, UK
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: msvcr70.dll was not found error when double click on desktop icon

2004-03-30 Thread Carl Fretwell
hi,

msvcr70.dll is part of the Microsoft(r) C Runtime Library v7.

You can download this file free of charge from:
http://www.dll-files.com/cgi-bin/cgiwrap/dll-files/topdown/download.pl?file=msvcr70.zip==

(Copy and paste the above URI into your browsers address bar)

Carl

- Original Message - 
From: Joe Audette [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 8:54 AM
Subject: Re: msvcr70.dll was not found error when double click on desktop
icon


 d r wrote:

 I am a personal user who just downloaded the version
 4.0 and
 mysql
 
 
 administrator. The first time I clicked on the
 Administrator icon
 on my desktop I get an error that says failed
 
 
 to start because
 
 
 msvcr70.dll was not found. Try to reinstall.  I
 
 
 did remove the
 
 
 program and then reinstalled it and got the same
 
 
 error. I just
 
 
 purchased a lern mysql book and need to download
 
 
 the
 
 
 program so I can
 learn it.
 
 
 
 
 
 

  I had this same error and i searched my hard drive and found that file
  and put it in the bin folder where MySqlAdministrator is installed and
  it fixed it. I found it in a folder related to MS Outlook. Hope that
  helps, if you don't find it let me know and I'll send you mine.


 Best Regards,

 Joe Audette

 
 
 





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



Load remains 100% after queries are done

2004-03-30 Thread Mark Scholtens
Hi,

My MySQL server is running on a 2-cpu machine with SMP RedHat 9.0. Currently I'm 
executing a lot of small INSERT-queries on it. My client program is single-threaded 
using the basic mysql-API functions and causes 20% load. The client closes the 
connection to the server upon completion of its tasks.
Speed of the disks is limiting during these inserts. The mysql server process will hit 
100% load on 1 cpu for the duration of the program. 

However when the client program finishes, sometimes the database process will 
keep load at 100%. Sometimes, not always, about 25% chance.
When this happens, the server process also is too busy to accept new connections. 
There's no disk activity. Malloc has dropped to levels before starting my client 
program. The insert queries executed by my client are done correctly, as the tables 
contain the correct amount of data (that is: on file-level divide table size by 
recordsize, or check after restarting the server proces). I have to stop-start the 
database server process in order to make things work again.

I wonder how I can avoid these situations. What could I do wrong/better ?

sincerely,
Mark Scholtens



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



Re: Drop all keys / indexes on a table?

2004-03-30 Thread Victoria Reznichenko
Daevid Vincent [EMAIL PROTECTED] wrote:
 It has come to my attention that we have maxed out our keys due to a stupid
 update script bug. It seemst that we've not been explicitly naming our keys
 and therefore mysql tried to be helpful and adds a new key each time!
 *sigh*.
 
 Is there a SQL command to DROP ALL keys on a table, so I can just ALTER it
 and add them specifically again?
 

Specify several DROP INDEX clause in the single ALTER TABLE statement:
ALTER TABLE table_name DROP INDEX index_name1, DROP INDEX index_name2, .. , 
DROP INDEX index_nameN;


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





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



Re: replicating only certain tables?

2004-03-30 Thread Victoria Reznichenko
Chris Petersen [EMAIL PROTECTED] wrote:
 I'm trying to set up two-way replication between our colo and our office
 (slow DSL line), so our web customers can get the fast speeds of our
 colo, and the people in the office can also get the fast speeds of our
 internal network.
 
 Since our colo machine is logging customer shopping cart info (etc.)
 that we don't need to send down the pipe to the office (and vice versa,
 a lot of stuff happening in-office that doesn't need to go out to the
 main web db box), is there any way to tell the MASTER not to send info? 
 I can only see slave controls in the documentation (things like
 replicate-ignore-table or replicate-do-table), but those don't seem to
 prevent the data from being sent to the slave, only whether or not the
 slave decides to use it.
 

You can restrict logging only on the database level with binlog-do-db/binlog-ignore-db 
options:
http://www.mysql.com/doc/en/Binary_log.html

Take a look also at SET SQL_LOG_BIN command:
http://www.mysql.com/doc/en/SET_SQL_LOG_BIN.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





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



ibdata1 size

2004-03-30 Thread joe collins
HI, 

the ibdata1file in mysql\data has reached a size of 10Mb in just over a
week, the database I have set up is quite limited, only 7 tables with no
more than 12 records in any one table (only evaluating database models on
MySQL at the moment). I have done 4 MySQL dumps and some inserts / updates
etc but all low volume.

Is there some setting I need to have to keep the size of this file down, or
is there a maintenance task to clear it out?

What is the significance of this file?

Any pointers would be greatly appreciated, as my database will be vastly
increased in size and disk space may become an issue.

Many thanks for your patience

Joe

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

Strange error on one table using phpMyAdmin

2004-03-30 Thread Dave G
MySQL users,
I have one table in a database which will not allow me to edit
it in phpMyAdmin. Every time I try to select the row for editing, I get
an error which says tbl_row_delete.php: Missing sql_query.
I have 42 other tables in this database, all of which work fine.
I have attemped to rename, move, and copy the database. I also tried
functions in the Operations tab which I don't understand very well
called Check table, Repair table and Analyze table. All of which
simply reported that my table was OK.
I hope to avoid having to rewrite this entire table, but I am a
loss as to how I can get access to it. It seems the only operation it
will allow me is to either delete rows or drop the whole table. I am a
MySQL beginner and I am most comfortable using it within phpMyAdmin, but
I will try and follow any command line instructions anyone can offer
that might help.

Thank you for your help.

-- 
Yoroshiku!
Dave G
[EMAIL PROTECTED]


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



Re: Creating index on very large table

2004-03-30 Thread Avi Leiberman
Take a look at 
http://lists.mysql.com/mysql/158737
for an interesting 'trick' to optimze index creation.

Basically it amounts to:

* Create the data without indexes
* Move (rename) the table.MYD file to a backup
* Create an empy MYD file using TRUNCATE TABLE
* Add indexes
* Move the backed up MYD file back to table.MYD
* Repair the table using myisamchk -q -r table.MYI

See the post for more details.

-Avi




Hi folks,

I've got a problem creating an index on a MYISAM table with 302,000,000 lines,
roughly 58 GB on disk. Attached you will find the table definition, output
of mysqladmin variables, and mysql -e 'show status'.

After creating the above-mentioned table, I ran:

ALTER TABLE test_table ENABLE KEYS;

loaded the data and then ran (and is currently still runing):

ALTER TABLE test_table ENABLE KEYS;

show processlist reveals;

++--+---+
| Time   | State| Info  |
++--+---+
| 948878 | Repair with keycache | alter table fd_aetna_trad_clm enable keys |

and it's still running! That's roughly 11 days and it's not complete yet!
Here's the current file sizes under the mysql root directory...

-rw-rw1 mysqlmysql61361175364 Mar 18 00:51 test_table.MYD
-rw-rw1 mysqlmysql 7320667136 Mar 29 10:07 test_table.MYI
-rw-rw1 mysqlmysql  10190 Mar 17 21:16 test_table.frm

The box has 1GB of memory and a P4 1.6GHz processor with EIDE disks (dma
enabled) and no raid. The system is Linux  2.4.21-rc7-openmosix with smp
and the filesystem is ext3, running MySQL version 4.0.13-log.

So, if any of you out there have time to look at the attached file, I'd 
greatly
appreciate it. I'd like to know when the index creation will potentially end,
and also if I can get the index creation to complete in a shorter amount of
time, given the memory and cpu specs of the box.

Thanks,

Jeff

=
J. Horner Software
www.jhorner.com
615-347-6899


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



Importing data to existing system

2004-03-30 Thread Scott Haneda
In a bit of a quandary here...

I have a user table and a registered serials table
Table data at end of email...

I have been given a large set of new data, but it is flat file, basically,
it looks just like the user table, with the addition of one field called
serial.

Somehow, I need to take the 100K or so records, which are currently in a
table that is called user_tmp and has the exact same structure as user with
one additional field called serial, copy each field from the user_tmp to the
user table, which should auto-inc the id field, then copy the serial from
the user_tmp table along with the id, and put those in the
Registered_serials, with serial going into serial, and is into user_id.

When all is said and done, I would hope both tables still have the same
number of records in them.

I was going to script this out, but the sheer volume of records make me
think it could fail.

user
+-+---+--+-+-++
| id  | int(11)   |  | PRI | NULL| auto_increment |
| username| varchar(16)   |  | | ||
| password| tinyblob  |  | | ||
| session | varchar(32)   |  | | ||
| first_name  | varchar(48)   |  | | ||
| middle_name | varchar(32)   |  | | ||
| last_name   | varchar(48)   |  | | ||
| name| varchar(255)  |  | | ||
| company | varchar(96)   |  | | ||
| department  | varchar(96)   |  | | ||
| address | varchar(128)  |  | | ||
| address2| varchar(128)  |  | | ||
| city| varchar(64)   |  | | ||
| state   | varchar(64)   |  | | ||
| country | varchar(64)   |  | | ||
| zip | varchar(64)   |  | | ||
| phone   | varchar(48)   |  | | ||
| fax | varchar(48)   |  | | ||
| email   | varchar(40)   |  | | ||
| active  | char(1)   |  | | 0   ||
| updated | timestamp(14) | YES  | | NULL||
| added   | timestamp(14) | YES  | | NULL||
+-+---+--+-+-++

Registered_serials
+--+---+--+-+-++
| Field| Type  | Null | Key | Default | Extra  |
+--+---+--+-+-++
| id   | int(11)   |  | PRI | NULL| auto_increment |
| user_id  | int(11)   |  | | 0   ||
| serial   | varchar(20)   |  | | ||
| product  | varchar(4)|  | | ||
| updated  | timestamp(14) | YES  | | NULL||
| added| timestamp(14) | YES  | | NULL||
+--+---+--+-+-++
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]Novato, CA U.S.A.


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



Re: ERROR ON FOREIGN KEY ON WINDOWS 2000 WITH MYSQL 4.0.18

2004-03-30 Thread Victoria Reznichenko
Massimo Petrini [EMAIL PROTECTED] wrote:
 Somebody can help me ? If you run  the above code in a new db named prova,
 the last line create then error
 Can't create table '.\prova\#sql-654_2e.frm' (errno: 121)
 
 If you run the code on 4.0.17 all it is ok.
 

Thank you for report! Entered to the bug database as:
http://bugs.mysql.com/bug.php?id=3332


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





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



MySQL Connection Failed: Can't create a new thread

2004-03-30 Thread Daniel Martins
I am having problems with the number of simultaneous connections in the
MySQL. I configured 5000 connections but when arriving in 4096 it 
presents the errors below.
MySQL Connection Failed: Can't create a new thread (errno 11). If you 
are not out of available memory, you can consult the manual for a 
possible OS-dependent bug

It follows below the configuration of the Server and the archive my.cnf
Somebody has an idea of as can have 5000 simultaneous connections 
without problems?

MemTotal:  2064404 kB
Intel Dual processors 2.4 Ghz HT
S.O Red Hat 9.0 Kernel 2.4.20-30.9smp
set-variable= max_connections=5000
set-variable= key_buffer=32M
set-variable= max_allowed_packet=2M
set-variable= table_cache=128
set-variable= sort_buffer=1024K
set-variable= net_buffer_length=16K
set-variable= myisam_sort_buffer_size=16M
#set-variable   = log=mysql.log
log-bin
server-id   = 1
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /usr/local/mysql/data/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data/
innodb_log_arch_dir = /usr/local/mysql/data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
set-variable = innodb_buffer_pool_size=1024M
set-variable = innodb_additional_mem_pool_size=4M
# Set .._log_file_size to 25 % of buffer pool size
set-variable = innodb_log_file_size=110M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
set-variable = innodb_lock_wait_timeout=50[mysqldump]
quick
set-variable= max_allowed_packet=32M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
set-variable= key_buffer=40M
set-variable= sort_buffer=40M
set-variable= read_buffer=4Mset-variable= write_buffer=4M
[myisamchk]
set-variable= key_buffer=40M
set-variable= sort_buffer=40M
set-variable= read_buffer=4M
set-variable= write_buffer=4M
[mysqlhotcopy]
interactive-timeout
Daniel
Brazil
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Using mysql_init() when creating a connection

2004-03-30 Thread Ben Whitesell
I'm having some problems with this function. I have a conn.inc file that
each of my web pages accesses to create the connection to my database, and
I'm trying to use the mysql_init() function but am getting a Call to
undefined function: mysql_init() error. Can someone help me with this?
 
Ben Whitesell
Vysys Support Dept.
918.858.6412
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 


MySQL 5.0 - What is really available?

2004-03-30 Thread mike . griffin
I've downloaded and installed 5.0, it seems to be working fine. However, I
need a graphical user interface to create tables and such (when I say I
need, trust me, I need). I'm running on XP (that explains a lot I know)

So:

Is Control Center for 5.0 available?
Is MyODBC 5.0 available?

I'm having a hard time find from the rather extensive 'manual.html' what
other than the actual database engine is available.

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



Re: MySQL 5.0 - What is really available?

2004-03-30 Thread dan
You mention Windows XP.
Check out Mysql-Front (now commercial), version 3 may fit the bill.
not sure. but it was the best windows interface for mysql ever made,
notice, I said best for windows... ;)

mysqlCC rocks, but not sure about 5.0 support.

perhaps you could test it and report, and if its not working, 
maybe you could even do a patch or two? :)

Dan.

On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:

 I've downloaded and installed 5.0, it seems to be working fine. However, I
 need a graphical user interface to create tables and such (when I say I
 need, trust me, I need). I'm running on XP (that explains a lot I know)
 
 So:
 
 Is Control Center for 5.0 available?
 Is MyODBC 5.0 available?
 
 I'm having a hard time find from the rather extensive 'manual.html' what
 other than the actual database engine is available.
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 


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



RE: MySQL 5.0 - What is really available?

2004-03-30 Thread Donny Simonton
Another option is DB Designer 4, http://fabforce.net/dbdesigner4/ never
quite used it because I live by phpmyadmin, but I know a few people who use
it.

Donny

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 30, 2004 10:26 AM
 To: [EMAIL PROTECTED]
 Subject: MySQL 5.0 - What is really available?
 
 I've downloaded and installed 5.0, it seems to be working fine. However, I
 need a graphical user interface to create tables and such (when I say I
 need, trust me, I need). I'm running on XP (that explains a lot I know)
 
 So:
 
 Is Control Center for 5.0 available?
 Is MyODBC 5.0 available?
 
 I'm having a hard time find from the rather extensive 'manual.html' what
 other than the actual database engine is available.
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 



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



Re: ORDER BY WITH NO PRINT

2004-03-30 Thread Seena Blace


Seena Blace [EMAIL PROTECTED] wrote:Hello,
I want to show outpur like this?
Group hostname details
aa  abababa
aa  abababababab
aa  anannanananna
bb  llololololool
bb  ssjjsjsjsjjsjsj

Select group,hostname,details from table1 order by group;

I want the output should be like 
Group hostname details
aa  abababa
 abababababab
 anannanananna
bb  llololololool
 ssjjsjsjsjjsjsj



please advice.
thx -seena


-
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.


-
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

Re: Best Performing Hardware/OS/MySQL?

2004-03-30 Thread Tim Cutts
On 30 Mar 2004, at 09:05, Tim Cutts wrote:

SATA RAID devices aren't that bad, you know, and they are a lot 
cheaper than equivalent amounts of SCSI storage.  We've used NexSan 
ATABoy devices, which are relatively cheap, and get you a lot of 
storage in very little space (10GB in a 3U box).
I did of course mean 10 TB.  10 GB in a 3U box might have been 
impressive ten years ago...  :-)

Tim

--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute
Hinxton, Cambridge, CB10 1SA, UK
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Managing Very Large Tables

2004-03-30 Thread Chad Attermann
Hello,

I am trying to determine the best way to manage very large (MyISAM) tables, ensuring 
that they can be queried in reasonable amounts of time.  One table in particular has 
over 18 million records (8GB data) and is growing by more than 150K records per day, 
and that rate is increasing.  Besides the obvious things like better hardware and 
load-balancing across multiple replicating databases, I am trying to determine how to 
keep these data sets optimized for fastest queries.  In my particular situation, the 
most recent data is queried most often, and data over 30-45 days old is not queried 
much at all but still must remain accessible.  Each record has an integer time column 
that is indexed for querying over periods of time.  Currently I run a script regularly 
that moves records older than 45 days from tables in the main database into identical 
tables in another (archive) database running in the same server process.  This seems 
to speed up the tables in the main database, but I realize that deleting records 
leaves holes in the tables, and that this slows inserts as well as makes it impossible 
to read and write concurrently from these tables.  My question is, is it better to 
keep all of the data in the original tables to avoid holes, or is 'archiving' records 
to another database a wise approach?  How much does the size of a table really affect 
performance when querying the more recent data?  If archiving is reasonable, is there 
a way to optimize the tables to get rid of the holes without siginificantly impacting 
ongoing activity on these tables?

Thanks for your time!

Chad Attermann
[EMAIL PROTECTED]


Re: MySQL 5.0 - What is really available?

2004-03-30 Thread Martijn Tonies
Hi Mike,



 I've downloaded and installed 5.0, it seems to be working fine. However, I
 need a graphical user interface to create tables and such (when I say I
 need, trust me, I need). I'm running on XP (that explains a lot I know)

 So:

 Is Control Center for 5.0 available?
 Is MyODBC 5.0 available?

You might want to give Database Workbench a try - although
it currently supports MySQL 4 and 4.1, it works fine with 5.0 -
except for the Stored Procedures/Functions support, which will
be added soon.

Download a trial at www.upscene.com

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL  MS SQL
Server.
Upscene Productions
http://www.upscene.com


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



Re: Managing Very Large Tables

2004-03-30 Thread Victor Medina
hi!
Chad Attermann wrote:
Hello,

I am trying to determine the best way to manage very large (MyISAM) tables, ensuring that they can be queried in reasonable amounts of time.  
--8
Why insisting in using myIsam, and not use some table format that can 
assure you some degree of crash recovery and transacctional state like 
innodb or bdb? 150k inserts a day is a quiete important number, i don't 
think myisam is an optimal solution for such a data base structure.

Just my two cents my friends! =)

Best Regards!
--
 |...|
 |  _    _|Victor Medina M   |
 |\ \ \| |  _ \ / \   |Linux - Java - MySQL  |
 | \ \ \  _| | |_) / _ \  |Dpto. Sistemas - Ferreteria EPA   |
 | / / / |___|  __/ ___ \ |[EMAIL PROTECTED]  |
 |/_/_/|_|_| /_/   \_\|Tel: +58-241-8507325 - ext. 325   |
 ||Cel: +58-412-8859934  |
 ||geek by nature - linux by choice  |
 |...|
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL 5.0 - What is really available?

2004-03-30 Thread Karam Chand
Hello,

I prefer SQLyog. www.webyog.com

Karam

--- Martijn Tonies [EMAIL PROTECTED] wrote:
 Hi Mike,
 
 
 
  I've downloaded and installed 5.0, it seems to be
 working fine. However, I
  need a graphical user interface to create tables
 and such (when I say I
  need, trust me, I need). I'm running on XP (that
 explains a lot I know)
 
  So:
 
  Is Control Center for 5.0 available?
  Is MyODBC 5.0 available?
 
 You might want to give Database Workbench a try -
 although
 it currently supports MySQL 4 and 4.1, it works fine
 with 5.0 -
 except for the Stored Procedures/Functions support,
 which will
 be added soon.
 
 Download a trial at www.upscene.com
 
 With regards,
 
 Martijn Tonies
 Database Workbench - developer tool for InterBase,
 Firebird, MySQL  MS SQL
 Server.
 Upscene Productions
 http://www.upscene.com
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   

http://lists.mysql.com/[EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



RE: Managing Very Large Tables

2004-03-30 Thread Henrik Schröder
I did some tests with 20GB tables and several millions of rows a few months
back, and what helped improve the performance the most was to separate the
(small) columns used for searching from the (large) columns containing data.
My test table was from a messaging system, and I redesigned it so that the
larger table hold only a message-id and some TEXT-fields, and the smaller
table held all usernames, timestamps, and other columns used for selecting
and sorting.

Using the older table design, I tried to set the primary key as optimal as
possible so that the most frequently run query could use it directly.
However, since I used InnoDB, the primary key *is* the table, doing index
searches is rather slow simply because of the amount of disk you have to
traverse to get to the index. Adding secondary indexes and forcing the
queries to use them did not help.

When I changed the structure, the info table shrunk to a few hundred MB, and
searches in that smaller table and index was considerably faster. Getting
data from the data table was also very fast, since all access to it was
reduced to primary key lookups instead of index scans. All of this combined
made my queries go ten(!) times faster.

I don't know if you can do the same, if you have large data-columns you can
split off, but if you do, it won't hurt that much to try. :-)

I also don't know how MyISAM compares to InnoDb in this specific case, maybe
the result is smaller for MyISAM because of the difference in how the
primary key is created and used.


/Henrik 

-Original Message-
From: Chad Attermann [mailto:[EMAIL PROTECTED] 
Sent: den 30 mars 2004 19:42
To: [EMAIL PROTECTED]
Subject: Managing Very Large Tables


Hello,

I am trying to determine the best way to manage very large (MyISAM) tables,
ensuring that they can be queried in reasonable amounts of time.  One table
in particular has over 18 million records (8GB data) and is growing by more
than 150K records per day, and that rate is increasing.  Besides the obvious
things like better hardware and load-balancing across multiple replicating
databases, I am trying to determine how to keep these data sets optimized
for fastest queries.  In my particular situation, the most recent data is
queried most often, and data over 30-45 days old is not queried much at all
but still must remain accessible.  Each record has an integer time column
that is indexed for querying over periods of time.  Currently I run a script
regularly that moves records older than 45 days from tables in the main
database into identical tables in another (archive) database running in the
same server process.  This seems to speed up the tables in the main
database, but I realize that deleting records leaves holes in the tables,
and that this slows inserts as well as makes it impossible to read and write
concurrently from these tables.  My question is, is it better to keep all of
the data in the original tables to avoid holes, or is 'archiving' records to
another database a wise approach?  How much does the size of a table really
affect performance when querying the more recent data?  If archiving is
reasonable, is there a way to optimize the tables to get rid of the holes
without siginificantly impacting ongoing activity on these tables?

Thanks for your time!

Chad Attermann
[EMAIL PROTECTED]

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



storing files in blob field

2004-03-30 Thread Michael Scholz
Hello,

i try to store some files into a blob-fields of a myisam-table at mysql 4.1.
If the file includes bytes with hex-value 00, mysql will only store the bytes before 
this ' 0-byte ' .
How can i store a file including bytes with value 00?

Thanks,

Michael Scholz

RE: Managing Very Large Tables

2004-03-30 Thread Dathan Vance Pattishall
Tips on managing very large tables for myISAM:

1) Ensure that the table type is not DYNAMIC but Fixed.
  = Issue the show table status command. 
  =  Look at Row Format
  = if Row Format != Dynamic the your ok else get rid of varchar type
columns
  = Reason:
Your myISAM table can grow only to 4GB then it will run out
of space even if your file system allows files to grow past 4GB.

2) For selects avoid ranges i.e. SELECT * FROM BLAH WHERE column  NOW() -
INTERVAL 30 DAY
 == or increase range_alloc field in my.cnf


3) For pruning as described below, in a maintenance window run optimize
table or 
myisamchk -r -S -a yourtable.MYI to get rid of deleted blocks. This will
help keep your query speed consistent and disk utilization lower.

4) Ensure that mysql_safe is off so you can get the benefits of simulatenous
reads or simulatenous writes. 

5) add --low-priority-update to allow writes to happen in batches after
reads have finished.



 -Original Message-
 From: Chad Attermann [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 30, 2004 9:42 AM
 To: [EMAIL PROTECTED]
 Subject: Managing Very Large Tables
 
 Hello,
 
 I am trying to determine the best way to manage very large (MyISAM)
 tables, ensuring that they can be queried in reasonable amounts of time.
 One table in particular has over 18 million records (8GB data) and is
 growing by more than 150K records per day, and that rate is increasing.
 Besides the obvious things like better hardware and load-balancing across
 multiple replicating databases, I am trying to determine how to keep these
 data sets optimized for fastest queries.  In my particular situation, the
 most recent data is queried most often, and data over 30-45 days old is
 not queried much at all but still must remain accessible.  Each record has
 an integer time column that is indexed for querying over periods of time.
 Currently I run a script regularly that moves records older than 45 days
 from tables in the main database into identical tables in another
 (archive) database running in the same server process.  This seems to
 speed up the tables in the main database, but I realize that deleting
 records leaves holes in the tables, and that this slows inserts as well as
 makes it impossible to read and write concurrently from these tables.  My
 question is, is it better to keep all of the data in the original tables
 to avoid holes, or is 'archiving' records to another database a wise
 approach?  How much does the size of a table really affect performance
 when querying the more recent data?  If archiving is reasonable, is there
 a way to optimize the tables to get rid of the holes without
 siginificantly impacting ongoing activity on these tables?
 
 Thanks for your time!
 
 Chad Attermann
 [EMAIL PROTECTED]



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



RE: Getting around 2 queries

2004-03-30 Thread Matt Chatterley
One option would be to 'union' the two queries (assuming the columns are the
same type and length), allowing you to run one query string:

Select serial from blacklist where serial = x
Union
Select serial from seriallist where serial = x

Would return 1 or 2 rows, depending on whether rows are found in one table
or both. You wouldn't know which table though (but from your message, I
guess that is unimportant).

I suppose there are a number of things you could do, really...


Regards,

Matt

-Original Message-
From: Scott Haneda [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2004 07:39
To: MySql
Subject: Getting around 2 queries

I currently run this, which is 2 hits to the database.

Select serial from blacklist  where serial = '23'
Select serial from seriallist where serial = '23'

I only desire to know if either of the 2 has at least one row, I am only
testing for existence here.  Is there some way I can get around 2 queries
and do this as one?

-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]Novato, CA U.S.A.


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




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



Re: Difficult query and am kinda stuck how to continue can someone help?

2004-03-30 Thread Timon Berkowitz
Hi there,


I have tried that query it works, but not good enough

When you add in Table2 another row with softid 1 and without the string 'test' in it 
like this :

softid| nameofcd   
1test cd 1  
2utils cd 1
3test cd 2 
4backup

id| softid| nameofsoftware
1   1test software
2   1software
3   2software
4   2software
5   1software

the query you used will give the following result

softid   nameofcd   nameofsoftware
1 test cd 1
1 test cd 1
1 test cd 1test software
3 test cd 2

Thats incorrect because I want to see only
- all cds that matches the string 'test'
- all pieces of software that matches the string 'test'

So the result has to be like this

softid   nameofcd   nameofsoftware
1 test cd 1
1 test cd 1test software
3 test cd 2

I hope I have made myself a little bit more clear

By the way, Thank you for the quick response!

Kind regards,

Timon Berkowitz
The Netherlands


RE: ibdata1 size

2004-03-30 Thread Dathan Vance Pattishall


 -Original Message-
 From: joe collins [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 30, 2004 1:26 AM
 To: MySQL
 Subject: ibdata1 size
 
 HI,
 
 the ibdata1file in mysql\data has reached a size of 10Mb in just over a
 week, the database I have set up is quite limited, only 7 tables with no
 more than 12 records in any one table (only evaluating database models on
 MySQL at the moment). I have done 4 MySQL dumps and some inserts / updates
 etc but all low volume.
 
 Is there some setting I need to have to keep the size of this file down,
 or
 is there a maintenance task to clear it out?


You can turn autoextend off. Add another disk and extend another data file
onto it as autoextend. Remember INNODB is a virtual file system, it also
stores the index file (3.X - 4.0.X) in a single file. It also uses a page
system (16KB by default), this page system does not map to the block disk
device per say. Additionally as it rebalances the Btree it will expand and
contract from time to time. In most cases it will expand unless you delete
rows.

Blobs are particularly affected from innodb. Use myISAM tables for blobs.
 
 
 What is the significance of this file?
 
 Any pointers would be greatly appreciated, as my database will be vastly
 increased in size and disk space may become an issue.
 
 Many thanks for your patience
 
 Joe




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



RE: Managing Very Large Tables

2004-03-30 Thread Keith C. Ivey
On 30 Mar 2004 at 10:30, Dathan Vance Pattishall wrote:

 1) Ensure that the table type is not DYNAMIC but Fixed.
   = Issue the show table status command. 
   =  Look at Row Format
   = if Row Format != Dynamic the your ok else get rid of varchar type
 columns
   = Reason:
   Your myISAM table can grow only to 4GB then it will run out
 of space even if your file system allows files to grow past 4GB.

There are reasons for using fixed-length rather than dynamic records, 
but that's not one of them.  If you set MAX_ROWS high enough when 
creating your tables (or alter it later after they get big, though 
that could take a while), they'll be able to grow past 4 GB even if 
they're dynamic.

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


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



Re: Managing Very Large Tables

2004-03-30 Thread Jeremy Zawodny
On Tue, Mar 30, 2004 at 10:30:03AM -0800, Dathan Vance Pattishall wrote:
 Tips on managing very large tables for myISAM:
 
 1) Ensure that the table type is not DYNAMIC but Fixed.
   = Issue the show table status command. 
   =  Look at Row Format
   = if Row Format != Dynamic the your ok else get rid of varchar type
 columns
   = Reason:
   Your myISAM table can grow only to 4GB then it will run out
 of space even if your file system allows files to grow past 4GB.

That's a common mis-conception:

  http://jeremy.zawodny.com/blog/archives/000796.html

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

MySQL 4.0.15-Yahoo-SMP: up 198 days, processed 3,392,217,207 queries (197/sec. avg)

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



From SQL Server: Jobs

2004-03-30 Thread Matt Chatterley
Hi all,

I hope I've chosen a suitable list for this post. If not, please feel free
to redirect me! :)

By day, I am a SQL Server (and .NET) programmer. By night, my current
project (a space-based trading/strategy game to be delivered on the web,
should anyone be interested in contacting me off-list) is being constructed
in PHP (primarily - some light javascript is bound to work its way in, and
there are plans for a java applet chat client to be integrated into the
pages), with a MySQL 5.0 back-end.

I'm currently prototyping, and trying out a few things which I wish to
implement in the long run - hence why I'm using MySQL 5, to try it out (and
because I want to house data-related logic IN the database itself - so
Stored Procedures are a must).

In-between lamenting the lack of views, one of the things I most miss from
SQL Server, and which I need, is the Job System. For those unfamiliar with
the concept from SQL Server, it is a way to set up one-shot or scheduled
tasks to run within the database - these execute SQL statements when run,
and can be started manually, from a procedure call, or from a schedule.

My current prototype involves creating a small schema, with associated
stored procedures, and a PHP script which runs a simple loop, detecting
which jobs are cached for execution and then, based on the job-code, loading
an XML definition file, creating and executing the required SQL statements.
For the most part these will be parameterized Stored Procedures - the 'cache
data' will dictate the parameters to be passed in.

A future implementation (if the project ever reaches fruition and opens to
the public) will likely be based in VB or Java (since those are the two
application languages I am most comfortable with -- most likely Java, as
then I can run it on both Linux and Windows) and will be dual-mode - running
either as a monitoring console, or an 'authoritative instance' which
actually provides the loop and executes the queries.

To the point. My question: Has anyone out there attempted (or seen
attempted) such a thing for MySQL?

The need has arisen from the fact that I will need to run a number of
regular maintenance jobs (such as a map-expansion routine, and various
statistical updates) as well as some ad-hoc processes which I would prefer
to handle outside of page requests (these would be 'one shot' jobs).

I'm really fishing for comments and suggestions as to this implementation -
particularly if there are any fatal flaws in my theory, or if it has already
been done - Wheel reinvention is not one of my favourite pastimes!!


Many thanks,


Matt.





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



RE: How to get around lack of views?

2004-03-30 Thread Matt Chatterley
The only idea which presents itself (be warned, this is ugly) is to maintain
a set of tables which hold the same data, partitioned out by privilege, and
to grant access on those tables to appropriate users.

These tables could be maintained (or recreated) from the source data at
regular intervals.

Leaves a lot to be desired though, since data consistency (and age) can
become issues if updates are frequent... If the data is relatively static,
it's just a bit messy.


Regards,

Matt

-Original Message-
From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED] 
Sent: 29 March 2004 21:58
To: [EMAIL PROTECTED]
Subject: How to get around lack of views?


How would I do this?


Let say I have an employee table with

Name  varchar(64)
Dept  int(11);
Salary int(11);

I want to grant select on Salary to a mysql user but only where dept = 1
let's say.

Normally I would create a view to do something like this.
But I was wondering if there would be another way around this until views
are implemented that someone has thought of.

Thanks,
Mike







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




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



Re: From SQL Server: Jobs

2004-03-30 Thread Gabriel Guzman
On Tuesday 30 March 2004 10:53 am, Matt Chatterley wrote:
 Hi all,

hello.

snip
 In-between lamenting the lack of views, one of the things I most miss from
 SQL Server, and which I need, is the Job System. For those unfamiliar with
 the concept from SQL Server, it is a way to set up one-shot or scheduled
 tasks to run within the database - these execute SQL statements when run,
 and can be started manually, from a procedure call, or from a schedule.
/snip

maybe I am missing something, but why not just use cron?  you can even write 
'command line' php scripts and have cron execute them at your convienience.  
Then, you can 1. run the scripts manually (from the command line), 2. have 
cron run them from a schedule or 3. exec them from a function.

seems like what you want IMO. 
 
gabe. 

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



Re: Best Performing Hardware/OS/MySQL?

2004-03-30 Thread Jochem van Dieten
Tim Cutts wrote:
On 30 Mar 2004, at 09:05, Tim Cutts wrote:

SATA RAID devices aren't that bad, you know, and they are a lot 
cheaper than equivalent amounts of SCSI storage.  We've used NexSan 
ATABoy devices, which are relatively cheap, and get you a lot of 
storage in very little space (10GB in a 3U box).
I did of course mean 10 TB.  10 GB in a 3U box might have been 
impressive ten years ago...  :-)
Are you having any problems with the SATA drives 'lying' 
(reporting a write when the data is actually in the write-cache 
of the disks and not on the platters)?

Jochem

--
I don't get it
immigrants don't work
and steal our jobs
- Loesje
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: replicating only certain tables?

2004-03-30 Thread Chris Petersen
 You can restrict logging only on the database level with 
 binlog-do-db/binlog-ignore-db options:
   http://www.mysql.com/doc/en/Binary_log.html

I don't want to restrict logging, only replication.

I think I figured it out, though, despite the fact that the
documentation is completely inadequate on the subject (couldn't find any
info at all about this).  The documentation reads:

Each slave server receives from the master the saved updates 
that the master has recorded in its binary log, so that the 
slave can execute the same updates on its copy of the data.

I read this as the master sending all of its log data to the slave, and
the slave then parsing that data according to its ignore-db and/or
ignore-table  settings.  However, another admin informed me that the
slave actually connects to the master and uses some kind of pseudo-query
to grab only the log data that it wants.  Thus, data from any table
listed with replicate-ignore-table is never actually downloaded to the
slave at all.  Since the documentation is aimed more at
replication-for-efficiency rather than replication-for-redundancy, it
talks about updating and replicating but doesn't refer directly to
how the data transfer itself works.  It's rather annoying.

-Chris


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



Re: replicating only certain tables?

2004-03-30 Thread Peter Brawley
Chris,

Agreed that the replication section could be written more clearly, but is
not the information you are looking for in section 6.3 Replication
Implementation Details, section 6.6 features  problems, 6.7 startup options
and 6.8 FAQ?

PB
  - Original Message -
  From: Chris Petersen
  To: [EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 1:20 PM
  Subject: Re: replicating only certain tables?


   You can restrict logging only on the database level with
binlog-do-db/binlog-ignore-db options:
   http://www.mysql.com/doc/en/Binary_log.html

  I don't want to restrict logging, only replication.

  I think I figured it out, though, despite the fact that the
  documentation is completely inadequate on the subject (couldn't find any
  info at all about this).  The documentation reads:

  Each slave server receives from the master the saved updates
  that the master has recorded in its binary log, so that the
  slave can execute the same updates on its copy of the data.

  I read this as the master sending all of its log data to the slave, and
  the slave then parsing that data according to its ignore-db and/or
  ignore-table  settings.  However, another admin informed me that the
  slave actually connects to the master and uses some kind of pseudo-query
  to grab only the log data that it wants.  Thus, data from any table
  listed with replicate-ignore-table is never actually downloaded to the
  slave at all.  Since the documentation is aimed more at
  replication-for-efficiency rather than replication-for-redundancy, it
  talks about updating and replicating but doesn't refer directly to
  how the data transfer itself works.  It's rather annoying.

  -Chris


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




Transaction Not supported

2004-03-30 Thread Mike Blezien
Hello,

I keep getting this error when attempting to utilize a database that has Innodb 
tables, and using transactions. This is from a Perl/DBI script too:

Error:
Transactions not supported by database at module. bla..bla
I realize this maybe a DBI question, but I thought I'd check here first incase 
we missed something is the settings for the MySQL server

Version: 4.0.17-standard - Official MySQL-standard binary
and it has innodb enabled, the autocommit is set to 1, then when the transaction 
is executed, the autocommit is set to 0 untill the commit is called

Is there something in the variables I can check to make sure transaction have 
been enabled ??

TIA
--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Quality Web Hosting
http://www.justlightening.net
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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


RE: Drop all keys / indexes on a table?

2004-03-30 Thread Daevid Vincent
Ugh. I was afraid you were going to say that...  
Seriously, there's no way to just 'wildcard' ALL indexes, someone should add
that as a feature request. We're using 4.0.17 BTW.

What happens if I list out all the indexes that there _could_ be in one
ALTER line like that, and one of the indexes doesn't actually exist? Will
the whole ALTER fail?

Here's the situation, I wrote a script that runs recursively through a
directory and applies all the .sql files it finds (in alpha order). This
script runs as part of a client update, and doesn't necessarily run the same
number of times for everyone. So, some clients may have extra indexes:
foo_1, foo_2, foo_3, ... foo_15 etc. (the problem at hand), and other
clients may just have: foo_1, foo_2, foo_3. 

 -Original Message-
 From: Victoria Reznichenko [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 30, 2004 12:48 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Drop all keys / indexes on a table?
 
 Daevid Vincent [EMAIL PROTECTED] wrote:
  It has come to my attention that we have maxed out our keys 
 due to a stupid
  update script bug. It seemst that we've not been explicitly 
 naming our keys
  and therefore mysql tried to be helpful and adds a new key 
 each time!
  *sigh*.
  
  Is there a SQL command to DROP ALL keys on a table, so I 
 can just ALTER it
  and add them specifically again?
  
 
 Specify several DROP INDEX clause in the single ALTER TABLE statement:
   ALTER TABLE table_name DROP INDEX index_name1, DROP 
 INDEX index_name2, .. , DROP INDEX index_nameN;
 
 
 -- 
 For technical support contracts, goto 
 https://order.mysql.com/?ref=ensita
 This email is sponsored by Ensita.net http://www.ensita.net/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
 /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
___/   www.mysql.com
 
 
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 


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



Re: How to get around lack of views?

2004-03-30 Thread Jeremy Zawodny
On Mon, Mar 29, 2004 at 03:58:29PM -0500, Michael J. Pawlowsky wrote:
 
 How would I do this?
 
 
 Let say I have an employee table with
 
 Name  varchar(64)
 Dept  int(11);
 Salary int(11);
 
 I want to grant select on Salary to a mysql user but only where dept = 1 let's say.
 
 Normally I would create a view to do something like this.
.
 But I was wondering if there would be another way around this until
 views are implemented that someone has thought of.

Honestly, if you need views at the db level, MySQL is not for you.

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

MySQL 4.0.15-Yahoo-SMP: up 198 days, processed 3,393,557,554 queries (197/sec. avg)

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



Re: Drop all keys / indexes on a table?

2004-03-30 Thread PeterWR
Hi,

Take at look at CHECK TABEL - as far as I remember, the CHECK TABLE EXTENDED
will do a re-index (check index), otherwise some of the other OPTIMIZE, etc.
can help on this.

Take a look in the exellent manual.

Best regards
Peter


- Original Message - 
From: Daevid Vincent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 9:44 PM
Subject: RE: Drop all keys / indexes on a table?


 Ugh. I was afraid you were going to say that...
 Seriously, there's no way to just 'wildcard' ALL indexes, someone should
add
 that as a feature request. We're using 4.0.17 BTW.

 What happens if I list out all the indexes that there _could_ be in one
 ALTER line like that, and one of the indexes doesn't actually exist? Will
 the whole ALTER fail?

 Here's the situation, I wrote a script that runs recursively through a
 directory and applies all the .sql files it finds (in alpha order). This
 script runs as part of a client update, and doesn't necessarily run the
same
 number of times for everyone. So, some clients may have extra indexes:
 foo_1, foo_2, foo_3, ... foo_15 etc. (the problem at hand), and other
 clients may just have: foo_1, foo_2, foo_3.

  -Original Message-
  From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 12:48 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Drop all keys / indexes on a table?
 
  Daevid Vincent [EMAIL PROTECTED] wrote:
   It has come to my attention that we have maxed out our keys
  due to a stupid
   update script bug. It seemst that we've not been explicitly
  naming our keys
   and therefore mysql tried to be helpful and adds a new key
  each time!
   *sigh*.
  
   Is there a SQL command to DROP ALL keys on a table, so I
  can just ALTER it
   and add them specifically again?
  
 
  Specify several DROP INDEX clause in the single ALTER TABLE statement:
  ALTER TABLE table_name DROP INDEX index_name1, DROP
  INDEX index_name2, .. , DROP INDEX index_nameN;
 
 
  -- 
  For technical support contracts, goto
  https://order.mysql.com/?ref=ensita
  This email is sponsored by Ensita.net http://www.ensita.net/
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
   / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
  /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
 ___/   www.mysql.com
 
 
 
 
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 


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




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



Re: replicating only certain tables?

2004-03-30 Thread Chris Petersen
 Agreed that the replication section could be written more clearly, but is
 not the information you are looking for in section 6.3 Replication
 Implementation Details, section 6.6 features  problems, 6.7 startup options
 and 6.8 FAQ?

You must be reading a different manual than me
(http://www.mysql.com/doc/en/Replication.html), some of your section
numbers are all different than what I see.  Anyway...

6.3 (Replication Implementation Details) seems to disagree with my
previous findings, describing the download slave thread as simply
downloading everything the master sends to it.   However, it says
nothing about whether or not the request thread tells the master to or
not to send certain tables/databases.  I can't find anything related
anywhere sle in the replication documentation section about this,
either.

-Chris


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



Re: Difficult query and am kinda stuck how to continue can someone help?

2004-03-30 Thread Peter Brawley
Timon,

What is unclear to me is whether you wish to AND or OR your two criteria ...

- all cds that matches the string 'test'
- all pieces of software that matches the string 'test'

so if your table2 had (6, 2, 'test'), where table1.nameofcd for softid=2
does not contain 'test', do you want it in your result?

PB
  - Original Message -
  From: Timon Berkowitz
  To: [EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 12:34 PM
  Subject: Re: Difficult query and am kinda stuck how to continue can
someone help?


  Hi there,


  I have tried that query it works, but not good enough

  When you add in Table2 another row with softid 1 and without the string
'test' in it like this :

  softid| nameofcd
  1test cd 1
  2utils cd 1
  3test cd 2
  4backup

  id| softid| nameofsoftware
  1   1test software
  2   1software
  3   2software
  4   2software
  5   1software

  the query you used will give the following result

  softid   nameofcd   nameofsoftware
  1 test cd 1
  1 test cd 1
  1 test cd 1test software
  3 test cd 2

  Thats incorrect because I want to see only
  - all cds that matches the string 'test'
  - all pieces of software that matches the string 'test'

  So the result has to be like this

  softid   nameofcd   nameofsoftware
  1 test cd 1
  1 test cd 1test software
  3 test cd 2

  I hope I have made myself a little bit more clear

  By the way, Thank you for the quick response!

  Kind regards,

  Timon Berkowitz
  The Netherlands


RE: How to get around lack of views?

2004-03-30 Thread Little, Tim
Wouldn't some variation on a MERGE table help with this?

-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 2:45 PM
To: Michael J. Pawlowsky
Cc: [EMAIL PROTECTED]
Subject: Re: How to get around lack of views?


On Mon, Mar 29, 2004 at 03:58:29PM -0500, Michael J. Pawlowsky wrote:
 
 How would I do this?
 
 
 Let say I have an employee table with
 
 Name  varchar(64)
 Dept  int(11);
 Salary int(11);
 
 I want to grant select on Salary to a mysql user but only where dept = 1
let's say.
 
 Normally I would create a view to do something like this.
.
 But I was wondering if there would be another way around this until
 views are implemented that someone has thought of.

Honestly, if you need views at the db level, MySQL is not for you.

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

MySQL 4.0.15-Yahoo-SMP: up 198 days, processed 3,393,557,554 queries
(197/sec. avg)

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

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



RE: Drop all keys / indexes on a table?

2004-03-30 Thread Daevid Vincent
Thanks for the reply, however looking at all those options and none seems to
do what I need.

 -Original Message-
 From: PeterWR [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 30, 2004 11:55 AM
 To: Daevid Vincent; [EMAIL PROTECTED]
 Subject: Re: Drop all keys / indexes on a table?
 
 Hi,
 
 Take at look at CHECK TABEL - as far as I remember, the CHECK 
 TABLE EXTENDED
 will do a re-index (check index), otherwise some of the other 
 OPTIMIZE, etc.
 can help on this.
 
 Take a look in the exellent manual.
 
 Best regards
 Peter
 
 
 - Original Message - 
 From: Daevid Vincent [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, March 30, 2004 9:44 PM
 Subject: RE: Drop all keys / indexes on a table?
 
 
  Ugh. I was afraid you were going to say that...
  Seriously, there's no way to just 'wildcard' ALL indexes, 
 someone should
 add
  that as a feature request. We're using 4.0.17 BTW.
 
  What happens if I list out all the indexes that there 
 _could_ be in one
  ALTER line like that, and one of the indexes doesn't 
 actually exist? Will
  the whole ALTER fail?
 
  Here's the situation, I wrote a script that runs 
 recursively through a
  directory and applies all the .sql files it finds (in alpha 
 order). This
  script runs as part of a client update, and doesn't 
 necessarily run the
 same
  number of times for everyone. So, some clients may have 
 extra indexes:
  foo_1, foo_2, foo_3, ... foo_15 etc. (the problem at hand), 
 and other
  clients may just have: foo_1, foo_2, foo_3.
 
   -Original Message-
   From: Victoria Reznichenko 
 [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, March 30, 2004 12:48 AM
   To: [EMAIL PROTECTED]
   Subject: Re: Drop all keys / indexes on a table?
  
   Daevid Vincent [EMAIL PROTECTED] wrote:
It has come to my attention that we have maxed out our keys
   due to a stupid
update script bug. It seemst that we've not been explicitly
   naming our keys
and therefore mysql tried to be helpful and adds a new key
   each time!
*sigh*.
   
Is there a SQL command to DROP ALL keys on a table, so I
   can just ALTER it
and add them specifically again?
   
  
   Specify several DROP INDEX clause in the single ALTER 
 TABLE statement:
   ALTER TABLE table_name DROP INDEX index_name1, DROP
   INDEX index_name2, .. , DROP INDEX index_nameN;
  
  
   -- 
   For technical support contracts, goto
   https://order.mysql.com/?ref=ensita
   This email is sponsored by Ensita.net http://www.ensita.net/
  __  ___ ___   __
 /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
   /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
  ___/   www.mysql.com
  
  
  
  
  
   -- 
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:
   http://lists.mysql.com/[EMAIL PROTECTED]
  
 
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 


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



Can't login mysql with root account!

2004-03-30 Thread wood_flower
I have just installed MySQL server v3.23.49-8.5 (downloaded from Debian Packages Site) 
into my Debian v3.0r2 box! After finished installing, i had followed the instruction 
here to change root's password but right after this action, i can't login to mysql any 
more! I had also try to change ownership of /var/lib/mysql and all files and 
subfolders within this directory to mysql but still login fail!
Any suggestion? Thanks!


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



Re: Difficult query and am kinda stuck how to continue can someone help?

2004-03-30 Thread Timon Berkowitz
Hi there,

Sorry for being a little bit confusing, but de criterias has to be AND.

So it has to be like this:

- all cds that matches the string 'test'
AND
- all pieces of software that matches the string 'test'


Kind regards,

Timon Berkowitz
The Netherlands



Peter Brawley [EMAIL PROTECTED] schreef in bericht
news:[EMAIL PROTECTED]
 Timon,

 What is unclear to me is whether you wish to AND or OR your two criteria
...

 - all cds that matches the string 'test'
 - all pieces of software that matches the string 'test'

 so if your table2 had (6, 2, 'test'), where table1.nameofcd for softid=2
 does not contain 'test', do you want it in your result?

 PB
   - Original Message -
   From: Timon Berkowitz
   To: [EMAIL PROTECTED]
   Sent: Tuesday, March 30, 2004 12:34 PM
   Subject: Re: Difficult query and am kinda stuck how to continue can
 someone help?


   Hi there,


   I have tried that query it works, but not good enough

   When you add in Table2 another row with softid 1 and without the string
 'test' in it like this :

   softid| nameofcd
   1test cd 1
   2utils cd 1
   3test cd 2
   4backup

   id| softid| nameofsoftware
   1   1test software
   2   1software
   3   2software
   4   2software
   5   1software

   the query you used will give the following result

   softid   nameofcd   nameofsoftware
   1 test cd 1
   1 test cd 1
   1 test cd 1test software
   3 test cd 2

   Thats incorrect because I want to see only
   - all cds that matches the string 'test'
   - all pieces of software that matches the string 'test'

   So the result has to be like this

   softid   nameofcd   nameofsoftware
   1 test cd 1
   1 test cd 1test software
   3 test cd 2

   I hope I have made myself a little bit more clear

   By the way, Thank you for the quick response!

   Kind regards,

   Timon Berkowitz
   The Netherlands




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



Re: Can't login mysql with root account!

2004-03-30 Thread jeffrey_n_Dyke



I have just installed MySQL server v3.23.49-8.5 (downloaded from Debian
Packages Site) into my Debian v3.0r2 box! After finished installing, i had
followed the instruction here to change root's password but right after
this action, i can't login to mysql any more! I had also try to change
ownership of /var/lib/mysql and all files and subfolders within this
directory to mysql but still login fail!
Any suggestion? Thanks!


if you can't get in with the root password at all...then you'll need to try
this-http://www.mysql.com/doc/en/Resetting_permissions.html

What error is showing up?  How are you logging in, are you supplying the
password now?
mysql -u root -pyournewpass (or omit the password and let it prompt you)

if you are, make sure it worked correctly by tryng to login without the
password
mysql -u root

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







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



using result as a field

2004-03-30 Thread Mojtaba Faridzad
Hi,

is that possible to use a result of a calculation as a field?  for example:

SELECT num1 + num2 AS var1, IF(var1  100, 'Good', 'Bad') FROM table1;

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



Importing data to existing system

2004-03-30 Thread Scott Haneda
In a bit of a quandary here...

I have a user table and a registered serials table
Table data at end of email...

I have been given a large set of new data, but it is flat file, basically,
it looks just like the user table, with the addition of one field called
serial.

Somehow, I need to take the 100K or so records, which are currently in a
table that is called user_tmp and has the exact same structure as user with
one additional field called serial, copy each field from the user_tmp to the
user table, which should auto-inc the id field, then copy the serial from
the user_tmp table along with the id, and put those in the
Registered_serials, with serial going into serial, and is into user_id.

When all is said and done, I would hope both tables still have the same
number of records in them.

I was going to script this out, but the sheer volume of records make me
think it could fail.

user
+-+---+--+-+-++
| id  | int(11)   |  | PRI | NULL| auto_increment |
| username| varchar(16)   |  | | ||
| password| tinyblob  |  | | ||
| session | varchar(32)   |  | | ||
| first_name  | varchar(48)   |  | | ||
| middle_name | varchar(32)   |  | | ||
| last_name   | varchar(48)   |  | | ||
| name| varchar(255)  |  | | ||
| company | varchar(96)   |  | | ||
| department  | varchar(96)   |  | | ||
| address | varchar(128)  |  | | ||
| address2| varchar(128)  |  | | ||
| city| varchar(64)   |  | | ||
| state   | varchar(64)   |  | | ||
| country | varchar(64)   |  | | ||
| zip | varchar(64)   |  | | ||
| phone   | varchar(48)   |  | | ||
| fax | varchar(48)   |  | | ||
| email   | varchar(40)   |  | | ||
| active  | char(1)   |  | | 0   ||
| updated | timestamp(14) | YES  | | NULL||
| added   | timestamp(14) | YES  | | NULL||
+-+---+--+-+-++

Registered_serials
+--+---+--+-+-++
| Field| Type  | Null | Key | Default | Extra  |
+--+---+--+-+-++
| id   | int(11)   |  | PRI | NULL| auto_increment |
| user_id  | int(11)   |  | | 0   ||
| serial   | varchar(20)   |  | | ||
| product  | varchar(4)|  | | ||
| updated  | timestamp(14) | YES  | | NULL||
| added| timestamp(14) | YES  | | NULL||
+--+---+--+-+-++
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]Novato, CA U.S.A.


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



Re: Drop all keys / indexes on a table?

2004-03-30 Thread John Thorpe
I've been using comand line piping through awk to handle
mass tables modifications and listings. E.g. in your case
something like the following would hit every index, except
the primary keys, in table tablename in the test database.
echo show index from tablename |
| mysql -uuser -ppswd test
| awk '{if($3 !~ /Key_name/  $3 !~ /PRIMARY/) print $1 $3}'
| awk '{print alter table $1 drop index $2;}'
| mysql -uuser -ppswd test
To hit every table in the test database:

mysql -uuser -ppswd -e show tables from test
| awk '{if(NR1) print show index from $1;}'
| mysql -uuser -ppswd test
| awk '{if($3 !~ /Key_name/  $3 !~ /PRIMARY/) print $1 $3}'
| awk '{print alter table $1 drop index $2;}'
| mysql -uuser -ppswd test
John

Daevid Vincent wrote:

Thanks for the reply, however looking at all those options and none seems to
do what I need.

-Original Message-
From: PeterWR [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 30, 2004 11:55 AM
To: Daevid Vincent; [EMAIL PROTECTED]
Subject: Re: Drop all keys / indexes on a table?

Hi,

Take at look at CHECK TABEL - as far as I remember, the CHECK 
TABLE EXTENDED
will do a re-index (check index), otherwise some of the other 
OPTIMIZE, etc.
can help on this.

Take a look in the exellent manual.

Best regards
Peter
- Original Message - 
From: Daevid Vincent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 9:44 PM
Subject: RE: Drop all keys / indexes on a table?



Ugh. I was afraid you were going to say that...
Seriously, there's no way to just 'wildcard' ALL indexes, 
someone should
add
that as a feature request. We're using 4.0.17 BTW.

What happens if I list out all the indexes that there 
_could_ be in one

ALTER line like that, and one of the indexes doesn't 
actually exist? Will

the whole ALTER fail?

Here's the situation, I wrote a script that runs 
recursively through a

directory and applies all the .sql files it finds (in alpha 
order). This

script runs as part of a client update, and doesn't 
necessarily run the
same
number of times for everyone. So, some clients may have 
extra indexes:

foo_1, foo_2, foo_3, ... foo_15 etc. (the problem at hand), 
and other

clients may just have: foo_1, foo_2, foo_3.


-Original Message-
From: Victoria Reznichenko 
[mailto:[EMAIL PROTECTED]

Sent: Tuesday, March 30, 2004 12:48 AM
To: [EMAIL PROTECTED]
Subject: Re: Drop all keys / indexes on a table?
Daevid Vincent [EMAIL PROTECTED] wrote:

It has come to my attention that we have maxed out our keys
due to a stupid

update script bug. It seemst that we've not been explicitly
naming our keys

and therefore mysql tried to be helpful and adds a new key
each time!

*sigh*.

Is there a SQL command to DROP ALL keys on a table, so I
can just ALTER it

and add them specifically again?

Specify several DROP INDEX clause in the single ALTER 
TABLE statement:

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




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


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






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


RE: Drop all keys / indexes on a table?

2004-03-30 Thread Daevid Vincent
And the answer to this is, YES, the whole ALTER query FAILS and NONE of the
indicies are dropped. *sigh*

mysql ALTER TABLE poop DROP INDEX name_2, DROP INDEX name_3, DROP INDEX
name_4;
ERROR 1091: Can't DROP 'name_4'. Check that column/key exists

 -Original Message-
 From: Daevid Vincent [mailto:[EMAIL PROTECTED] 

 What happens if I list out all the indexes that there _could_ 
 be in one ALTER line like that, and one of the indexes doesn't 
 actually exist? Will the whole ALTER fail?


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



Re: MySQL 5.0 - What is really available?

2004-03-30 Thread Gerald Jensen
I would not recommend MySQL-Front ... the version they are selling is not
from the same developer that did MySQL-Front 2.5 (and earlier).

I bought a license (took a month to get a license key), complained about
missing features (OPTIMIZE and REPAIR MyISAM tables) and was basically told
I could shove it. They were rude and arrogant.

G. Jensen

- Original Message - 
From: dan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 10:30 AM
Subject: Re: MySQL 5.0 - What is really available?


 You mention Windows XP.
 Check out Mysql-Front (now commercial), version 3 may fit the bill.
 not sure. but it was the best windows interface for mysql ever made,
 notice, I said best for windows... ;)

 mysqlCC rocks, but not sure about 5.0 support.

 perhaps you could test it and report, and if its not working,
 maybe you could even do a patch or two? :)

 Dan.

 On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:

  I've downloaded and installed 5.0, it seems to be working fine. However,
I
  need a graphical user interface to create tables and such (when I say I
  need, trust me, I need). I'm running on XP (that explains a lot I know)
 
  So:
 
  Is Control Center for 5.0 available?
  Is MyODBC 5.0 available?
 
  I'm having a hard time find from the rather extensive 'manual.html' what
  other than the actual database engine is available.
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 


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





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



Re: MySQL 5.0 - What is really available?

2004-03-30 Thread dan
Thanks so much for the info Gerald.
I know I'm still using 2.5 (the one from the old author).
and it did irk me that the new developer (cough) is trying
to make a quick buck off it.

I haven't tried it yet, and thanks for the info, doesn't look
like I'm going to either.

too bad, it was really a great product.

Dan.

On Tue, 30 Mar 2004, Gerald Jensen wrote:

 I would not recommend MySQL-Front ... the version they are selling is not
 from the same developer that did MySQL-Front 2.5 (and earlier).
 
 I bought a license (took a month to get a license key), complained about
 missing features (OPTIMIZE and REPAIR MyISAM tables) and was basically told
 I could shove it. They were rude and arrogant.
 
 G. Jensen
 
 - Original Message - 
 From: dan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, March 30, 2004 10:30 AM
 Subject: Re: MySQL 5.0 - What is really available?
 
 
  You mention Windows XP.
  Check out Mysql-Front (now commercial), version 3 may fit the bill.
  not sure. but it was the best windows interface for mysql ever made,
  notice, I said best for windows... ;)
 
  mysqlCC rocks, but not sure about 5.0 support.
 
  perhaps you could test it and report, and if its not working,
  maybe you could even do a patch or two? :)
 
  Dan.
 
  On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:
 
   I've downloaded and installed 5.0, it seems to be working fine. However,
 I
   need a graphical user interface to create tables and such (when I say I
   need, trust me, I need). I'm running on XP (that explains a lot I know)
  
   So:
  
   Is Control Center for 5.0 available?
   Is MyODBC 5.0 available?
  
   I'm having a hard time find from the rather extensive 'manual.html' what
   other than the actual database engine is available.
  
   -- 
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
  
  
 
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 


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



Re: Difficult query and am kinda stuck how to continue can someone help?

2004-03-30 Thread Peter Brawley
Timon, is this ...

SELECT cds.softid,nameofcd,nameofsoftware
FROM cds INNER JOIN software USING (softid)
WHERE nameofcd LIKE '%test%' OR nameofsoftware LIKE '%test%';
++++
| softid | nameofcd   | nameofsoftware |
++++
|  1 | test cd 1  | test software  |
|  1 | test cd 1  | software   |
|  1 | test cd 1  | software   |
|  2 | utils cd 1 | test   |
++++

what you mean?

PB
  - Original Message -
  From: Timon Berkowitz
  To: [EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 12:34 PM
  Subject: Re: Difficult query and am kinda stuck how to continue can
someone help?


  Hi there,


  I have tried that query it works, but not good enough

  When you add in Table2 another row with softid 1 and without the string
'test' in it like this :

  softid| nameofcd
  1test cd 1
  2utils cd 1
  3test cd 2
  4backup

  id| softid| nameofsoftware
  1   1test software
  2   1software
  3   2software
  4   2software
  5   1software

  the query you used will give the following result

  softid   nameofcd   nameofsoftware
  1 test cd 1
  1 test cd 1
  1 test cd 1test software
  3 test cd 2

  Thats incorrect because I want to see only
  - all cds that matches the string 'test'
  - all pieces of software that matches the string 'test'

  So the result has to be like this

  softid   nameofcd   nameofsoftware
  1 test cd 1
  1 test cd 1test software
  3 test cd 2

  I hope I have made myself a little bit more clear

  By the way, Thank you for the quick response!

  Kind regards,

  Timon Berkowitz
  The Netherlands


Re: Difficult query and am kinda stuck how to continue can someone help?

2004-03-30 Thread Timon Berkowitz
What I ment is this :-)

Table1 consists out of the following fields and data
+--++
| softid  | nameofcd  |
+--++
| 1 | test cd 1   |
| 2 | software cd 2   |
| 3 | software cd 3   |
| 4 | test cd 2   |
+--++

Table2 consists out of the following fields and data
++++
| id| softid | nameofsoftware |
++++
| 1 | 1   | test software |
| 2 | 1   | software 1|
| 3 | 1   | software 2|
| 4 | 2   | software 3|
| 5 | 2   | software 4|
++++

The output I need is the following
++++
| softid | nameofcd | nameofsoftware |
++++
| 1   | test cd 1   |  |
| 1   | test cd 1   | test software  |
| 4   | test cd 2   |  |
++++

So that will require the following criteria when using the string 'test':

- Show all records where nameofcd which contain the string test

AND

- Show all records where nameofcd which contain the string test

AND

- Do not show any duplicates of the combination and nameofcd and
nameofsoftware

That means do no show the others, how obvious!

As always,

Kind regards,

Timon Berkowitz
The Netherlands



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



Cold Backup of Innodb Database

2004-03-30 Thread Schwartz, Evelyn
Does anyone have a list of the files that need to be backed up for a
cold backup of an innodb database:
 
Obviously all the MyISAM files and the innodb database files.   But what
about the log and archive log files?
 
Evelyn


Load data infile or import

2004-03-30 Thread Scott Haneda
I have a few hundred thousand records to import to a database, there are
already a few hundred thousand records in the database now.

What is the best way to append these new records to the old database?

I can not seem to use load data infile unless I want to preformat the data
to have the exact same amount of fields as the old database.  Basically, I
have something like

Id
Fname
Mname
Lname

Where the new data to import is missing the Mname and id, so I will create
full complete insert statements, but how to load that in?

-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]Novato, CA U.S.A.


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



RE: Drop all keys / indexes on a table?

2004-03-30 Thread Daevid Vincent
John, you are my father!  
I've taken your script and tweaked it a bit more:

 SNIP -

#!/bin/sh

DBLIST=mydb1 mydb2 mytest mytestdb

USER=uzer
PASSWORD=passwerd

clear

for DB in $DBLIST
do  
echo Removing all indexes (not primary) in Database: '$DB'

TABLES=$(mysql -u$USER -p$PASSWORD --force -e SHOW TABLES FROM $DB
\
| awk '{if(NR1) print $1;}')

for t in $TABLES; 
do
echo -e \tFixing: '$t'
echo SHOW INDEX FROM $t \
  | mysql -u$USER -p$PASSWORD --force $DB \
| awk '{if($3 !~ /Key_name/  $3 !~ /PRIMARY/) print $1
$3}' \
| awk '{print ALTER TABLE $1 DROP INDEX $2;}' \
| mysql -u$USER -p$PASSWORD --force $DB
done
done 

 -Original Message-
 From: John Thorpe [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 30, 2004 1:49 PM
 To: Daevid Vincent
 Cc: [EMAIL PROTECTED]
 Subject: Re: Drop all keys / indexes on a table?
 
 I've been using comand line piping through awk to handle
 mass tables modifications and listings. E.g. in your case
 something like the following would hit every index, except
 the primary keys, in table tablename in the test database.
 
 echo show index from tablename |
 | mysql -uuser -ppswd test
 | awk '{if($3 !~ /Key_name/  $3 !~ /PRIMARY/) print $1 $3}'
 | awk '{print alter table $1 drop index $2;}'
 | mysql -uuser -ppswd test
 
 To hit every table in the test database:
 
 mysql -uuser -ppswd -e show tables from test
 | awk '{if(NR1) print show index from $1;}'
 | mysql -uuser -ppswd test
 | awk '{if($3 !~ /Key_name/  $3 !~ /PRIMARY/) print $1 $3}'
 | awk '{print alter table $1 drop index $2;}'
 | mysql -uuser -ppswd test
 
 John


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



MySQL installation in Fedora Core 1

2004-03-30 Thread Sami Maisniemi
I intend to build up a web server that is based on Fedora Core 1. 
Installation and configuration of Apache and PHP4 was pretty simple, but 
there are some problems in configuration of MySQL. I installed the MySQL 
server RPM included in the distribution.

Even in the MySQL pages it is mentioned that running 
/etc/rc.d/init.d/mysqld start is enough for post-installation process. 
However, there is no such file. Running mysql leads to an error:

[EMAIL PROTECTED] smaisnie]# mysql
ERROR 2002: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (2)

Does anyone have any idea how to carry out post-installation process?

Regards Sami Maisniemi



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


RE: MySQL installation in Fedora Core 1

2004-03-30 Thread Donny Simonton
Sami,
I run Fedora core 1 and haven't had any problems.

This is all you do if you want MySQL 4.1.1.

wget
http://www.mysql.com/get/Downloads/MySQL-4.1/MySQL-server-4.1.1-1.i386.rpm/f
rom/http://mysql.mirrors.pair.com/
wget
http://www.mysql.com/get/Downloads/MySQL-4.1/MySQL-client-4.1.1-0.i386.rpm/f
rom/http://mysql.mirrors.pair.com/
wget
http://www.mysql.com/get/Downloads/MySQL-4.1/MySQL-devel-4.1.1-0.i386.rpm/fr
om/http://mysql.mirrors.pair.com/
rpm -i MySQL-server-4.1.1-1.i386.rpm 
rpm -i MySQL-client-4.1.1-0.i386.rpm 
rpm -i MySQL-devel-4.1.1-0.i386.rpm 


Sorry, word wrap sucks.

Donny

 -Original Message-
 From: Sami Maisniemi [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 30, 2004 5:11 PM
 To: [EMAIL PROTECTED]
 Subject: MySQL installation in Fedora Core 1
 
 I intend to build up a web server that is based on Fedora Core 1.
 Installation and configuration of Apache and PHP4 was pretty simple, but
 there are some problems in configuration of MySQL. I installed the MySQL
 server RPM included in the distribution.
 
 Even in the MySQL pages it is mentioned that running
 /etc/rc.d/init.d/mysqld start is enough for post-installation process.
 However, there is no such file. Running mysql leads to an error:
 
 [EMAIL PROTECTED] smaisnie]# mysql
 ERROR 2002: Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (2)
 
 Does anyone have any idea how to carry out post-installation process?
 
 Regards Sami Maisniemi
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 



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



Re: MySQL installation in Fedora Core 1

2004-03-30 Thread jeffrey_n_Dyke



I intend to build up a web server that is based on Fedora Core 1.
Installation and configuration of Apache and PHP4 was pretty simple, but
there are some problems in configuration of MySQL. I installed the MySQL
server RPM included in the distribution.

Even in the MySQL pages it is mentioned that running
/etc/rc.d/init.d/mysqld start is enough for post-installation process.
However, there is no such file. Running mysql leads to an error:


i'm not that familar with FC1, but
can you just cd into /path/to/mysql
and run
bin/mysqld_safe --user=mysql 

did you run scripts/mysql_install_db from /path/to/mysql ?  or is that
included as part of the rpm install.
that may not be needed, i've always installed the binaries on Solaris/RH89

HTH
jeff

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







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



Re: Getting around 2 queries

2004-03-30 Thread Chuck Gadd
Matt Chatterley wrote:

One option would be to 'union' the two queries (assuming the columns are the
same type and length), allowing you to run one query string:
Select serial from blacklist where serial = x
Union
Select serial from seriallist where serial = x
Would return 1 or 2 rows, depending on whether rows are found in one table
or both. You wouldn't know which table though (but from your message, I
guess that is unimportant).
If you needed to know which table it came from, you could just
expand this query a little:
Select serial,'blacklist ' as Tablename from blacklist where serial = x
Union
Select serial,'seriallist' as Tablename from seriallist where serial = x




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


RE: MySQL installation in Fedora Core 1

2004-03-30 Thread Daevid Vincent
Just make a symbolic link... Probably it's in /tmp

So as root,
  ln -vs /tmp/mysql.sock /var/lib/mysql/mysql.sock

This is always an annoyance with mysql and redhat it seems. *sigh*


 -Original Message-
 From: Sami Maisniemi [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 30, 2004 3:11 PM
 To: [EMAIL PROTECTED]
 Subject: MySQL installation in Fedora Core 1
 
 I intend to build up a web server that is based on Fedora Core 1. 
 Installation and configuration of Apache and PHP4 was pretty 
 simple, but 
 there are some problems in configuration of MySQL. I 
 installed the MySQL 
 server RPM included in the distribution.
 
 Even in the MySQL pages it is mentioned that running 
 /etc/rc.d/init.d/mysqld start is enough for 
 post-installation process. 
 However, there is no such file. Running mysql leads to an error:
 
 [EMAIL PROTECTED] smaisnie]# mysql
 ERROR 2002: Can't connect to local MySQL server through socket 
 '/var/lib/mysql/mysql.sock' (2)
 
 Does anyone have any idea how to carry out post-installation process?
 
 Regards Sami Maisniemi
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 


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



ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

2004-03-30 Thread Pahlevanzadeh Mohsen
Hi.
When i run mysql,mysqlshow,mysqladmin or .,I
receive following error:
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]'
(Using password: NO)
Please guide me..
Yours,Mohsen.


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator   programmer 
  My work phone is : +98216054096-7   
  My home phone is: +98213810146  
My emails is  
  [EMAIL PROTECTED]   
My website is: http://webnegar.net


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



RE: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

2004-03-30 Thread J.R. Bullington
Did you change the mysql root password by running:
 mysqladmin -u root password 'newpassword'? 

If so, try:
 mysql -u root -p  

It will then prompt you to enter a password.

J.R.


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



Re: MySQL 5.0 - What is really available?

2004-03-30 Thread Jack Baty

I prefer SQLyog. www.webyog.com
Ditto that. I used to use MySQL-Front, but switched when development 
stopped. I don't miss it really. The structure synchronization and db 
job agent features are maturing rapidly and work quite well. Saves a ton 
of time for me. Not sure about v5.0 support yet, but they release 
updates quite often, so it shouldn't be long.

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


temp tables rights?

2004-03-30 Thread Keith Keller
Hi all,

Suppose I have a user who has been granted select and create_tmp_table,
but no other privileges, on a given database.  When I attempt to insert
into any temporary table, permission is denied, presumably due to the
user not having insert on the database, and no entries in
mysql.tables_priv for the new temporary table.  Is there an accepted and
clean way of allowing users without insert to insert into their own
temporary tables?  This message

http://lists.mysql.com/mysql/156829

from January seems to imply that no such method exists.

There are two workarounds: either the one the above message suggests
(make the appropriate entries in tables_priv in advance, creating a
static allowable set of temporary table names), or grant insert on the
database, and then revoke insert on all of the existing tables in the
database.  This second method seems clunky in two ways: if you
subsequently create a new table that shouldn't allow inserts, you need
to remember to revoke insert on that table; it also will clutter
tables_priv quite a bit.

We're using 4.0.17 at the moment; the 4.0.18 and 4.1.1 changelogs don't
seem to address this issue.  Hopefully I'm wrong, and someone will point
out the correct way to do this; if not, what's the preferred
alternative?

Thanks,

--keith

-- 
[EMAIL PROTECTED]
alt.os.linux.slackware FAQ:  http://wombat.san-francisco.ca.us/cgi-bin/fom


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



Re: Access to MySQL query problem

2004-03-30 Thread Ed Reed
I already specified the version, 4.1.1. My problem query is this,
 
SELECT Item 
FROM StoredProc 
GROUP BY Item 
HAVING (First(User)=Gus);

my StoredProc query is a simple one,
 
SELECT Item, Op, User
FROM tblSource
ORDER BY Item, Op;

Any Thoughts?
 
Thanks
 
 Nitin Mehta [EMAIL PROTECTED] 3/29/04 12:18:37 AM 
please include the query, you are using with no success and also
specify the
version of your mysql.


Nitin

- Original Message - 
From: Ed Reed  [EMAIL PROTECTED] 
To:  [EMAIL PROTECTED] 
Sent: Monday, March 29, 2004 1:27 PM
Subject: Access to MySQL query problem


 I'm coverting an Access database to MySQL 4.1.1 and I need help with
a
 near impossible query. In the Access DB I used a stored procedure; I
 think I should be able to solve this problem with a subselect in
MySQL
 but so far I'm not having any luck.

 Here's the problem; In my stored precedure query I get results that
 look like this

 Item Op User
 2751 2 Dude
 2751 3 Aguy
 4785 1 Dude
 4785 2 Gus
 5623 1 Dude
 5623 2 Gus
 5654 1 Gus
 5654 2 Aguy

 I then query these results to get only the Items for a user when the
 specified user is the first person for that Item ID, for example. If
I
 query the results for Dude Items 2751, 4785  5623 are returned. If
I
 query the results for Gus Item 5654 are return but not Items 4785 or
 5623. If I query the results for Aguy no Items are returned.

 Does anyone have any thoughts on this?

 Thanks




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





load data help

2004-03-30 Thread David McBride
I need to load data from a log file.  The file is a space seperated file.  I can 
already ignore the first 7 lines (that are commnet lines), but what I can not seem to 
do is:
1. get load data to use the space seperated format.
2. only load certain columns.  

I tried: mysql LOAD DATA INFILE 'persondata.txt'
-   INTO TABLE persondata (col1,col2,...);

But it gives me an error about field lists.  I can not find anything about defining 
field lists in the manual.

Thanks for your time
David


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



Record lag functionality in MySQL?

2004-03-30 Thread David L. Van Brunt, Ph.D.
I have a table of data...


A1 B1 C1
A2 B2 C2

And I¹d like to make a query where I ³lag² a value, grabbing a value from
the next row of the table. Most stat packages have a lag function, but I
can¹t find this in MySQL. The end result would look like:

A1 B1 C1 D1 (where ³D1² would equal A2 from above)

Any suggestions?

-- 
David L. Van Brunt, Ph.D.
Outlier Consulting  Development
mailto: [EMAIL PROTECTED]




Mysql UDF

2004-03-30 Thread Prem Soman
HI!

I wrote a mysql UDF  that works well in older versions
of  mysql (3.23.*) but the same is not working for new
versions like (4.0*) .  The server restarts every time
i invoke my function .

I also compiled and linked with libmysqlclient.so.11,
but still the problem persists.

how to solve the problem, kindly help me.





___
WIN FREE WORLDWIDE FLIGHTS - nominate a cafe in the Yahoo! Mail Internet Cafe Awards  
www.yahoo.co.uk/internetcafes 

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



Fulltext search question: words with numbers (ie DB2)

2004-03-30 Thread Shane Allen
I have a table with the following:

CREATE TABLE foo (
...
description text,
...
FULLTEXT INDEX (description),
...
);
select count(*) from foo where description like '%db2%';

returns 61 rows. Checking them confirms that the word db2 exists as a 
standalone word separated either by punctuation or spaces  in several of 
those documents

using MATCH(description) AGAINST('+db2' IN BOOLEAN MODE) returns no results.

Is this expected behaviour? If so, is there a way to circumvent it?

TIA

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


Re: Fulltext search question: words with numbers (ie DB2)

2004-03-30 Thread Richard Davey
Hello Shane,

Wednesday, March 31, 2004, 5:43:10 AM, you wrote:

SA using MATCH(description) AGAINST('+db2' IN BOOLEAN MODE) returns no results.
SA Is this expected behaviour? If so, is there a way to circumvent it?

By default, the full text indexing engine doesn't include words with
less than 4 characters in. If you are using MySQL 4 you can change the
minimum length via the ft_min_word_len variable. On MySQL 3.x
there's nothing you can do short of changing the actual source code
and recompiling.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html



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



SELECT DISTINCT.. ORDER BY.. DESC - bug??

2004-03-30 Thread Vadim P.
Hi all,

Sorry to be so persistent, but I am bringing this up again since noone 
from the MySQL development team commented on my previous post, and the 
issue seems very serious, to the point I may start looking to switching 
away from MySQL, so - please, please, shed some light on this issue!!!

The problem is that the performance of SELECT DISTINCT... query seems 
to depend on the order the results are sorted, DESC being more than 
10x slower than ASC (14.77 sec vs. 1.06 sec).

==

Here is a more detailed description:

The table has over 700,000 records. MySQL 4.0.18 running under OpenBSD 
3.4 Intel/PIII 900MHz/2GB RAM

mysql SELECT distinct billingCycle FROM PhoneCalls ORDER BY 
billingCycle DESC;
+--+
| billingCycle |
+--+
| 2004-04-01   |
| 2004-03-01   |
| 2004-02-01   |
| 2004-01-01   |
| 2003-12-01   |
| 2003-11-01   |
| 2003-10-01   |
| 2003-09-01   |
| 2003-08-01   |
| 2003-07-01   |
| 2003-06-01   |
| 2003-05-01   |
| 2003-04-01   |
| 2003-01-01   |
+--+
14 rows in set (14.77 sec)

mysql SELECT distinct billingCycle FROM PhoneCalls ORDER BY billingCycle;
+--+
| billingCycle |
+--+
| 2003-01-01   |
| 2003-04-01   |
| 2003-05-01   |
| 2003-06-01   |
| 2003-07-01   |
| 2003-08-01   |
| 2003-09-01   |
| 2003-10-01   |
| 2003-11-01   |
| 2003-12-01   |
| 2004-01-01   |
| 2004-02-01   |
| 2004-03-01   |
| 2004-04-01   |
+--+
14 rows in set (1.06 sec)
===

Thanks in advance!
Vadim.


mysql
query




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


Re: load data help

2004-03-30 Thread beacker
David McBride writes:
I need to load data from a log file.  The file is a space seperated
file.  I can already ignore the first 7 lines (that are commnet lines),
but what I can not seem to do is:
1. get load data to use the space seperated format.
2. only load certain columns.  

I tried: mysql LOAD DATA INFILE 'persondata.txt'
-   INTO TABLE persondata (col1,col2,...);

David,
 Based upon the manual for 4.0.17 the following syntax would fit
your description:

LOAD DATA INFILE 'persondata.txt'
INTO TABLE persondata
FIELDS TERMINATED by ' '
(col1,col2,...);

You may need the LOCAL key word if you want the client to read the
data file.
Brad Eacker ([EMAIL PROTECTED])



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



Re: Fulltext search question: words with numbers (ie DB2)

2004-03-30 Thread Shane Allen
Richard Davey wrote:

Hello Shane,

Wednesday, March 31, 2004, 5:43:10 AM, you wrote:

SA using MATCH(description) AGAINST('+db2' IN BOOLEAN MODE) returns no results.
SA Is this expected behaviour? If so, is there a way to circumvent it?
By default, the full text indexing engine doesn't include words with
less than 4 characters in. If you are using MySQL 4 you can change the
minimum length via the ft_min_word_len variable. On MySQL 3.x
there's nothing you can do short of changing the actual source code
and recompiling.
 

apologies, I forgot to mention that.

I was aware of this, and just finished changing the ft_min_word_length 
to 2 and rebuilding my indexes.

searches for 'SAS' or 'net' yield results as expected, but DB2 still 
does not.

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


sql file works with mysql 4.0.16 but not 3.23

2004-03-30 Thread jdavis
Hello,
 i have a sql file that i use to build a table. It works on my Debian
testing box with mysql 4.0.16 but not on my woody box using mysql 3.23.

The error when i try to use the source command with my sql file
and version 3.23 of mysql is...

ERROR 1064: You have an error in your SQL syntax near ')' at line 34

here is the .sql file 

CREATE TABLE new_quotes
(
 quote_number   int(10) PRIMARY KEY AUTO_INCREMENT,
 dealer_number  int(10),
 the_date   varchar(50),
 ip varchar(50),
 cust_serv_rep  varchar(20),
 quote_titlevarchar(50),
 quans_to_quote varchar(10),
 other_quan varchar(50),
 size_flat  varchar(15),
 size_foldedvarchar(15),
 other_flat varchar(50),
 other_folded   varchar(50),
 pages  varchar(50),
 other_pagesvarchar(50),
 text_weightvarchar(50),
 cover_weight   varchar(50),
 apso   varchar(255),
 ink_specs  varchar(50),
 other_ink  varchar(50),
 varn_or_uv varchar(50),
 binderyvarchar(50),
 other_bindery  varchar(255),
 ajsvarchar(255),
 shipto varchar(255),
 ship_via   varchar(50),
 asivarchar(255),
 company_name   varchar(100),
 contactvarchar(100),
 contact_phone  varchar(50),
 contact_email  varchar(100),
 quote_needed   varchar(100),
);

can someone tell me what im doing wrong.
 
thanks,
-- 
[EMAIL PROTECTED]

Bad spellers of the world untie!


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



Re: Transaction Not supported

2004-03-30 Thread Jonas Lindén
I dont think that transactions are supported (yet?) by the PERL DBI.

/Jonas


- Original Message - 
From: Mike Blezien [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 9:42 PM
Subject: Transaction Not supported


 Hello,

 I keep getting this error when attempting to utilize a database that has
Innodb
 tables, and using transactions. This is from a Perl/DBI script too:

 Error:
 Transactions not supported by database at module. bla..bla

 I realize this maybe a DBI question, but I thought I'd check here first
incase
 we missed something is the settings for the MySQL server

 Version: 4.0.17-standard - Official MySQL-standard binary
 and it has innodb enabled, the autocommit is set to 1, then when the
transaction
 is executed, the autocommit is set to 0 untill the commit is called

 Is there something in the variables I can check to make sure transaction
have
 been enabled ??

 TIA
 -- 
 MikemickaloBlezien
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Thunder Rain Internet Publishing
 Providing Internet Solutions that work!
 http://www.thunder-rain.com
 Quality Web Hosting
 http://www.justlightening.net
 MSN: [EMAIL PROTECTED]
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



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




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



Re: Transaction Not supported

2004-03-30 Thread Joshua J. Kugler
On Tuesday 30 March 2004 09:35 pm, Jonas Lindén said something like:
 I dont think that transactions are supported (yet?) by the PERL DBI.

to  Mike Blezien [EMAIL PROTECTED].  My response follows.

Yes they are...at least I have used them in a project before using Perl::DBI.

[EMAIL PROTECTED] ~]$ perl
use DBI;

print $DBI::VERSION, \n;
1.37

[EMAIL PROTECTED] ~]$


My mysql.pm shows $VERSION = '2.0419'

Are you sure you are connecting to an InnoDB database and that you are doing 
transactions on InnoDB tables?

My code is rather simple:

#Begins the transaction
$dbh-do('BEGIN');
.
.
.
.
$dbh-do('COMMIT');

What does your code look like?

j- k-

-- 
Joshua J. Kugler
Fairbanks, Alaska
Computer Consultant--Systems Designer
.--- --- ...  ..- .--.- ..- --. .-.. . .-.
[EMAIL PROTECTED]
ICQ#:13706295
Every knee shall bow, and every tongue confess, in heaven, on earth, and under 
the earth, that Jesus Christ is LORD -- Count on it!

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



building mysql 4 on RH8

2004-03-30 Thread Marius Stan
Hello all,

While trying to build MySQL-4.0.18-0.src.rpm downloaded from mysql.com 
on a RedHat 8 I get these:

/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libncurses.a(lib_termcap.o): 
In function `skip_zero':
lib_termcap.o(.text+0xcc): undefined reference to `__ctype_b'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libncurses.a(lib_tparm.o): 
In function `parse_format':
lib_tparm.o(.text+0x1112): undefined reference to `__ctype_b'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libncurses.a(lib_tputs.o): 
In function `tputs':
lib_tputs.o(.text+0x213): undefined reference to `__ctype_b'
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/mysql-4.0.18/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/mysql-4.0.18'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.95095 (%build)

Google hints me that the  __ctype_b error should arise only on RH9+ 
because it's glibc doesn't export some stuff anymore, while RH8 should 
be just fine, because:

# rpm -q glibc
glibc-2.3.2-4.80
Any hints ? Can I find an usable mysql4 src.rpm to compile cleanly on my 
RH8 ?

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