Re: MySQLGUI for MacOS 10.1

2001-10-26 Thread Sinisa Milivojevic

Garry Nevin writes:
 Can anyone advise which, if any versions of the MySQLGUI posted can be run
 under MacOS 10.1 please?
 
 Garry Nevin
 -- 
 

No, there is none.

But it would not be impossible to build one, if you get in touch with
 developer that ported FLTK to Mac. You can find him at www.fltk.org
under Bazaar.

If you use X server under 10.1, then it would be trivial to build it. 

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


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

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




Re: MySQL problem with Traffic and Updates

2001-10-26 Thread Michael T. Babcock

On Thu, Oct 25, 2001 at 08:27:00AM -0700, Bill Adams wrote:
  At http://www.mysql.com/doc/ do a search for multiple processors. There's
  a refence to http://www.mysql.com/Downloads/Patches/linux-fork.patch that
  might help.
 
 And don't forget to make sure you have good/needed indexes.
 (e.g See the manual entry on EXPLAIN, run myisamchk -a, etc..).
 
And make sure you're logging slow queries.  Then take each of the logged
queries (I log anything that takes more than two seconds) and run them through
EXPLAIN to see where you could modify the query and/or change indexes.
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd.

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

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




Adding functions

2001-10-26 Thread Eric J. Schwertfeger


Before I overcommit myself, I want to find out a few things:

1) How much work does it take to add functions (not procedures)?
2) Is anyone already working on these functions?
3) Is anyone else interested in these functions?

The function I need is a unix-timestamp to human readable formatting
function, preferably one that can create arbitrary formats in non-local
timezones.  Say the function accepts one to three arguments, where the
first argument (required) is the timestamp, the second is an optional
strftime-compatible format string (with a reasonable default), and the
third is an optional timezone specifier (defaulting to the local
timezone).  I've already got code that will do much of this for US
timezones and GMT, but I've only started looking through what it will take
to add this to MySQL.

Unfortunately, doing this as part of the select statement is the easiest
way to deal with the conversion, as we need the actual timestamp in the
database, and some of the report programs we're evaluating don't do
arbitrary timezones.

The functions I want are SET type support functions, AddToSet, DelFromSet,
and IsInSet, all of which would take two or more arguments, and should be
obvious enough to not need discussion.

My C++ is rusty, as is my yacc, but I'm a decent programmer and don't
think that this is beyond my ability.  However, if someone else is doing
this, I'd rather apply myself to other projects.


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

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




Re: Request for information (MS Access MySQL)

2001-10-26 Thread j.urban

You can also use a tool like urSQL (http://www.urbanresearch.com/ursql) to
convert the table schemas.  urSQL has the ability to save MySQL tables as
MS Access CREATE TABLE scripts and the ability to build a script of insert
statements that can be run against the new table.  (You can also save MS
Access tables as MySQL CREATE TABLE scripts.)

On Thu, 25 Oct 2001, Daniel Andrade wrote:

 Rob,

 You may start by checking the utility at download.com that claims to be
 able to convert Access to MySQL databases. I am currently trying to get
 a company off of Access 2000 and onto MySQL in America, but I have not
 tried this tool yet and any reviews from someone that knows Access well
 are welcome.

 Daniel




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

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




Re: BDB recovery and replication?

2001-10-26 Thread Jeremy Zawodny

On Thu, Oct 25, 2001 at 04:22:33PM +0800, Geoffrey Soh wrote:
 Hi All,
 
 I'm new to this list and have some questions about BDB tables and
 replication.  Hope some of the more enlightened ones on this list
 might shed some light on the following :
 
 1. I've a master-slave replication setup with BDB tables.  If for some
 reason the BDB tables on the slave go out of sync (e.g. failover
 master-slave, then failback slave-master), what's the best way to sync
 these tables and restart the replication on the slave?

Have a look at mysqlsnapshot:

  http://jeremy.zawodny.com/mysql/

It's designed for MyISAM files, but it could be modified for BDB
pretty easily (I'd love the patch).

 2. How would I be able to get a decent snapshot of the BDB (or other MyISAM)
 tables in (1) without stopping the master (the master is running a live 24x7
 service hence cannot stop the master without affecting uptime)?

Same answer. :-)

 3. Related to (1), what's the best way to do recovery on BDB tables using
 the MySQL binary logs + BDB table snapshot + BDB logs?  I've read the manual
 but could not find such info :)

Look at the mysqlbinlog command.  It turns a binary log into something
you can pipe back thru the mysql command-line tool.

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

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

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




NaN values displayed as 1.Q#NaN on Win32

2001-10-26 Thread Sven Bartha

Hello,

I have problem with Mysql 3.23.xxx on Windows :

I have program that inserts NaN values via the MySQL C-Programming interface on a 
SUN/Solaris. When I retrieve the data on SUN or Linux
everthing works fine.

However, when I move the database to a windows installation the
NaN values are displayed as 1.Q#NaN. All normal double values work fine.
(This has been observed with Window 98/NT and 2000).

When I transfer the data back to Linux or Solaris they are still O.K.

Does anybody know how to solve or workaround this problem ?


Bye,
Sven


Lotto online tippen! Egal zu welcher Zeit, egal von welchem Ort.
Mit dem WEB.DE Lottoservice. http://tippen2.web.de/?x=13



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

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




MySQL Slave Server

2001-10-26 Thread William Robbins

I am getting this error message on my slave server

011025 16:46:14  mysqld started
/usr/local/mysql/libexec/mysqld: ready for connections
011025 16:46:14  Slave thread: error connecting to master: Unknown MySQL
Server Host '' (0) (0), retry in 60 sec

This is my my.cnf config file on the slave server.
# The MySQL server
[mysqld]
server-id   = 2
port= 3306
socket  = /tmp/mysql.sock
skip-locking
set-variable= key_buffer_size=128M
set-variable= max_allowed_packet=1M
set-variable= table_cache=64
set-variable= sort_buffer=512K
set-variable= net_buffer_length=8K
set-variable= myisam_sort_buffer_size=8M
log-update
set-variable= tmp_table_size=128M
set-variable= delayed_queue_size=300
set-variable= thread_cache_size=10
set-variable= max_connections=200

#Slave Info
master-host=db..com
master-user = XX
master-password = XX
master-port = 3306
log-slave-updates
replicate-do-db = 

This is my my.cnf on the master server:
[mysqld]
port= 3306
socket  = /tmp/mysql.sock
skip-locking
set-variable= key_buffer_size=1024M
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
log-update
set-variable= tmp_table_size=1024
set-variable= delayed_queue_size=300
set-variable= thread_cache_size=10
set-variable= max_connections=400


#Master Config
log-bin
server-id=1

Any help, I would LOVE IT, thanks out there!


William Robbins
Chief Technology Officer
Netvolution.com, Inc.
http://www.netvolution.com
548 South Spring Street, Suite 814, Los Angeles CA 90013
Phone: 213-593-1090 x101
Fax: 213-593-1091


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

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




RE: Query help...

2001-10-26 Thread Woolsey, Fred

Quite a neat trick... but might there be problems with cross join
performance if the table is large?  This is based on the assumption that
MySQL first creates the cross product, then culls out the rows that don't
meet the criteria.

Cheers,
Fred Woolsey

-Original Message-
From: Anvar Hussain K.M. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 1:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Query help...


Hi Mr. David,

I hope a bit of explanation for Steve Mayers' solution would help you.
The query by Mayers
select distinct a.username, a.ip from users a, users b where a.ip=b.ip 
a.username != b.username;

I think I can explain the behaviour of the query:

Suppose the table contains the data:

username  ip

a 1
b 2
c 1

Considert the query without the where condition ie
Select a.usernam, a.ip from users a, users b

This is a self join cross product. A self join without a where condition
would
give the so called cross product.
ie for each row in first table all the rows of the seccond table (3*3 = 9
rows).
For clarity's sake we change the query to include the cols of the second 
table b
ie issue the query Select a.*, b.* from users a, users b
  ab
user ip user ip
a 1 a 1
b 2 a 1
c 1 a 1
a 1 b 2
b 2 b 2
c 1 b 2
a 1 c 1
b 2 c 1
c 1 c 1
Now consider the first where condition ie a.ip = b.ip. This tells the
database
to include only those rows for which the ip col of table a  is
the same as that of b. The filtered output due to this clause is

  ab
user ip user ip
a 1 a 1
c 1 a 1
b 2 b 2
a 1 c 1
c 1 c 1

Add the second clause also to the query. ie the where condition becomes
a.ip = b.ip and a.username != b.username :
Now the rows from the above output where usernames of both a and b are the
same
are out. This gives the result.

  ab
user ip user ip
c 1 a 1
a 1 c 1

The distinct keyword is to eliminate duplicate rows from the result (Which
may
be there if in the user table contains the multiple rows with the same
username
and ip).

I hope this clarifies.

This all might seem a lot of complexity in the first sight.  But once
youstart
thinking in SQL way these are quiet straight forward.  With the promised
subqueries in the new releases Mysql queries will surely get multiple fold
complex and it would be a great and funny game.

Anvar.

Thanks!! Worked like a dream! I'm not quite sure why it knew to pull only
ip's that are in there more than once though?

David

From: Steve Meyers [EMAIL PROTECTED]

-
I think I understand.  This should work...

select distinct a.username, a.ip from users a, users b where a.ip=b.ip 
a.username != b.username;

Steve Meyers


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

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

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

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




RE: foreign key

2001-10-26 Thread Steve Meyers

Alex,

Please reply to the list in the future, so that others can answer your questions and 
also see the answers as well.

You can find info on how to use referential integrity on 
http://www.mysql.com/doc/C/R/CREATE_TABLE.html

For more InnoDB specific information about it, see http://www.innodb.com/
 
Steve Meyers


 -Original Message-
 From: Alex [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 25, 2001 6:56 AM
 To: Steve Meyers
 Subject: RE: foreign key
 
 
 Hello Steve
 I was reading this email that you did and Looks like you know this better
 than I do
 therefore I want to ask you How come can I make the relationships between
 tables in mysql max which is the one that I am using now maybe 
 you have any
 place to suggest or maybe you can explain me a little bit more thank you
 very much
 
 Alex and is better if you replay this to [EMAIL PROTECTED] thank you again
 
 
 
 -Original Message-
 From: Steve Meyers [mailto:[EMAIL PROTECTED]]
 Sent: Sabado, 20 de Octubre de 2001 12:20 a.m.
 To: Sandra Rovena Frigeri; [EMAIL PROTECTED]
 Subject: RE: foreign key
 
 
 InnoDB tables support foreign keys with full referential integrity
 constraints.  They do not yet support cascading deletes and 
 updates.  You'll
 want to use the MySQL-Max version of MySQL to get support for 
 InnoDB tables.
 
 Steve Meyers
 
 
  -Original Message-
  From: Sandra Rovena Frigeri [mailto:[EMAIL PROTECTED]]
  Sent: Friday, October 19, 2001 8:25 PM
  To: [EMAIL PROTECTED]
  Subject: foreign key
 
 
  hi,
 
  which windows mysql version supports foreign key and its
  complete implementation: referential integrity constraint,
  avoid delete parent key, etc.?
  or
  Which foreign key features that has the best windows mysql version?
 
  thanks,
 
  sandra.
 



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

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




My SQL for NT versus MySQL for Linux

2001-10-26 Thread Mark Holder



My website is currently being hosted on a Linux box, and I am wanting to
incoporate a database using MySQL. I have downloaded the NT version of MySQL to
develop the db with, and am wondering what impact, if any, running it on the
Linux box will have. Are the compatible ???

Thanks in advance,

Mark Holder



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

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




Good search engine queries

2001-10-26 Thread Deryck Henson

Hi everyone!

I have a huge database (or will have) and I need to search through it for
web sites.  It is a regular Google-Like search engine that returns the web
sites closest to the match, the number of returned queries, etc.  Now, what
I want to do is use FULLTEXT or LIKE (preferably FULLTEXT) to do this and
need to figure out a good way to filter based on separate words (ANY, ALL,
EXACT PHRASE).  Is there a way I can do this with mysql or ASP?  the pages
are completely in ASP and will have a 4.0 DB soon  Thank you everyone.  If
this is unclear, please email me in private.

- Deryck Henson
- http://www.sourcecodecafe.com


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

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




jdbc

2001-10-26 Thread Sandra Rovena Frigeri

Hi Peple,

thanks for informations about foreign key in mysql!

Now I need some informations about jdbc driver:
- Are there diferences for jdbc driver for diferent versions of mysql and jbuilder and 
jdk?
- I use jbuilder 2.0 and mysql 3.23.41, which jdbc driver is better? 


thanks

Sandra.


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

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




RE: MySQL problem with Traffic and Updates

2001-10-26 Thread Steve Meyers

 Today after my server got a real traffic hit for the first time since I
 installed PhpAdsNew (a MySQL/PHP Ad software), MySQL was crashed. 
 Here's how
 it happened: watching the top load levels, I saw it slow creep 
 up about to
 3, then rockets quickly to 30s, 40s, and on!! MySQL was at this 
 time taking
 up 100% of both of the processors in the server. There were about 40 or so
 MySQL processes spawned at this point. Doing a 'mysqladmin processlist'
 command on the server showed me a VERY LONG LIST of processes that were
 open, a lot of which were PhpAdsNew UPDATE commands.
 
This can happen with MyISAM tables, where table locking is an issue.  It should only 
be a problem if some ugly queries are happening though...

Here's the rundown (all queries are assumed to be on the same table):

1. Somebody runs a SELECT that takes a while to complete
2. Somebody runs an UPDATE or DELETE (or possibly INSERT, depending on the 
circumstances)
3. The UPDATE has to wait for the SELECT to finish to begin processing
4. All subsequent queries have to wait for the UPDATE to finish
5. Depending on configuration, you may run out of active MySQL threads to handle the 
incoming queries
6. The CPU spends all of it's time spawning new threads to handle the incoming 
connections, instead of finishing the SELECT that's holding up traffic
7. The increase in memory usage is enormous...
8. If things are really bad, the server will eventually crash

Possible solutions:

1. Get rid of all long SELECT statements
2. Add proper indexes so that long SELECT statements become short
3. Switch to InnoDB if #1 and #2 aren't feasible, the multi-versioning and row-level 
locking will eliminate those problems

There are other possible solutions.  I've done some work in similar environments, if 
you'd like I can help you find the best way to get your database working smoothly.

Steve Meyers



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

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




Column data type conversion Q

2001-10-26 Thread Tony

Not sure if this post worked the first time (I never saw it come in), so a 
thousand pardons if this is a re-post.

I come from the school of hard knocks, and so it seems my MySQL 
indoctrination is no exception.  2 million rows of 'varchar' data must be the 
least efficient type to sort by.

I need to change a column data type from 'varchar(10)' to 'int' type.

I created another table, with the changed data type on the one column.  I 
thought I read that nested selects were not supported by MySQL, but is it 
possible to do something like this:

 insert into new_table values (select '__enter-some-sort-of-on-the-fly-
data-type-conversion-on-a-column-or-two__' from old_table);


Or, is there an ALTER TABLE command on the existing table.  Surely, this 
would take a long time on a couple million rows.  I am running MySQL 3.23.36 
and RedHat 7.1 (2.4.3-12)

Kind regards,
Tony

--botspeak:  sql, query, database

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

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




Re: Uneven replication nodes??

2001-10-26 Thread Tony


No updates to the master is the rule, our primary key is actually based on a 
timestamp unless we can figure an auto_increment bigint (yes, expecting an 
obscene amount of transactions) as the key.  I think the bigint 
auto_increment might be a better option, certainly easier to use in a select 
as the key on one of the slaves than a pesky timestamp--er, I think.  

Right now it is timestamp.

Thanks for the thoughts guys, I'll be sure to provide feedback on the results 
if you are interested.

Regards,
Tony


On Thursday 25 October 2001 12:45 pm, Kyle Hayes wrote:
 On Wednesday 24 October 2001 23:09, Jeremy Zawodny wrote:
  On Wed, Oct 24, 2001 at 06:25:58AM -0400, Tony wrote:
   I am looking for a creative way to optimize my web application
   (largely reads) with a transaction firehose on the data input side.
   Batch vs. OLTP, if you will.
  
   Is there any technical reason why I could not configure the master
   database without indices and the slave(s) _with_ indices?  The
   intent being to isolate the inbound transactions from the reads
   _and_ make the database inserts as simple as possible (e.g. few or
   no indices).
 
  That ought to work.

 Unless you have _any_ UPDATEs.  Then, it'll slow to a crawl.  MySQL is
 really fast if you've got the right indexes.  It isn't much faster than
 grep on a big text file if you don't :-)

 If all you have are INSERTs and you can prove that they will never try to
 overwrite old data on the slaves, you should be fine.  This is a pretty
 serious constraint though.

   Several slaves could be configured to throttle performance on the
   web side (more reads, move slaves, etc.), which could gain a
   performance edge by indexing.
  
   For disaster recovery of the master, one slave could be untouched
   and not indexed.
  
   I'd be interested to hear comments.
 
  That's an interesting idea that I hadn't considered before.

 I'd be worried about maintaining the strict completely new INSERTs only
 policy over time.  If you are running stock or measurement data into it
 where it is guaranteed that it is always new INSERTs, you should be OK.

 Best,
 Kyle

 bot fodder: database, query, mysql, lions and tigers and bears, oh my!

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

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




Re: copying database from linux server to NT server

2001-10-26 Thread bcpunch

[EMAIL PROTECTED] wrote:

  Hi. I've been reading for several hours on this one. I've tried everything
  I've read. I'm either doing something really stupid or I've missed the
  point completely.
 
  I have a db on a linux server. I used phpAdmin to create a dump file
  (pe.sql) and retrieved it on my local machine. I've tried what I thought
  was the simplest way through mysql monitor to build the db locally:
 
  mysql new_DB  pe.sql
 
  and
 
  mysql new_DB  'pe.sql'
 
  but I get a syntax error.
 
  The dump file looks good with the CREATE TABLE statements and all the
  INSERT INTO as comma delimited.
 
  Once I get the db, I can just copy it over to the server. But I can't get
  the db.


Did you remeber to create the database on the NT box?
b.

Yup.




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

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




RE: Using ALTER to modify type of a Primary Key; URGENT

2001-10-26 Thread Don Read


On 26-Oct-2001 Tim Evans wrote:
 I have inherited a database built by someone else who was apparently
 very
 stingy. :-)
 
 A primary key was set to 'tinyint(4)' limiting the number of records
 to 128.
 
 I've tried:
 
 alter table my_data modify phyid mediumint unsigned DEFAULT 0;
 
 ...but got:
 
 ERROR 1121: Column 'phyid' is used with UNIQUE or INDEX but is not
 defined as NOT NULL
 

wait for it ...

alter table my_data modify phyid mediumint unsigned NOT NULL DEFAULT 0;

you may now bang your head on the wall.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)

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

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




Zork!

2001-10-26 Thread Kodrik

I wrote a php pipe that allows people to play Zork from their browser
http://phpzork.com

Zork is a 20 years old command based adventure games. One of the first and 
most popular. It's source code was released. Many of us here should remember 
it.

For those who don't know how to play, just type your commands such as open 
mailbox, go east.

I compiled Zork on my Linux box and used php to send commands and gather the 
output for the games with the system() call.
It supports all the features of the original games plus some more, like 
multiple saves and high scores of all players.
The interface is also modernized.

I didn't have to modify the C code in anyway, it is just a pipe with some 
processing and database interaction.
PHP talks to a MySQL database to store the member informatin (highs score, 
saves, log) so you cannot play without joining (it's free).

http://phpzork.com


Welcome to Dungeon. This version created 11-MAR-91.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.


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

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




Re: Uneven replication nodes??

2001-10-26 Thread Kyle Hayes

On Wednesday 24 October 2001 23:09, Jeremy Zawodny wrote:
 On Wed, Oct 24, 2001 at 06:25:58AM -0400, Tony wrote:
  I am looking for a creative way to optimize my web application
  (largely reads) with a transaction firehose on the data input side.
  Batch vs. OLTP, if you will.
 
  Is there any technical reason why I could not configure the master
  database without indices and the slave(s) _with_ indices?  The
  intent being to isolate the inbound transactions from the reads
  _and_ make the database inserts as simple as possible (e.g. few or
  no indices).

 That ought to work.

Unless you have _any_ UPDATEs.  Then, it'll slow to a crawl.  MySQL is really 
fast if you've got the right indexes.  It isn't much faster than grep on a 
big text file if you don't :-)

If all you have are INSERTs and you can prove that they will never try to 
overwrite old data on the slaves, you should be fine.  This is a pretty 
serious constraint though.

  Several slaves could be configured to throttle performance on the
  web side (more reads, move slaves, etc.), which could gain a
  performance edge by indexing.
 
  For disaster recovery of the master, one slave could be untouched
  and not indexed.
 
  I'd be interested to hear comments.

 That's an interesting idea that I hadn't considered before.

I'd be worried about maintaining the strict completely new INSERTs only 
policy over time.  If you are running stock or measurement data into it where 
it is guaranteed that it is always new INSERTs, you should be OK.

Best,
Kyle

bot fodder: database, query, mysql, lions and tigers and bears, oh my!

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MicroTelco Services saves money on every Fax:
- Fax to email (FREE)
- Fax to PSTN based Fax (Up to 95% Savings)
- Fax Broadcasting: Send 100s of faxes to fax machines
and email addresses in the time it takes to send just one!
===
So send a fax today and let us know what you think! 
   For more info. visit: www.internetfaxjack.com
===


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

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




ERROR 2002:

2001-10-26 Thread Chinta Kiran Kumar

Hello Everyone,

I ma new to mysql , i have read the online manual for installing mysql and 
installed it

i used MySQL-3.22.32-3.i386.rpm, MySQL-client-3.22.32-3.i386.rpm

and installed like this

#rpm -i MySQL-3.22.32-3.i386.rpm MySQL-client-3.22.32-3.i386.rpm

and after this i have given the passowrd entry as 

#/usr/bin/mysqladmin -u root password 'chinta'

and it did not give any error till now, but when i tried this below statement

chinta@linux:~  mysql -u root -p
Enter Password: chinta

then it gave a message like this:

ERROR 2002: cant connect to local mysql server through socket
'/var/lib/mysql/mysql.sock' (111)

and then i went and searched for help it mentioned that we have to specify 
the path for the files 'mysql.sock'

but my problem is i did not find files like mysql.sock, .cnf etc

I am using SuSe 7.1 profesional Edition and I have installed completely alll 
packages.. but even then how can i miss those files

Pls. let me know how to get those file...mysql.sock etc

this problem is eating my mind Pls. any one help me


-- 
Thanks  Regards

Chinta

[  [EMAIL PROTECTED]  ]

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

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




Problem compiling MySQL-4.0.0-alpha with charset german1

2001-10-26 Thread Stephan Skusa


PLEASE HELP!

if I do a

./configure --prefix=/usr/local/mysql-4.0.0 --with-charset=german1 --with-in
nodb --with-tcp-port=3307 --with-unix-socket-path=/tmp/mysql4.sock

and after this a

make

I get an error:

./conf_to_src ..  german1  \
  ./ctype_extra_sources.c
make[2]: *** [ctype_extra_sources.c] Error 132
make[2]: Leaving directory `/usr/src/mysql-4.0.0-alpha/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/mysql-4.0.0-alpha'
make: *** [all-recursive-am] Error 2


If I restart make after this the error-message is:

gcc -DDEFAULT_CHARSET_HOME=\/usr/local/mysql-4.0.0\ -DDATADIR=\/usr/local
/mysql-4.0.0/var\ -DSHAREDIR=\/usr/local/mysql-4.0.0/share/mysql\ -DUNDEF
_THREADS_HACK -DDONT_USE_RAID -I./../include -I../include -I./.. -I.. -I.. -
O3 -DDBUG_OFF -O6 -mcpu=pentiumpro -march=pentiumpro -DCPU=pentiumpro -c
ctype.c  -fPIC -DPIC -o .libs/ctype.lo
In file included from ctype.c:27:
ctype_autoconf.c:9: `ctype_german1' undeclared here (not in a function)
ctype_autoconf.c:9: initializer element is not constant
ctype_autoconf.c:9: (near initialization for `compiled_charsets[0].ctype')
ctype_autoconf.c:10: `to_lower_german1' undeclared here (not in a function)
ctype_autoconf.c:10: initializer element is not constant
ctype_autoconf.c:10: (near initialization for
`compiled_charsets[0].to_lower')
ctype_autoconf.c:11: `to_upper_german1' undeclared here (not in a function)
ctype_autoconf.c:11: initializer element is not constant
ctype_autoconf.c:11: (near initialization for
`compiled_charsets[0].to_upper')
ctype_autoconf.c:12: `sort_order_german1' undeclared here (not in a
function)
ctype_autoconf.c:12: initializer element is not constant
ctype_autoconf.c:12: (near initialization for
`compiled_charsets[0].sort_order')
make[2]: *** [ctype.lo] Error 1
make[2]: Leaving directory `/usr/src/mysql-4.0.0-alpha/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/mysql-4.0.0-alpha'
make: *** [all-recursive-am] Error 2


Where is the problem??

TIA

--

 Stephan Skusa mailto:[EMAIL PROTECTED]
   Lippe-Net Online-Service  http://www.lippe-net.de
   Herforder Strasse 309  tel.: +49 (0)521 - 977 998 - 0
   33609 Bielefeld - Germany  fax:  +49 (0)521 - 977 998 - 9
 Trees hit cars only in self-defence.



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

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




Mysql Defected

2001-10-26 Thread tpchan

Hi,
 
 I'm installing mysql from source tarball (*.tar.gz ) version 3.23.41. For
 your Infomation, I'm installing MySQL on a storage server and connect it
 through my web server using Scsi controller.
 
 My problem are when user took a very long time to trying to retrieve data
from MySQL server, even worst the connection reset. I tried to benchmark it
on a stand alone web server with database and the connection is normal.
 
 When I do 'ps -ef | grep mysql', I get the following result:
 
 root  1310 1  0 Oct23 ?00:00:00 sh
/var/lib/mysql/bin/safe_mysql
root  1336  1310  0 Oct23 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  1338  1336  0 Oct23 ?00:00:02
/var/lib/mysql/bin/mysqld --defa
root  1339  1338  0 Oct23 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  1807  1338  0 Oct23 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  1843  1338  0 Oct23 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  1978  1338  0 Oct23 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  2239  1338  0 Oct23 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  4083  1338  0 Oct24 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  8859  1338  0 Oct25 ?00:00:00
/var/lib/mysql/bin/mysqld --defa
root  9847  1338  0 01:23 ?00:00:04
/var/lib/mysql/bin/mysqld --defa
root 10503  1338  0 06:40 ?00:00:00
/var/lib/mysql/bin/mysqld --defa

May I know the different between

1) mysql19204   737  0 09:54 ?00:00:00
/usr/sbin/mysqld-max --basedir=/
 
 AND THIS ONE
 
 2) root 10503  1338  0 06:40 ?00:00:00
/var/lib/mysql/bin/mysqld --defa

Are they something wrong with my configuration on source installation?
 
Attach together is my variables for the MySQL Server.
 
 Please reply ASAP.
 
 Thank you.
 
 Emanduel Chan Tain Por
System Engineer
DotCom Consulting Sdn Bhd
DID : 603-62763230 ext. 112


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

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




[Fwd: what does it mean Open_files?]

2001-10-26 Thread Michal ejdl

Hi,
can somebody answer my question?

 Subject: what does it mean Open_files?
 Date: Mon, 22 Oct 2001 06:41:03 +0200
 From: Michal ejdl [EMAIL PROTECTED]
 To: MySQL list [EMAIL PROTECTED]
 
 Hi,
 after some testing on a new db, I have this status:
 
 [root@rachab /root]# mysqladmin e | grep "onn\|pen.*es"
 | Aborted_connects | 12 |
 | Connections  | 150194 |
 | Max_used_connections | 24 |
 | Open_tables  | 0  |
 | Open_files   | 7909   |
 | Opened_tables| 222981 |
 | Slave_open_temp_tables   | 0  |
 | Threads_connected| 1  |
 
 Option open-files-limit is set to 8192. But why Open_files is 7909 when
 Open_tables is 0 and only one connection (own mysqladmin) is
 estabilished? Is there any relation in Open_files, Open_tables and
 Threads_connected? Manual says yes, but these numbers doesn't agree
 with. Could it rather be Opened_files than Open_files?
 Kernel shows in /proc/sys/fs/file-nr:
 
 2155180616384
 
 AFAIK there are about 350 open files in system. Output from lsof
 coresponds with kernel status:
 
 [root@rachab /root]# lsof | grep mysqld | wc
 1131005   10028
 
 RH 7.1, kernel 2.4.3-12enterprise, mysql-3.23.42-1 (rawhide) with
 modified convert.cc (#define DEFINE_ALL_CHARACTER_SETS). File my.conf:
 
 [mysqld]
 datadir=/var/lib/mysql
 socket=/var/lib/mysql/mysql.sock
 default-character-set=czech
 language=czech
 log
 set-variable = key_buffer_size=16M
 set-variable = max_allowed_packet=10M
 set-variable = max_connections=200
 set-variable = record_buffer=1M
 set-variable = sort_buffer=4M
 set-variable = table_cache=512
 set-variable = tmp_table_size=8M
 skip-innodb
 
 [mysql.server]
 user=mysql
 basedir=/var/lib
 
 [safe_mysqld]
 err-log=/var/log/mysqld.log
 pid-file=/var/run/mysqld/mysqld.pid
 open-files-limit=8192
--
Ing. Michal ejdl   e-mail: [EMAIL PROTECTED]
Sokolovsk uheln, a.s. tel.: +420 168 46-5418

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

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




Re: Using ALTER to modify type of a Primary Key; URGENT

2001-10-26 Thread Aleksandar Bradaric

Hi,

 A primary key was set to 'tinyint(4)' limiting the number of records
 to 128.

 I've tried:

 alter table my_data modify phyid mediumint unsigned DEFAULT 0;

 ERROR 1121: Column 'phyid' is used with UNIQUE or INDEX but is not
 defined as NOT NULL

Try:
alter table  my_data modify phyid mediumint unsigned NOT NULL DEFAULT 0;
 

Sasa



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

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




Re: Transaction help

2001-10-26 Thread Heikki Tuuri

Luca,

Hi, I need transaction in my db. I installed Mysql max and I'm usind
InnoDb tables.
When an error occurred during the transaction the mysql continue with
the execution. Do I need to manually check every query result to
know if query get ok and then in case of error make a rollback?
I thought simply transaction sends an error and rollback automatically
on query error.
Thanks

ANSI specifies that at an SQL error only the current
SQL statement is rolled back, not the whole transaction.

An exception in MySQL is that a duplicate key error
currently only rolls back the insert of the current row.
This has relevance only in complex statements of type:
INSERT INTO ... SELECT ...

Another exception in InnoDB is that a transaction deadlock
or a lock wait timeout causes the whole transaction to be
rolled back, not just the SQL statement.

So, your application has to check the return status of
every SQL statement, and decide what to do in case of
an error: rollback, commit, or something else.

Regards,

Heikki
http://www.innodb.com/ibman.html



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

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




Re: copying database from linux server to NT server

2001-10-26 Thread massey

I use MySQLFront and do this.
Create my dump file
create the database
restore from dump
So far so good...


M;)

 [EMAIL PROTECTED] wrote:

 Hi. I've been reading for several hours on this one. I've tried
 everything I've read. I'm either doing something really stupid or I've
 missed the point completely.

 I have a db on a linux server. I used phpAdmin to create a dump file
 (pe.sql) and retrieved it on my local machine. I've tried what I
 thought was the simplest way through mysql monitor to build the db
 locally:

 mysql new_DB  pe.sql

 and

 mysql new_DB  'pe.sql'

 but I get a syntax error.

 The dump file looks good with the CREATE TABLE statements and all the
 INSERT INTO  as comma delimited.

 Once I get the db, I can just copy it over to the server. But I can't
 get the db.

 Did you remeber to create the database on the NT box?

 b.



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

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




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

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




RE: Query help...

2001-10-26 Thread Steve Meyers

Sure there could be problems if it's large.  In my explanation (in a different 
message) I noted that it wasn't the most efficient query in the world, but he wanted 
one query to get that answer.
 
Steve Meyers


 -Original Message-
 From: Woolsey, Fred [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 25, 2001 9:58 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Query help...
 
 
 Quite a neat trick... but might there be problems with cross join
 performance if the table is large?  This is based on the assumption that
 MySQL first creates the cross product, then culls out the rows that don't
 meet the criteria.
 
 Cheers,
 Fred Woolsey



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

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




Unicode

2001-10-26 Thread Tuy Le

Hello,

Currently, MySQL doesn't support Unicode, does it? Which version will
support? 

Are there any ways to use Unicode with MySQL? Can I insert data under binary
mode? 

Please reply me as soon as possible.

Thanks for your support.

Tuy Le

PS: Sorry to send mail to you directly because I don't know where to find
the answers.




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

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




Re: Installing Calendar 0.9.33 on Mac OS X

2001-10-26 Thread Marcin Kaskiewicz

Hello,
 (...)
G Unpack the calendar software in its own directory somewhere where
G your web server will find it.
 (...)

Make dir - instead of creating database with the files.
Truly to say, i do not knwo Mac, but on unix systems ussually u have
-in your home dir - dir like public_html or my_www which u access from browser by
typing http://www.yourdomain.com/~public_html

cd there, make dir like calendar, unpack files there using system
command for unpack (tar/gizp, whatever).

you should be able to start website by typing
http://www.yourdomain.com/~public_html/calendar/start.file
sart. file = index.php (i suppose, but it can be index.html or
whatever you find in calendar pack)

it should start - with errors, because u do not hae it configured yet.

After this - make all readme/install file ask for - create database,
chmod rights, edit config files. whatever you need.

if u do not have such dir like public_html or simmilar - u have to ask
you system administrator for info, wher u can put your website files.


G Where might this be? I'm not at all clear on where the webserver will
G find it. I tried putting it my Sites folder.
G Create the calendar tables using the supplied tables.sql file:
GMySQL (from command line):
G mysql intranet  tables-mysql.sql
G (where intranet is the name of your database)

G I get an error.

What kind of?  forward it here, please.

-- 
Pozdrowienia,
 Marcinmailto:[EMAIL PROTECTED]



__
Kto zostanie rajdowym mistrzem Polski ?
http://rajdy.hoga.pl/rajdy/01warszawski/program.asp

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

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




How I can do this

2001-10-26 Thread Javier

Hi,

I need do the follow:

Table 1.
Field 1. Varchar (6)
Field 2. Varchar (6)

The data in this table are for example

Field 1 Field 2
 A   TT
 A   YY
 A   RR
 B   FF
 B   KK

I need to obtain a result in the following form:

A  TTYYRR
B  FFKK

How can i do this? 

Thanks for any help!

Javier


Javier Diaz
IT Developer



*** This message has been scanned for all known viruses by MessageLabs. This message 
is intended for the stated recipients only and may be confidential. Opinions expressed 
in this email do not necessarily reflect the opinions of Globepost Travel or 
Travelselect.com. If you feel you received this email in error and would not like 
receive any further emails from travelselect.com, please reply to 
[EMAIL PROTECTED] ***

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

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




Memory allocators / STL

2001-10-26 Thread stefan

Hi!

We are currently developing a MT server (pthreads based, the main thread
does accept() and push_back to a vector that the threads pick up work from,
the threads share a global hash_map of cached information protected by a 
pthread_rwlock) and we seem to have an issue with confliting memory allocators 
(locking).

Our server is based purely on STL and we can get desent performance if we
compile it using the GCC/libstd++ flag __USE_MALLOC but this seems to lead 
to high level of memory defragmentation since the server is bogged down 
after a while of high load. From time to time we alse get memory leaks that 
we can't pinpoint to anything else than fragmentation...

Has anyone had this problem? I am sending this to the MySQL list since it
seems like the problem arises in combination with the mysql client library.
How does mysql allocate memory (treadsafety) and how could this collide with
the approach that the STL/GCC 3.0.1 does things?

Thanks!

/Stefan

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

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




Dropping Tables like . . .

2001-10-26 Thread Roger Karnouk

Is there a way to drop all tables that match a certain pattern, kind of like
using a LIKE statement in DROP statement.

if this worked it would be perfect
drop table like 'TT%';

in other words dropping all the tables in a database that start with 'TT'.

Roger Karnouk


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

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




Re: Histogram?

2001-10-26 Thread Carl Troein


George Eric R Contr AFSPC/CVYZ writes:

 Is there any function/command/neat query that you can use to get a histogram
 of a column's values?  I didn't find anything in the manual or the DuBois
 book.

GROUP BY does the trick, as long as you can make an expression
that converts any value into the number of its box. A simple
example would be
SELECT FLOOR(col1/10), COUNT(*) FROM table1 GROUP BY FLOOR(col1/10)

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


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

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




Re: Unicode

2001-10-26 Thread Philip White

Hi

You can store Unicode text in a binary column (BLOB) and convert it to/from
native Unicode format in your application. The most efficient form is likely
to be UTF-8 format, which has a variable character length (the lower 128
characters are the same as ASCII).
I have such a database that is storing Japanese, Arabic, Chinese, Russian
etc. as UTF8, and converts to a Java String by specifying the UTF8
encoding:

byte[] bytesStory = rs.getBytes (utf8Column);
String strStory = new String (bytesStory, UTF8);

The disadvantage of storing Unicode in a BLOB is that you can't really index
or search these columns, unless your UTF8 happens to be all ASCII (in which
case why use a BLOB?).

Phil White


- Original Message -
From: Tuy Le [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 26, 2001 4:03 AM
Subject: Unicode


 Hello,

 Currently, MySQL doesn't support Unicode, does it? Which version will
 support?

 Are there any ways to use Unicode with MySQL? Can I insert data under
binary
 mode?

 Please reply me as soon as possible.

 Thanks for your support.

 Tuy Le

 PS: Sorry to send mail to you directly because I don't know where to find
 the answers.




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

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



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

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




RE: Column data type conversion Q

2001-10-26 Thread Steve Meyers

Yes, and yes.  They're both documented in the manual.

http://www.mysql.com/doc/A/L/ALTER_TABLE.html
http://www.mysql.com/doc/I/N/INSERT.html
 
Steve Meyers


 -Original Message-
 From: Tony [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 25, 2001 12:57 PM
 To: [EMAIL PROTECTED]
 Subject: Column data type conversion Q
 
 
 Not sure if this post worked the first time (I never saw it come 
 in), so a 
 thousand pardons if this is a re-post.
 
 I come from the school of hard knocks, and so it seems my MySQL 
 indoctrination is no exception.  2 million rows of 'varchar' data 
 must be the 
 least efficient type to sort by.
 
 I need to change a column data type from 'varchar(10)' to 'int' type.
 
 I created another table, with the changed data type on the one column.  I 
 thought I read that nested selects were not supported by MySQL, but is it 
 possible to do something like this:
 
  insert into new_table values (select '__enter-some-sort-of-on-the-fly-
 data-type-conversion-on-a-column-or-two__' from old_table);
 
 
 Or, is there an ALTER TABLE command on the existing table.  Surely, this 
 would take a long time on a couple million rows.  I am running 
 MySQL 3.23.36 
 and RedHat 7.1 (2.4.3-12)
 
 Kind regards,
 Tony
 
 --botspeak:  sql, query, database
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 



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

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




how to synchronize two database in two machine?

2001-10-26 Thread sj

hi,

 I have two machine, install mysql, create same database.

 I want these two database can be the same at any time. in other word, if
one table be inserted a record in one machine, then the same table in
another machine can be inserted same record also.

 Who can tell me how to realize this function?

 thanks advance.



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

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




Re: Problem compiling MySQL-4.0.0-alpha with charset german1

2001-10-26 Thread Thomas Spahni

On Fri, 26 Oct 2001, Stephan Skusa wrote:

 if I do a
 
 ./configure --prefix=/usr/local/mysql-4.0.0 --with-charset=german1 --with-in
 nodb --with-tcp-port=3307 --with-unix-socket-path=/tmp/mysql4.sock

what about 
./configure --with-charset=latin1_de

??
Thomas Spahni


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

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




Re: Memory allocators / STL

2001-10-26 Thread Sinisa Milivojevic

[EMAIL PROTECTED] writes:
 Hi!
 
 We are currently developing a MT server (pthreads based, the main thread
 does accept() and push_back to a vector that the threads pick up work from,
 the threads share a global hash_map of cached information protected by a 
 pthread_rwlock) and we seem to have an issue with confliting memory allocators 
 (locking).
 
 Our server is based purely on STL and we can get desent performance if we
 compile it using the GCC/libstd++ flag __USE_MALLOC but this seems to lead 
 to high level of memory defragmentation since the server is bogged down 
 after a while of high load. From time to time we alse get memory leaks that 
 we can't pinpoint to anything else than fragmentation...
 
 Has anyone had this problem? I am sending this to the MySQL list since it
 seems like the problem arises in combination with the mysql client library.
 How does mysql allocate memory (treadsafety) and how could this collide with
 the approach that the STL/GCC 3.0.1 does things?
 
 Thanks!
 
 /Stefan

Hi!

It is very well known that most C++ compilers have huge problems with
threads when used in conjuction with C++ exceptions.

GNU has this problem even agravated, as even if you do not use C++
exceptions, libstdc++ does, so you will have problems. 

The only solution is not to use C++ exceptions and not to use
libstdc++ with GNU C++.

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


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

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




Re: Memory allocators / STL

2001-10-26 Thread stefan

Do you know if this is the case even with the GCC v3.0.1?
What is the recommended combination of compiler / STL implementation in order 
to work properly with MySQL client?

Thanks!

/Stefan

Quoting Sinisa Milivojevic [EMAIL PROTECTED]:

 Hi!
 
 It is very well known that most C++ compilers have huge problems with
 threads when used in conjuction with C++ exceptions.
 
 GNU has this problem even agravated, as even if you do not use C++
 exceptions, libstdc++ does, so you will have problems. 
 
 The only solution is not to use C++ exceptions and not to use
 libstdc++ with GNU C++.
 
 -- 
 Regards,
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
 /_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
___/   www.mysql.com
 
 

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

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




Re: Memory allocators / STL

2001-10-26 Thread Sinisa Milivojevic

[EMAIL PROTECTED] writes:
 Do you know if this is the case even with the GCC v3.0.1?
 What is the recommended combination of compiler / STL implementation in order 
 to work properly with MySQL client?
 
 Thanks!
 
 /Stefan
 


Yes, it is as I use the same compiler.

MySQL client can be used with plethora of compilers. Of the GNU
family, any from 2.95 or 3.* series will be just fine.

Regarding STL, it MUST be the one that came with the corresponding
compiler version. Mixing GNU compiler versions with libstdc+ from some
other version leads straight to catastrophe ...

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


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

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




Sum function not uses a valid decimal separator.

2001-10-26 Thread David Tomas Fargas

Sorry about that because there probably will be a stupid question but

I'm from Spain, and i use the , to represent decimal separator :
123.456,01 ?
well, the function sum in mysql 3.23.42 belive that . is the decimal
separator and then when he finds a , separator in a field returns results
that they aren't true.

How can I change the character that mysql uses to represent decimal
separator?

Thanks a lot for your time and sorry about my bad english...

David Tomas Fargas


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

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




RE: PLEASE HELP - HowTo: Forign Keys within MySQL?

2001-10-26 Thread McGrotty, Charles

Hello,

I have tables in a user administration database and need to link different
tables with FK's.

How do I do this?

for example:

I have two tables, one called applications, the other called
forum_moderators.

Applications Catches all form submissions.
Forum_Moderators hold the details of active/current moderators

I want to link these two tables by rsm_id in applications, and fk_rsm_id in
forum_mod's.

How would i do this in MySQL and or PHP?


Table Structure:
for those that need a clearer picture of my layout, I have supplied the SQL
statement to create the tables

#
#
# Table structure for table 'applications'
#
 
DROP TABLE IF EXISTS applications;
 
CREATE TABLE `applications` (
  `rsm_id` tinyint(4) NOT NULL auto_increment,
  `first_name` varchar(20) NOT NULL default '',
  `last_name` varchar(20) NOT NULL default '',
  `city` varchar(10) NOT NULL default '',
  `state` char(2) NOT NULL default '',
  `dob` varchar(10) NOT NULL default '',
  `forum_nick` varchar(20) NOT NULL default '',
  `forum_select1` varchar(30) NOT NULL default '',
  `forum_select2` varchar(30) NOT NULL default '',
  `forum_select3` varchar(30) NOT NULL default '',
  `bio` blob NOT NULL,
  `email_addr` varchar(100) NOT NULL default '',
  `processed` set('0','1') NOT NULL default '',
  `add_date` date NOT NULL default '-00-00',
  `accept_denied` set('A','D') NOT NULL default '',
  `acc_dec_date` date NOT NULL default '-00-00',
  PRIMARY KEY  (`rsm_id`),
  UNIQUE KEY `email_addr` (`email_addr`),
  UNIQUE KEY `forum_nick` (`forum_nick`),
  UNIQUE KEY `rsm_id` (`rsm_id`),
  KEY `rsm_id_2` (`rsm_id`),
  KEY `forum_nick_2` (`forum_nick`),
  KEY `email_addr_2` (`email_addr`)
#

#
# Table structure for table 'forum_moderators'
#
 
DROP TABLE IF EXISTS forum_moderators;
CREATE TABLE `forum_moderators` (
  `formod_id` tinyint(4) NOT NULL auto_increment,
  `name` varchar(40) NOT NULL default '',
  `city` varchar(10) NOT NULL default '',
  `state` char(2) NOT NULL default '',
  `forum_nick` varchar(20) NOT NULL default '',
  `mod_forum_1` varchar(30) NOT NULL default '',
  `mod_forum_2` varchar(30) NOT NULL default '',
  `mod_forum_3` varchar(30) NOT NULL default '',
  `email_addr` varchar(100) NOT NULL default '',
  `tremination_date` date default NULL,
  `fk_rsm_id` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`formod_id`),
  UNIQUE KEY `formod_id` (`formod_id`,`forum_nick`),
  KEY `formod_id_2` (`formod_id`)
) TYPE=MyISAM;
#
#

Regards,
Charlie

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

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




Re: copying database from linux server to NT server

2001-10-26 Thread bcpunch

The MySQLFront solution worked like a charm. Thanks, and thanks to all who 
replied to my queries on this one.

Brent


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

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




Table is full?

2001-10-26 Thread Elm Gysel

Hello again!

I'm currently inserting all my records into the table and suddenly after
1909152 records I get the error on an INSERT query :

The table table_name is full

each record is 36 bytes * 1909152 records is 68729472bytes = 68.7mb

I'm using innodb tables and innodb_data_file_path is set to
innodb_data_file_path = ibdata1:200M;

So I'm really not even half away from the total size.

From what I can read on http://www.mysql.com/doc/F/u/Full_table.html this
should only happen when I SELECT data and not when I INSERT data?

Does anyone know whats going on here?

Another question is if I can just increase tha value of
innodb_data_file_path = ibdata1 variable without losing my data?

Thanks again!!

Elm


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

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




Mysql and Windows XP

2001-10-26 Thread nyko

Hello,

I tried to get MySql running on an Windows XP OS. But when i try to connect 
to the database i get a message like:

This machine is refusing (or blocking) the request of mysql ???

Anybody an idea ?

Thanks,

Nyko


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

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




Re: Table is full?

2001-10-26 Thread Heikki Tuuri

Elm,

Hello again!

I'm currently inserting all my records into the table and suddenly after
1909152 records I get the error on an INSERT query :

The table table_name is full

each record is 36 bytes * 1909152 records is 68729472bytes = 68.7mb

I'm using innodb tables and innodb_data_file_path is set to
innodb_data_file_path = ibdata1:200M;

So I'm really not even half away from the total size.

From what I can read on http://www.mysql.com/doc/F/u/Full_table.html this
should only happen when I SELECT data and not when I INSERT data?

Does anyone know whats going on here?

Another question is if I can just increase tha value of
innodb_data_file_path = ibdata1 variable without losing my data?

You must add a new data file ibdata2 as explained in the manual.

InnoDB tables use more space than MyISAM tables because of,
trx ids, roll pointers (for multiversioning), clustered indexes,
and no key compression. See the manual at
http://www.innodb.com/ibman.html
about physical record structure.

Thanks again!!

Elm

Regards,

Heikki



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

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




joining a string and a value to a variable

2001-10-26 Thread sonicstate

Hi, I'm new here may as well jump right in with a question


Anyone know the equivalent of
's' + convert(varchar,id) as dkey

The result I get in MSSQL 7 is s1, s2, s3 etc

have tried 's'+id as dkey but just get  1,2,3 etc

need to concatenate the two values 's'id inside a query to populate a 
verity collection



Nick Batt - CTO
Sonic State Ltd.
http://www.sonicstate.com
[EMAIL PROTECTED]
tel:+44 (0)1225 442546



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

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




Making Foreign Keys within MySQL?

2001-10-26 Thread McGrotty, Charles

I realized I made my previous post look like it was a reply and not the
original question, so here I go again...=o)

Original message below
=

Hello,

I have tables in a user administration database and need to link different
tables with FK's for integrity.

How do I do this?

for example:

I have two tables, one called applications, the other called
forum_moderators.

Applications Catches all form submissions.
Forum_Moderators hold the details of active/current moderators

I want to link these two tables by rsm_id in applications, and fk_rsm_id in
forum_mod's.

How would i do this in MySQL and or PHP?


Table Structure:
for those that need a clearer picture of my layout, I have supplied the SQL
statement to create the tables

#
#
# Table structure for table 'applications'
#

DROP TABLE IF EXISTS applications;

CREATE TABLE `applications` (
  `rsm_id` tinyint(4) NOT NULL auto_increment,
  `first_name` varchar(20) NOT NULL default '',
  `last_name` varchar(20) NOT NULL default '',
  `city` varchar(10) NOT NULL default '',
  `state` char(2) NOT NULL default '',
  `dob` varchar(10) NOT NULL default '',
  `forum_nick` varchar(20) NOT NULL default '',
  `forum_select1` varchar(30) NOT NULL default '',
  `forum_select2` varchar(30) NOT NULL default '',
  `forum_select3` varchar(30) NOT NULL default '',
  `bio` blob NOT NULL,
  `email_addr` varchar(100) NOT NULL default '',
  `processed` set('0','1') NOT NULL default '',
  `add_date` date NOT NULL default '-00-00',
  `accept_denied` set('A','D') NOT NULL default '',
  `acc_dec_date` date NOT NULL default '-00-00',
  PRIMARY KEY  (`rsm_id`),
  UNIQUE KEY `email_addr` (`email_addr`),
  UNIQUE KEY `forum_nick` (`forum_nick`),
  UNIQUE KEY `rsm_id` (`rsm_id`),
  KEY `rsm_id_2` (`rsm_id`),
  KEY `forum_nick_2` (`forum_nick`),
  KEY `email_addr_2` (`email_addr`)
#

#
# Table structure for table 'forum_moderators'
#

DROP TABLE IF EXISTS forum_moderators;
CREATE TABLE `forum_moderators` (
  `formod_id` tinyint(4) NOT NULL auto_increment,
  `name` varchar(40) NOT NULL default '',
  `city` varchar(10) NOT NULL default '',
  `state` char(2) NOT NULL default '',
  `forum_nick` varchar(20) NOT NULL default '',
  `mod_forum_1` varchar(30) NOT NULL default '',
  `mod_forum_2` varchar(30) NOT NULL default '',
  `mod_forum_3` varchar(30) NOT NULL default '',
  `email_addr` varchar(100) NOT NULL default '',
  `tremination_date` date default NULL,
  `fk_rsm_id` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`formod_id`),
  UNIQUE KEY `formod_id` (`formod_id`,`forum_nick`),
  KEY `formod_id_2` (`formod_id`)
) TYPE=MyISAM;
#
#

Regards,
Charlie

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

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


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

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




Re: joining a string and a value to a variable

2001-10-26 Thread Kalok Lo

there's a concat(string1, string2) function
and also a  concat_ws(',', string1, string2) newstring
--concat with separator comma alias newstring

http://www.mysql.com/doc/S/t/String_functions.html
Refer to the above page for more useful string functions


- Original Message -
From: sonicstate [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 26, 2001 9:00 AM
Subject: joining a string and a value to a variable


 Hi, I'm new here may as well jump right in with a question


 Anyone know the equivalent of
 's' + convert(varchar,id) as dkey

 The result I get in MSSQL 7 is s1, s2, s3 etc

 have tried 's'+id as dkey but just get  1,2,3 etc

 need to concatenate the two values 's'id inside a query to populate a
 verity collection


 
 Nick Batt - CTO
 Sonic State Ltd.
 http://www.sonicstate.com
 [EMAIL PROTECTED]
 tel:+44 (0)1225 442546
 


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

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


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

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




Re: joining a string and a value to a variable

2001-10-26 Thread sonicstate

Thanks! works a treat!


n

At 09:09 26/10/2001 -0400, Kalok Lo wrote:
there's a concat(string1, string2) function
and also a  concat_ws(',', string1, string2) newstring
--concat with separator comma alias newstring

http://www.mysql.com/doc/S/t/String_functions.html
Refer to the above page for more useful string functions


- Original Message -
From: sonicstate [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 26, 2001 9:00 AM
Subject: joining a string and a value to a variable


  Hi, I'm new here may as well jump right in with a question
 
 
  Anyone know the equivalent of
  's' + convert(varchar,id) as dkey
 
  The result I get in MSSQL 7 is s1, s2, s3 etc
 
  have tried 's'+id as dkey but just get  1,2,3 etc
 
  need to concatenate the two values 's'id inside a query to populate a
  verity collection
 
 
  
  Nick Batt - CTO
  Sonic State Ltd.
  http://www.sonicstate.com
  [EMAIL PROTECTED]
  tel:+44 (0)1225 442546
  
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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

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



Nick Batt - CTO
Sonic State Ltd.
http://www.sonicstate.com
[EMAIL PROTECTED]
tel:+44 (0)1225 442546



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

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




AW: Problem compiling MySQL-4.0.0-alpha with charset german1

2001-10-26 Thread Stephan Skusa


latin1_de results in the same problem!

 -Ursprungliche Nachricht-
 Von: Thomas Spahni [mailto:[EMAIL PROTECTED]]
 Gesendet: Freitag, 26. Oktober 2001 11:32
 An: Stephan Skusa
 Cc: [MYSQL]
 Betreff: Re: Problem compiling MySQL-4.0.0-alpha with charset german1
 
 
 On Fri, 26 Oct 2001, Stephan Skusa wrote:
 
  if I do a
  
  ./configure --prefix=/usr/local/mysql-4.0.0 
 --with-charset=german1 --with-in
  nodb --with-tcp-port=3307 --with-unix-socket-path=/tmp/mysql4.sock
 
 what about 
 ./configure --with-charset=latin1_de
 
 ??
 Thomas Spahni
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 

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

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




Dont want to unsubscribe from mysql list

2001-10-26 Thread Andrew Murphy

Im not very happy about this :(

Someone is trying to unsubscribe me from the MySQL mailing list!
I havent confirmed the request as I dont want to unsubscribe.

Who is '[EMAIL PROTECTED]' ???

Andrew Murphy


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 25 October 2001 11:17 am
To: [EMAIL PROTECTED]
Subject: confirm unsubscribe from [EMAIL PROTECTED]


Hi! This is the ezmlm program. I'm managing the
[EMAIL PROTECTED] mailing list.

To confirm that you would like

   [EMAIL PROTECTED]

removed from the mysql mailing list, please send an empty reply 
to this address:

SNIP
...

SNIP

--- Enclosed is a copy of the request I received.

Return-Path: [EMAIL PROTECTED]
Received: (qmail 12535 invoked from network); 25 Oct 2001 10:16:34 -
Received: from unknown (HELO mail4.citiz.net) (61.151.248.37)
  by www.mysql.com with SMTP; 25 Oct 2001 10:16:34 -
Received: (mail 72245 invoked by uid 0); 25 Oct 2001 10:19:52 -
Received: from unknown (HELO wuhaihua) (61.169.79.15)
  by mail4.citiz.net with SMTP; 25 Oct 2001 10:19:52 -
Date: Thu, 25 Oct 2001 18:26:16 +0800
From: =?ISO-8859-1?Q?=CE=E2=BA=A3=BB=AA?= [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
[EMAIL PROTECTED]
Subject: 
X-mailer: FoxMail 3.11 Release [cn]
Mime-Version: 1.0
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: quoted-printable

mysql-unsubscribe-andrew.murphy=3Dase-solutions.co.uk=A3=AC=C4=FA=BA=C3=A3=A
1

[EMAIL PROTECTED]

=D6=C2
=C0=F1=A3=A1

=CE=E2=BA=A3=BB=AA
[EMAIL PROTECTED]

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

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




how to run sql script in NT

2001-10-26 Thread Barbara Ferrell

i am extremely new at this:

i am on  NT4.0

i am in a DOS screen at the mysql prompt (mysql)
the path that is described in the top of the window is: =3D
c:\apache\mysql\bin\mysql.exe


i wrote a script to create and load a database exactly as it said in the =
=3D
book..  i saved the file as ..Temp.sql

then i typed:
mysql temp.sql ;  at the mysql prompt

it doesn't recognize the .sql file... how do I get it to run?



the temp.sql  file has this in it:

create database temp ;
USE DATABASE Temp;
CREATE TABLE Test_Table
(Test_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
Test_Name VARCHAR(30),
Test_Date DATETIME,
Test_Giver VARCHAR(30));
INSERT INTO Test_Table
(Test_ID, Test_Name, Test_Date, Test_Giver)
VALUES
(null, 'Test', '2000-01-01', 'barb');












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

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




RE: how to run sql script in NT

2001-10-26 Thread Andrew Murphy

Hi,

Try typing:
  mysql  Temp.sql
while at the DOS prompt.


Andrew


-Original Message-
From: Barbara Ferrell [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2001 2:15 pm
To: [EMAIL PROTECTED]
Cc: barbara
Subject: how to run sql script in NT


i am extremely new at this:

i am on  NT4.0

i am in a DOS screen at the mysql prompt (mysql)
the path that is described in the top of the window is: =3D
c:\apache\mysql\bin\mysql.exe


i wrote a script to create and load a database exactly as it said in the =
=3D
book..  i saved the file as ..Temp.sql

then i typed:
mysql temp.sql ;  at the mysql prompt

it doesn't recognize the .sql file... how do I get it to run?



the temp.sql  file has this in it:

create database temp ;
USE DATABASE Temp;
CREATE TABLE Test_Table
(Test_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
Test_Name VARCHAR(30),
Test_Date DATETIME,
Test_Giver VARCHAR(30));
INSERT INTO Test_Table
(Test_ID, Test_Name, Test_Date, Test_Giver)
VALUES
(null, 'Test', '2000-01-01', 'barb');












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

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

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

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




Re: how to run sql script in NT

2001-10-26 Thread Philip White

You don't need to be at the mysql prompt to run it, just run this from the
DOS prompt:

mysql temp.sql

and that will run mysql.exe and read everything from your temp.sql file.



- Original Message -
From: Barbara Ferrell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: barbara [EMAIL PROTECTED]
Sent: Friday, October 26, 2001 2:15 PM
Subject: how to run sql script in NT


 i am extremely new at this:

 i am on  NT4.0

 i am in a DOS screen at the mysql prompt (mysql)
 the path that is described in the top of the window is: =3D
 c:\apache\mysql\bin\mysql.exe


 i wrote a script to create and load a database exactly as it said in the =
 =3D
 book..  i saved the file as ..Temp.sql

 then i typed:
 mysql temp.sql ;  at the mysql prompt

 it doesn't recognize the .sql file... how do I get it to run?



 the temp.sql  file has this in it:

 create database temp ;
 USE DATABASE Temp;
 CREATE TABLE Test_Table
 (Test_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
 Test_Name VARCHAR(30),
 Test_Date DATETIME,
 Test_Giver VARCHAR(30));
 INSERT INTO Test_Table
 (Test_ID, Test_Name, Test_Date, Test_Giver)
 VALUES
 (null, 'Test', '2000-01-01', 'barb');












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

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



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

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




Re: how to run sql script in NT

2001-10-26 Thread Gerald Clark

I'm confused.
You say you are at a dos prompt, but you show a mysql prompt.

At the dos prompt do:

mysql  temp.sql

At the mysql prompt:

source temp.sql



Barbara Ferrell wrote:

 i am extremely new at this:
 
 i am on  NT4.0
 
 i am in a DOS screen at the mysql prompt (mysql)
 the path that is described in the top of the window is: =3D
 c:\apache\mysql\bin\mysql.exe
 
 
 i wrote a script to create and load a database exactly as it said in the =
 =3D
 book..  i saved the file as ..Temp.sql
 
 then i typed:
 mysql temp.sql ;  at the mysql prompt
 
 it doesn't recognize the .sql file... how do I get it to run?
 
 
 
 the temp.sql  file has this in it:
 
 create database temp ;
 USE DATABASE Temp;
 CREATE TABLE Test_Table
 (Test_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
 Test_Name VARCHAR(30),
 Test_Date DATETIME,
 Test_Giver VARCHAR(30));
 INSERT INTO Test_Table
 (Test_ID, Test_Name, Test_Date, Test_Giver)
 VALUES
 (null, 'Test', '2000-01-01', 'barb');
 
 
 
 
 
 
 
 
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
[EMAIL PROTECTED]


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

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




Indexing Problem

2001-10-26 Thread Wai Lee

Hi all,

Can someone tell me how to speed up the index creation???

I am trying to build an index for a 13,875,354 records(13 million) table
with 176,322 distinct vendor_id(VARCHAR(40)) in the table.

the existing size of the transaction table:
transaction.MYD = 2,128,954,624 bytes
transaction.MYI = 1,096,510,464 bytes (there are already 5 indexes built in
this table)
transaciton.frm = 9,450 bytes

I dig through the manual and changed any possible settings

set-variable= max_heap_table_size=2000M
set-variable= key_buffer=2500M
set-variable= max_allowed_packet=1M
set-variable= table_cache=512
set-variable= sort_buffer=2500M
set-variable= join_buffer=2500M
set-variable= record_buffer=2500M
set-variable= myisam_sort_buffer_size=2500M
set-variable= myisam_max_sort_file_size=2500M
set-variable= myisam_max_extra_sort_file_size=2500M
set-variable= thread_cache=8


We are running mySQL in a 4G memory linux box, I believe the buffer size I
allocated to mySQL should cache the whole table. Instead, I am wrong, while
building a new index, I saw there was temporary files created for the
transaction table (the write disk activities were very source consuming) and
the single index creation took 4.5 hours to finished
Unbelievable

Any suggestions will be greatly helpful!!!

Lee
Zeborg Inc.


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

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




FW: how to run sql script in NT

2001-10-26 Thread Woolsey, Fred

Forgot to change the To address to the list...

FCW

-Original Message-
From: Woolsey, Fred 
Sent: Friday, October 26, 2001 10:12 AM
To: 'Barbara Ferrell'
Subject: RE: how to run sql script in NT


Barbara,

You can redirect the script to mysql as input on the command line, like
this:

c:mysql -u username --password=yourpassword databasenamepath/temp.mysql

if you want to use a specifica database or

c:mysql -u username --password=yourpasswordpath/temp.mysql

if your sql script takes care of selecting the database (as yours does).

Hope this helps!

Chers,
Fred Woolsey

The  causes the sql file to be read as input commands by the mysql
client.  Also, this assumes you

-Original Message-
From: Barbara Ferrell [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 9:15 AM
To: [EMAIL PROTECTED]
Cc: barbara
Subject: how to run sql script in NT


i am extremely new at this:

i am on  NT4.0

i am in a DOS screen at the mysql prompt (mysql)
the path that is described in the top of the window is: =3D
c:\apache\mysql\bin\mysql.exe


i wrote a script to create and load a database exactly as it said in the =
=3D
book..  i saved the file as ..Temp.sql

then i typed:
mysql temp.sql ;  at the mysql prompt

it doesn't recognize the .sql file... how do I get it to run?



the temp.sql  file has this in it:

create database temp ;
USE DATABASE Temp;
CREATE TABLE Test_Table
(Test_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
Test_Name VARCHAR(30),
Test_Date DATETIME,
Test_Giver VARCHAR(30));
INSERT INTO Test_Table
(Test_ID, Test_Name, Test_Date, Test_Giver)
VALUES
(null, 'Test', '2000-01-01', 'barb');












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

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

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

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




C++ Newbie

2001-10-26 Thread Francois Barnard

Hi i have got borland 5.5 commandline compiler and i have just downloaded
c++ api for mysql.What must i do with the include files to get it to work

Francois 


** 
Any review, retransmission, dissemination or other use of, or taking of any
action in reliance upon, this information by persons or entities other than
the intended recipient is prohibited. If you have received this message in
error, you should destroy it and ensure the sender is notified. Agreements,
conclusions and other information in this message not related to the
official business of Naspers, shall be understood as neither given, nor
endorsed nor authorised by it. Advise the sender immediately if you or your
employer do not consent to internet email for communications of this kind.
Reasonable care was taken to transmit this message free of damaging code,
however Naspers and the sender does not make any warranties in this regard,
and cannot be held liable for any loss or damages incurred by the recipient.
Naspers retains the copyright in this message.
** 



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

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




Image

2001-10-26 Thread Riccardi Moreno


How can i insert image in a database.


- Moreno Riccardi

 

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

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




Request for information (MS Access - MySQL)

2001-10-26 Thread Rob Vonsee

Dear developer,

For some years now, we developed a database application in MicroSoft's 
Access '97.
With our user base growing, we're encountering more and more limitations in 
the Microsoft development environment, especially in the stability and 
number of simultaneous sessions of the database.
Years ago, one of the main reasons for us to choose the Microsoft Access 
database was the fact that it can be distributed license free, giving us a 
leading edge in the market.
From what we hear, MySQL can be a good option for us to do our future 
development with.
In order not to waste our Access development knowledge, we would like to 
continue developing in Access, but then use MySQL as database instead.

Our question to you is:
Do you know of any party that has gone this way before us and where we can 
continue our inquiries?
Not only to answer our questions, but perhaps they could also do the first 
conversions/engineering/development with us.
Since we are a Dutch company, preferably a contact in The Netherlands, but 
please don't hesistate to answer if you have another lead.

Hoping to hear from you soon,

Kind regards,

Robbert Vons
[EMAIL PROTECTED]

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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

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




MS Access Front end with MySQL Back-end

2001-10-26 Thread Matt Sellers

Hi there,

I am new to MySQL, but not to databases.  I have several MS Access
databases (97 and 2000) that I would like to integrate, storing their data
in a MySQL database.  I want to keep the Access 97 and 2000 front ends,
because my users are comfortable with them.

I had autonumber fields in Access tables to generate IDs for records.  I
emulated that behavior by having auto_increment fields in the MySQL DB
when I move the data.  I have installed myODBC and set up a connection for
Access.  I Get External Data from Access, and link to the MySQL table.  I
have tried having MyODBC set to Return matching rows and not, and to
Simulate ODBC 1.0 and not.  Here's the problem.  When I insert a row in a
table (from the table in Datasheet view, or from a form), I leave the ID
field null so mySQL will assign it.  When I move off the record, all fields
show #Deleted.  If I exit the table and re-enter, or if I requery the
form, the record is there with the expected ID from mySQL.

Is there some way I can have Access behave in a more acceptable manner when
dealing with linked MySQL tables with auto_increment fields?

Versions of software I am using:
 MS Access 2000
 MySQL server version: 3.23.38-nt
 MySQL ODBC ver 2.50.37.00

Thanks,
Matt Sellers


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

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




Re: Indexing Problem

2001-10-26 Thread Sergei Golubchik

Hi!

On Oct 26, Wai Lee wrote:
 Hi all,
 
 Can someone tell me how to speed up the index creation???
 
 I am trying to build an index for a 13,875,354 records(13 million) table
 with 176,322 distinct vendor_id(VARCHAR(40)) in the table.
 
 the existing size of the transaction table:
 transaction.MYD = 2,128,954,624 bytes
 transaction.MYI = 1,096,510,464 bytes (there are already 5 indexes built in
 this table)
 transaciton.frm = 9,450 bytes
 
 I dig through the manual and changed any possible settings
 
 set-variable= max_heap_table_size=2000M
 set-variable= key_buffer=2500M
 set-variable= max_allowed_packet=1M
 set-variable= table_cache=512
 set-variable= sort_buffer=2500M
 set-variable= join_buffer=2500M
 set-variable= record_buffer=2500M
 set-variable= myisam_sort_buffer_size=2500M
 set-variable= myisam_max_sort_file_size=2500M
 set-variable= myisam_max_extra_sort_file_size=2500M
 set-variable= thread_cache=8
 
 
 We are running mySQL in a 4G memory linux box, I believe the buffer size I
 allocated to mySQL should cache the whole table. Instead, I am wrong, while
 building a new index, I saw there was temporary files created for the
 transaction table (the write disk activities were very source consuming) and
 the single index creation took 4.5 hours to finished
 Unbelievable
 
 Any suggestions will be greatly helpful!!!

What did SHOW PROCESSLIST show ? Was it repair by sort or repair with
keycache ? If the latter - increase myisam_max_sort_file_size
(and, may be, myisam_max_extra_sort_file_size).

Anyway, huge i/o indicates something wrong with variable settings.

Regards,
Sergei

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

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

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




MS Access 2k - MySQL Tools

2001-10-26 Thread McGrotty, Charles

Hello everyone,

I too, am in a simular position, though not a business venture.

I have some private databases that I would like to port to MySQL
from MS Access 2000.  If you know of any tools that will export all
the tables and queries to a MySQL equivlent, and convert the forms
to html, php or something simular - Then please let me know.

Free or otherwise! - I need this so bad, so developers, do what you
do best, and write a application to cater for the ever increasing
demand!

Regards,
Charlie




Ron Vonsee wrote:
===

-Original Message-
From: Rob Vonsee [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 10:36 AM
To: [EMAIL PROTECTED]
Cc: McGrotty, Charles
Subject: Request for information (MS Access - MySQL)


Dear developer,

For some years now, we developed a database application in MicroSoft's
Access '97.
With our user base growing, we're encountering more and more limitations in
the Microsoft development environment, especially in the stability and
number of simultaneous sessions of the database.
Years ago, one of the main reasons for us to choose the Microsoft Access
database was the fact that it can be distributed license free, giving us a
leading edge in the market.
From what we hear, MySQL can be a good option for us to do our future
development with.
In order not to waste our Access development knowledge, we would like to
continue developing in Access, but then use MySQL as database instead.

Our question to you is:
Do you know of any party that has gone this way before us and where we can
continue our inquiries?
Not only to answer our questions, but perhaps they could also do the first
conversions/engineering/development with us.
Since we are a Dutch company, preferably a contact in The Netherlands, but
please don't hesistate to answer if you have another lead.

Hoping to hear from you soon,

Kind regards,

Robbert Vons
[EMAIL PROTECTED]

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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

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


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

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




Problem with LIKE

2001-10-26 Thread Dejan Milenkovic

Hi i have a problem with searching TEXT columns for appearance of particilur
words.
Here is the example of what I'm traying to do:


mysql SELECT Why this does not work LIKE work;
+---+
| Why this does not work LIKE work|
+---+
|
0 |
+---+

and this works

mysql SELECT Why this does not work LIKE %work;
+--+
| Why this does not work LIKE %work |
+--+
|
1 |
+--+

Why LIKE does't recognize word work at the end of the row when it's a
separate word

Sorry for bad english

Any help would be appriciated


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

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




Re: Indexing Problem

2001-10-26 Thread Kyle Hayes

On Friday 26 October 2001 07:18, Wai Lee wrote:

 I dig through the manual and changed any possible settings

 set-variable= max_heap_table_size=2000M
 set-variable= key_buffer=2500M
 set-variable= max_allowed_packet=1M
 set-variable= table_cache=512
 set-variable= sort_buffer=2500M
 set-variable= join_buffer=2500M
 set-variable= record_buffer=2500M
 set-variable= myisam_sort_buffer_size=2500M
 set-variable= myisam_max_sort_file_size=2500M
 set-variable= myisam_max_extra_sort_file_size=2500M
 set-variable= thread_cache=8

I am not certain, but I think you told MySQL to use 2.5G x 5 or 12.5GB!  That 
is a little more than the 4GB you have in the machine :-)

In general, the advice I have seen it to make sure that all allocated buffers 
take no more than about 50% of the memory in the machine. MySQL allocates 
buffer space for indexes, but _NOT_ data.  It lets the OS do that.  Linux 
does caching of disk data very well, but you need to leave it some room to do 
this.  When you leave at least 50% of the space for the OS, it has a chance 
to cache disk data and accesses will be much faster.

If you have a lot of large indexes, I would drop these settings to something 
like:

 set-variable= max_heap_table_size=200M
 set-variable= key_buffer=1000M
 set-variable= max_allowed_packet=1M
 set-variable= table_cache=512
 set-variable= sort_buffer=250M
 set-variable= join_buffer=250M
 set-variable= record_buffer=250M
 set-variable= myisam_sort_buffer_size=250M
 set-variable= myisam_max_sort_file_size=2500M
?? Not sure about this one.  Check the manual.

 set-variable= myisam_max_extra_sort_file_size=2500M
?? Not sure about this one.  Check the manual.

 set-variable= thread_cache=8

Best,
Kyle

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MicroTelco Services saves money on every Fax:
- Fax to email (FREE)
- Fax to PSTN based Fax (Up to 95% Savings)
- Fax Broadcasting: Send 100s of faxes to fax machines
and email addresses in the time it takes to send just one!
===
So send a fax today and let us know what you think! 
   For more info. visit: www.internetfaxjack.com
===


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

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




RE: Mysql and Windows XP

2001-10-26 Thread nyko

I know about the firewall. But i when i disable the firewall i still have 
the same problem.

 XP has a built in firewall you might have to allow access to port 3306
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: 26 October 2001 13:49
 To: [EMAIL PROTECTED]
 Subject: Mysql and Windows XP
 
 
 Hello,
 
 I tried to get MySql running on an Windows XP OS. But when i try to
 connect 
 to the database i get a message like:
 
 This machine is refusing (or blocking) the request of mysql ???
 
 Anybody an idea ?
 
 Thanks,
 
 Nyko
 
 
 -
 Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED] To
 unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



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

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




Re: Indexing Problem

2001-10-26 Thread Fournier Jocelyn [Presence-PC]

Hi,

Your record_buffer and sort_buffer seem far too high.
Don't forget MySQL could eat up ((sort_buffer + record_buffer) *
max_connections + key_buffer)  Mo of memory.
Even with a max_connections set to 1, MySQL could eat in your case up to 7
Go of memory =)


- Original Message -
From: Wai Lee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 26, 2001 4:18 PM
Subject: Indexing Problem


 Hi all,

 Can someone tell me how to speed up the index creation???

 I am trying to build an index for a 13,875,354 records(13 million) table
 with 176,322 distinct vendor_id(VARCHAR(40)) in the table.

 the existing size of the transaction table:
 transaction.MYD = 2,128,954,624 bytes
 transaction.MYI = 1,096,510,464 bytes (there are already 5 indexes built
in
 this table)
 transaciton.frm = 9,450 bytes

 I dig through the manual and changed any possible settings

 set-variable= max_heap_table_size=2000M
 set-variable= key_buffer=2500M
 set-variable= max_allowed_packet=1M
 set-variable= table_cache=512
 set-variable= sort_buffer=2500M
 set-variable= join_buffer=2500M
 set-variable= record_buffer=2500M
 set-variable= myisam_sort_buffer_size=2500M
 set-variable= myisam_max_sort_file_size=2500M
 set-variable= myisam_max_extra_sort_file_size=2500M
 set-variable= thread_cache=8


 We are running mySQL in a 4G memory linux box, I believe the buffer size I
 allocated to mySQL should cache the whole table. Instead, I am wrong,
while
 building a new index, I saw there was temporary files created for the
 transaction table (the write disk activities were very source consuming)
and
 the single index creation took 4.5 hours to finished
 Unbelievable

 Any suggestions will be greatly helpful!!!

 Lee
 Zeborg Inc.


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

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




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

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




INSERT, UPDATE and Groundhogs

2001-10-26 Thread Jonathan M. Morgan

I am working my way through Paul DuBois' excellent book MySQL and Perl for
the Web.  One of the examples shows how to conduct a poll- vote for your
favorite groundhog:  http://www.kitebird.com/cgi-perl/groundhog.pl
Paul then suggests modifying the poll ...to log EACH vote and when it
occurred so that you can perform time-based analysis of poll activity.

How does one tally the vote (UPDATE) and insert a new record for each vote?

The original MySQL table is as follows:

CREATE TABLE
(
name CHAR(10) NOT NULL,
tally INT UNSIGNED NOT NULL DEFAULT 0
)

The vote tally is updated like this:

$dbh-do (UPDATE groundhog SET tally = tally + 1 WHERE name = ?,
undef, $name);

I updated the table to include an auto incremented vote_id(PRIMARY KEY) as
well as a timestamp.  But how do you log each vote and tally the vote?

Thanks!

JMM





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

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




Re: How do you view the warnings in mysql

2001-10-26 Thread craig . donlon

Hi:

Can anyone twll me how to view warnings in mysql ?

Craig

--
Dr Craig Donlon
European Commission Joint Research Centre, Institute for Environment and 
Sustainability,
Inland and Marine Water Unit, TP272, I-21020 Ispra (VA), ITALY.
Tel: +39 0332 786353 Fax:+39 0332 789034  e-mail:[EMAIL PROTECTED]




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

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




mysqladmin shutdown in OS X

2001-10-26 Thread Michael Boudreau

I just installed mysql-3.23.43-apple-darwin1.3.1 on my OS X (10.1) machine.

When I use the mysqladmin shutdown command, the command seems to hang. 
Running top in a separate terminal window shows both the server and the 
mysqladmin process as still running.

Is this a known problem?


=
Michael Boudreau
Senior Electronic Publishing Developer
The University of Chicago Press
1427 E. 60th Street
Chicago, IL 60637-2954

phone: 773 753 3298
fax: 773 753 3383
= 


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

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




@HOSTNAME@: not found

2001-10-26 Thread Ari Davidow

When I start mysql 3.23.38 on our Solaris 2.8 machine, with or without
the /etc/my.cnf file read (i.e., I can move it out of the way or not), I
get the following messages:

/etc/rc2.d/S99mysql: @HOSTNAME@: not found

S99mysql is the script that starts up MySQL when I reboot the machine (I
believe it points to a script in init.d).

This is especially confusing because the script is set to run in the
Bourne shell, and my limited knowledge of same doesn't know of a
variable called @HOSTNAME@. There is a HOST, accessed, presumably, by
$host, but substituting that into the script doesn't appear to work,
either.

Ideas?

Kyle Hayes wrote:
 
 On Friday 26 October 2001 07:18, Wai Lee wrote:
 
  I dig through the manual and changed any possible settings
 
  set-variable= max_heap_table_size=2000M
  set-variable= key_buffer=2500M
  set-variable= max_allowed_packet=1M
  set-variable= table_cache=512
  set-variable= sort_buffer=2500M
  set-variable= join_buffer=2500M
  set-variable= record_buffer=2500M
  set-variable= myisam_sort_buffer_size=2500M
  set-variable= myisam_max_sort_file_size=2500M
  set-variable= myisam_max_extra_sort_file_size=2500M
  set-variable= thread_cache=8
 
 I am not certain, but I think you told MySQL to use 2.5G x 5 or 12.5GB!  That
 is a little more than the 4GB you have in the machine :-)
 
 In general, the advice I have seen it to make sure that all allocated buffers
 take no more than about 50% of the memory in the machine. MySQL allocates
 buffer space for indexes, but _NOT_ data.  It lets the OS do that.  Linux
 does caching of disk data very well, but you need to leave it some room to do
 this.  When you leave at least 50% of the space for the OS, it has a chance
 to cache disk data and accesses will be much faster.
 
 If you have a lot of large indexes, I would drop these settings to something
 like:
 
  set-variable= max_heap_table_size=200M
  set-variable= key_buffer=1000M
  set-variable= max_allowed_packet=1M
  set-variable= table_cache=512
  set-variable= sort_buffer=250M
  set-variable= join_buffer=250M
  set-variable= record_buffer=250M
  set-variable= myisam_sort_buffer_size=250M
  set-variable= myisam_max_sort_file_size=2500M
 ?? Not sure about this one.  Check the manual.
 
  set-variable= myisam_max_extra_sort_file_size=2500M
 ?? Not sure about this one.  Check the manual.
 
  set-variable= thread_cache=8
 
 Best,
 Kyle
 
 --
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 MicroTelco Services saves money on every Fax:
 - Fax to email (FREE)
 - Fax to PSTN based Fax (Up to 95% Savings)
 - Fax Broadcasting: Send 100s of faxes to fax machines
 and email addresses in the time it takes to send just one!
 ===
 So send a fax today and let us know what you think!
For more info. visit: www.internetfaxjack.com
 ===
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 

Ari Davidow
Applications Administrator, Web Central
Tufts University

617-627-4291
[EMAIL PROTECTED]

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

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




Re: Indexing Problem

2001-10-26 Thread Sergei Golubchik

Hi!

On Oct 26, Kyle Hayes wrote:
 On Friday 26 October 2001 07:18, Wai Lee wrote:
 
  I dig through the manual and changed any possible settings
 
  set-variable= max_heap_table_size=2000M
  set-variable= key_buffer=2500M
  set-variable= max_allowed_packet=1M
  set-variable= table_cache=512
  set-variable= sort_buffer=2500M
  set-variable= join_buffer=2500M
  set-variable= record_buffer=2500M
  set-variable= myisam_sort_buffer_size=2500M
  set-variable= myisam_max_sort_file_size=2500M
  set-variable= myisam_max_extra_sort_file_size=2500M
  set-variable= thread_cache=8
 
 I am not certain, but I think you told MySQL to use 2.5G x 5 or 12.5GB!  That 
 is a little more than the 4GB you have in the machine :-)

No. Some of these variables are per-thread settings, so in the worts
case MySQL will try to allocate much more than 12.5GB.

But it's doesn't matter - as there were not that many clients accessing
the db during the index creation (I presume), so sort_buffer,
join_buffer, and record_buffer settings does not matter.

And for a dedicated task of building the index
myisam_sort_buffer_size=2500M looks ok.

Still, it never hurts to control memory consumption with top :-)
Other tasks can eat up the memory.

  set-variable= max_heap_table_size=200M
  set-variable= key_buffer=1000M
  set-variable= max_allowed_packet=1M
  set-variable= table_cache=512
  set-variable= sort_buffer=250M
  set-variable= join_buffer=250M
  set-variable= record_buffer=250M
  set-variable= myisam_sort_buffer_size=250M

That's too small for 4G RAM (unless one tries to rebuild multi-gigabyte
index on heavily loaded database server).

  set-variable= myisam_max_sort_file_size=2500M
 ?? Not sure about this one.  Check the manual.

To be increased.

  set-variable= myisam_max_extra_sort_file_size=2500M
 ?? Not sure about this one.  Check the manual.

To be increased.

Regards,
Sergei

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

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

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




connections not closing

2001-10-26 Thread Michael Griffith

What could be a possible cause for DB connections that do not close? I have
a Apache-PHP-mysql setup and the apache/php thread appears to exit, but
show processlist report connections that stay open and sleep

Is there a way to determine what was run on that connection that may have
caused it to stay open? Shouldn't the connection close itself when the php
thread exits. I'm not using persistent connects.

Any help appreciated.


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

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




RE: MS Access Front end with MySQL Back-end

2001-10-26 Thread Venu

Hi 

 -Original Message-
 From: Matt Sellers [mailto:[EMAIL PROTECTED]]
 Sent: Friday, October 26, 2001 7:37 AM
 To: [EMAIL PROTECTED]
 Subject: MS Access Front end with MySQL Back-end


 Hi there,

 I am new to MySQL, but not to databases.  I have several MS Access
 databases (97 and 2000) that I would like to integrate, storing their data
 in a MySQL database.  I want to keep the Access 97 and 2000 front ends,
 because my users are comfortable with them.

 I had autonumber fields in Access tables to generate IDs for records.  I
 emulated that behavior by having auto_increment fields in the MySQL DB
 when I move the data.  I have installed myODBC and set up a connection for
 Access.  I Get External Data from Access, and link to the MySQL table.  I
 have tried having MyODBC set to Return matching rows and not, and to
 Simulate ODBC 1.0 and not.  Here's the problem.  When I insert a row in a
 table (from the table in Datasheet view, or from a form), I leave the ID
 field null so mySQL will assign it.  When I move off the record, all fields
 show #Deleted.  If I exit the table and re-enter, or if I requery the
 form, the record is there with the expected ID from mySQL.

 Is there some way I can have Access behave in a more acceptable manner when
 dealing with linked MySQL tables with auto_increment fields?

 Versions of software I am using:
  MS Access 2000
  MySQL server version: 3.23.38-nt
  MySQL ODBC ver 2.50.37.00

Please check the following link for the work-around solutions when the
records in the linked tables are displayed as #DELETED
http://www.mysql.com/documentation/mysql/bychapter/manual_Clients.html#MyODBC_c
lients

Also, upgrade the driver to 2.50.39, available from
http://www.mysql.com/downloads/api-myodbc.html

Regards, venu
--
For technical support contracts, go to https://order.mysql.com
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Venu [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/ California, USA
   ___/ www.mysql.com




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

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




Sun/Solari 8 64bit and Mysql

2001-10-26 Thread andresm

Hello,

sorry that I'm bothering you, but I havent fount answer to question:
Does MySQL take any advantage from SUN SPARC/Solaris 8 64bit
architecture. I think there may be little adavatage when I compile mysql
with 64bit Forthe compiler than 32bit gcc, because Forthe uses then
64bit librarys. But best result will encounter when mysql is designed
for 64bit archidecture.

With best regards,
Andres Magi



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

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


Replication and table locking

2001-10-26 Thread Jon Gardiner

Hello all,

We are doing a lot of data warehousing type work. The catch is we
need to get data back out in seconds rather than minutes. To accomplish this
we generate summary tables in real time. The problem we run into is that
generating the summary tables becomes very costly and our selects and
updates are stepping on each others toes. 

So here is what I'm wondering: In such an update heavy environment
would replication be helpful? Would reading from the slave be any faster
than reading from the master or would the overhead of replicating hundreds
of updates/second make replication a bad idea? And, as a follow up, if we
set up a replication scheme like this, could we use lock tables on the
master server for 10 seconds or so at a time to increase the number of
updates/second we can process? 

Thanks,
Jon Gardiner

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

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




JDBC: Losing precision when mapping doubles from Java

2001-10-26 Thread Roland

 Hello,
 I'm losing precision when I send a double to a mysql database from a Java
 program trough JDBC.
 Code:
 stmt.setDouble(i+3,((Double)value).doubleValue());
 
 I use a prepared statement.
 Now, if I print out the double in java before sending it to the MySql
 database this is what it looks like:
 1277.00143924408
 (11 decimal digits)
 
 When I look in the database, this is what the value looks like:
 1277.00143924
 (8 decimal digits)
 
 The type of the column is double(without any precision or digits
 specification).
 
 Now the big question is: what happened to the last 3 decimal digits?
 Or is this just a display problem? Does the database only display 8
 decimal digits by default?
 So I changed the type in the table to double(40,20) and now the
 value in the database changes to:
 
 1277.0014392408155417
 (exactly 20 decimal digits)
 
 Ok, next I set the type to double(40,11) and I get:
 1277.00143924000
 (11 decimal digits).
 
 Anyway, I lose the last digits. WHY? I thought that the MySql double
 type has the same precision than the java double type? Whats wrong
 here?
 
 Thanks for any answers...
 
 



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

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




Re: Update JDBC Driver (gweMysql Driver)

2001-10-26 Thread TAKAHASHI, Tomohiro
  Hi, All
  I Fixed two bugs.

  1. If LoginUser has empty password, Driver can not connect to MySQL.
  2. Connection Pool does not work correctly. ;-)


  Check this URL out for new Driver. :-)
  http://www.t3-jpn.com/jdbc/jdbcmysql.html  

"TAKAHASHI, Tomohiro" wrote:
 
   I updated JDBC Driver i maintained.  :-)
 
 [Download]
   JDBC Driver for MySQL JDBC2.0  J2EE
http://www.t3-jpn.com/jdbc/jdbcmysql.html
 
--
TAKAHASHI, Tomohiro

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

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


Problem with LIKE

2001-10-26 Thread Christopher Book




Like doesn't distinguish between words, it just matches patterns.
Your first query didn't match because work does not match Why this does
not work and you didn't use wildcards.
Your second query worked because you used a wildcard so Why this does not
work matches /ANYTHING/ + 'work'

If you want to search for specific words in a string try:

SELECT  String of words  LIKE  words ;
by adding spaces around your search term and around your string you can
match whole words.  This is pretty basic and may not be what you're trying
to do, but I hope this helps.

Chris




Here is the example of what I'm traying to do:


mysql SELECT Why this does not work LIKE work;
+---+
| Why this does not work LIKE work|
+---+
|
0 |
+---+

and this works

mysql SELECT Why this does not work LIKE %work;
+--+
| Why this does not work LIKE %work |
+--+
|
1 |
+--+

Why LIKE does't recognize word work at the end of the row when it's a
separate word

Sorry for bad english

Any help would be appriciated



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

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




Re: Image

2001-10-26 Thread M. A. Alves

 How can i insert image in a database.

If you want to insert binary data into a BLOB column, the following
characters must be represented by escape sequences:

NUL ASCII 0. You should represent this by `\0' (a backslash and an ASCII
`0' character).
\ ASCII 92, backslash. Represent this by `\\'.
' ASCII 39, single quote. Represent this by `\''.
 ASCII 34, double quote. Represent this by `\'.

If you write C code, you can use the C API function mysql_escape_string()
to escape characters for the INSERT statement.

  (The MySQL Manual, section 7.1.1)

Cheers,

-- 
   ,
 M A R I O   data miner, LIACC, room 221   tel 351+226078830, ext 121
 A M A D O   Rua Campo Alegre, 823 fax 351+226003654
 A L V E S   P-4150 PORTO, Portugalmob 351+939354002



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

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




INSERT, UPDATE and Groundhogs

2001-10-26 Thread Christopher Book

Basically for each vote you insert a new record, and then to determine the
tally, you have to do a count(*) on the number of records for each vote.
so have   ID | NAME | TIMESTAMP columns.

You log each vote by doing an insert (insert into whatever (name, timestamp)
values ('answer', 'timestamp')
and then to get the tally for that vote do :
select name, count (*) from table group by name.

if you only want the tally for one vote than just add a WHERE clause.

Chrsi

I am working my way through Paul DuBois' excellent book MySQL and Perl for
the Web. One of the examples shows how to conduct a poll- vote for your
favorite groundhog: http://www.kitebird.com/cgi-perl/groundhog.pl Paul then
suggests modifying the poll ...to log EACH vote and when it occurred so
that you can perform time-based analysis of poll activity. How does one
tally the vote (UPDATE) and insert a new record for each vote? The original
MySQL table is as follows: CREATE TABLE ( name CHAR(10) NOT NULL, tally INT
UNSIGNED NOT NULL DEFAULT 0 ) The vote tally is updated like this: $dbh-do
(UPDATE groundhog SET tally = tally + 1 WHERE name = ?, undef, $name); I
updated the table to include an auto incremented vote_id(PRIMARY KEY) as
well as a timestamp. But how do you log each vote and tally the vote?
Thanks! JMM 


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

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




Re: JDBC: Losing precision when mapping doubles from Java

2001-10-26 Thread TAKAHASHI, Tomohiro
  Hi, Roland

  Try my JDBC Driver.

   http://www.t3-jpn.com/jdbc/jdbcmysql.html
   http://www.t3-jpn.com/jdbc/download/gweMysqlJDBC_extra3.zip

Thanks.

Roland wrote:
 
  Hello,
  I'm losing precision when I send a double to a mysql database from a Java
  program trough JDBC.
  Code:
  stmt.setDouble(i+3,((Double)value).doubleValue());
 
  I use a prepared statement.
  Now, if I print out the double in java before sending it to the MySql
  database this is what it looks like:
  1277.00143924408
  (11 decimal digits)
 
  When I look in the database, this is what the value looks like:
  1277.00143924
  (8 decimal digits)

  snip

-- 
TAKAHASHI, Tomohiro

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

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


RE: Indexing Problem

2001-10-26 Thread Wai Lee

Hi,

Thanks for the ones reply this email.

The SHOW PROCESSLIST had a state Repair by sorting while creating the
index. I assume the
set-variable= myisam_max_sort_file_size=2500M
set-variable= myisam_max_extra_sort_file_size=2500M
is large enough to cache the index.

My question is when creating the index, mysql first will write the original
table data file to temporary file
(something like #sql-.MYD) and sort the temporary file by the index
column, and build the index file. Is it true?

I also thinking to use a partial column for the index, now the column I use
is VARCHAR(40), and I am not sure when I use
create index idx1 on transaction(vendor_id(20));
will help???




-Original Message-
From: Sergei Golubchik [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 10:53 AM
To: Wai Lee
Cc: [EMAIL PROTECTED]
Subject: Re: Indexing Problem


Hi!

On Oct 26, Wai Lee wrote:
 Hi all,

 Can someone tell me how to speed up the index creation???

 I am trying to build an index for a 13,875,354 records(13 million) table
 with 176,322 distinct vendor_id(VARCHAR(40)) in the table.

 the existing size of the transaction table:
 transaction.MYD = 2,128,954,624 bytes
 transaction.MYI = 1,096,510,464 bytes (there are already 5 indexes built
in
 this table)
 transaciton.frm = 9,450 bytes

 I dig through the manual and changed any possible settings

 set-variable= max_heap_table_size=2000M
 set-variable= key_buffer=2500M
 set-variable= max_allowed_packet=1M
 set-variable= table_cache=512
 set-variable= sort_buffer=2500M
 set-variable= join_buffer=2500M
 set-variable= record_buffer=2500M
 set-variable= myisam_sort_buffer_size=2500M
 set-variable= myisam_max_sort_file_size=2500M
 set-variable= myisam_max_extra_sort_file_size=2500M
 set-variable= thread_cache=8


 We are running mySQL in a 4G memory linux box, I believe the buffer size I
 allocated to mySQL should cache the whole table. Instead, I am wrong,
while
 building a new index, I saw there was temporary files created for the
 transaction table (the write disk activities were very source consuming)
and
 the single index creation took 4.5 hours to finished
 Unbelievable

 Any suggestions will be greatly helpful!!!

What did SHOW PROCESSLIST show ? Was it repair by sort or repair with
keycache ? If the latter - increase myisam_max_sort_file_size
(and, may be, myisam_max_extra_sort_file_size).

Anyway, huge i/o indicates something wrong with variable settings.

Regards,
Sergei

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


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

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




Re: Chinese - East Asian Languages

2001-10-26 Thread Jason Wong

On Friday 26 October 2001 21:40 pm, Gerd Ruschhaupt wrote:
 Hallo!
 I would like to know, if Mysql works with Chinese or Japanese or
 Arabic languages.
 Thats all!
 Thank you for your Answers.

It seems to work OK with Big5 Chinese, I suspect it will work OK with 
GB Chinese as well.

hth
-- 
Jason Wong
Gremlins Associates
www.gremlins.com.hk

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

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




Autoincrement question

2001-10-26 Thread Demirchyan Oganes-AOD098

Hello everyone,

I wanted to ask you 2 questions.

1. I have a table that has 2 columns, user_id, user_name.
User_id has been setup to a default value 1000 and to AUTO_INCREMENT.

When I insert a record, Insert Into User_Table (user_id,user_name) Values (Null,'Jon 
Doe');
I get  1  John Doe.  But I'm expecting something like 1000 John Doe. And when I do 
another insert, then it will be 1001.  Why this Default Value definition not making 
sure that I start with 1000?

Thanks,


Oganes Demirchyan
Motorola Life Science
757 S.Raymond
Pasadena, CA  91105
Tel: 626-584-5900
email: [EMAIL PROTECTED]


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

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




Re: JDBC: Losing precision when mapping doubles from Java

2001-10-26 Thread Roland

   Hi, Roland

   Try my JDBC Driver.

http://www.t3-jpn.com/jdbc/jdbcmysql.html
http://www.t3-jpn.com/jdbc/download/gweMysqlJDBC_extra3.zip

 Thanks.

Hello, thanks for the quick answer.
Your page has a link to:
http://www.gwe.co.uk/
which is not working. Is there some information in english? Sorry, but I
can't read japanese :).

I have downloaded your driver. And will try to test it ASAP(as soon as
possible)

Thanks, Roland


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

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


Generate random, unique value...

2001-10-26 Thread Dana Holt


Can I automatically generate a random, unique, integer value in a certain
range when inserting data into a column using SQL?

If so, how?

Thanks..

Dana


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

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




Seg faults with mysql_query mysql_ping using libmysqld

2001-10-26 Thread greg . kurzawa . b

Hello,

I am experiencing seg faults in seemingly innocent code with MySQL version 4.0.0
and the embedded library, libmysqld.
The fault only happens when calling particular functions, specifically
mysql_ping() and mysql_query().  There might be others, but these are the only
ones I've found so far.

Following is the code:



/*
 * A simple example client, using the embedded MySQL server library
 */

#include mysql.h
#include stdarg.h
#include stdio.h
#include stdlib.h


MYSQL * db_connect();
void db_disconnect(MYSQL *db);
void db_query(MYSQL *db, const char *SQL);


static char *server_groups[] = {
  test_client_SERVER,
  server,
  NULL
};


int main( int argc, char **argv) {

  MYSQL *mysqldb;

  mysql_server_init(argc, argv, server_groups);
  mysqldb = db_connect();

   /* grab some server information */

   fprintf ( stderr, host info: %s\n, mysql_get_host_info(mysqldb) );
   fprintf ( stderr, server info: %s\n, mysql_get_server_info(mysqldb) );
   fprintf ( stderr, protocol info: %d\n, mysql_get_proto_info(mysqldb) );

   /* SEGFAULT HAPPENS HERE */
   mysql_ping(mysqldb);

   /* IF I TAKE OUT THE MYSQL_PING, SEGFAULT HAPPENS HERE */
   mysql_query ( mysqldb, SHOW TABLE STATUS );

   mysql_close( mysqldb );
   mysql_server_end();

  exit (0);
}


MYSQL *
db_connect() {
  MYSQL *db = mysql_init(NULL);

  if (!db)
fprintf ( stderr, mysql_init failed: no memory.\n );

  fprintf ( stderr, calling mysql_real_connect():  );
  if ( ! mysql_real_connect(db, NULL, NULL, NULL, NULL, 0, NULL, 0) )
fprintf ( stderr, FAILURE: %s\n, mysql_error(db) );
  else
fprintf ( stderr, SUCCESS\n );

  return db;
}


void db_query(MYSQL *db, const char *SQL) {
   int result;

   fprintf ( stderr, calling mysql_query():  );
   result = mysql_query (db, SQL );

   if ( result == 0 ) fprintf ( stderr, SUCCESS\n );
   else fprintf ( stderr, FAILURE: %s\n, mysql_error(db) );

   fprintf ( stderr, result code: %d\n, result );

}


void db_disconnect(MYSQL *db) {
  mysql_close(db);
}







The client seems to init the database okay, and it seems to connect okay, and it
even gathers information with the mysql_get_server_info, mysql_get_proto_info
and mysql_get_host info calls, but then mysteriously seg faults at the
mysql_ping or the mysql_query.

If anyone can spot any glaring mistakes in the code that might be the cause of
this, please let me know.

I compile the code with the following command:
gcc -g -W -Wall -D_THREAD_SAFE -D_REENTRANT -I/usr/include/mysql mysql.c
-L/usr/lib/mysql -static -lmysqld -lpthread -lz -lcrypt -lnsl -lm -lrt -o mysql


Greg Kurzawa
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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

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




RE: Generate random, unique value...

2001-10-26 Thread Shankar Unni

Dana Holt writes:

  Can I automatically generate a random, unique, integer value
  in a certain range when inserting data into a column using SQL?

Random? Like how random?

* Math.random() random? And still unique? That's really tough..
* Or just you don't care, but not sequential random?
* Or just unique, and you don't care if it's sequential or not,
   but you just don't want to be bothered to start from where
   you left off, or worry about other client hosts random?

Generally, you'd want to use UUIDs for the simplest case of this, but the
standard UUID algorithms (DCE, etc.) generate 128-bit UUIDs (and so are 
best used as CHAR(36) (with the standard DCE representation) or CHAR(32) if 
you simply encode the whole thing as a single hex string.

Or use two 64-bit INTs as the primary key, and split the 128-bit key among 
them.

You can fake 64-bit UUIDs for limited scenarios (like within your own
intranet, etc.) by cooking up an ID based on, e.g., 16 bits of IP
address, 32 bits of a start time (of the database), and 16 bits of
counter (where you carry over any counter overflows into the start
timestamp part). Vary the parameters, of course, based on your intranet
situation.. Or some such method..


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

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




Re: Autoincrement question

2001-10-26 Thread Bill Adams

Demirchyan Oganes-AOD098 wrote:

 Hello everyone,

 I wanted to ask you 2 questions.

 1. I have a table that has 2 columns, user_id, user_name.
 User_id has been setup to a default value 1000 and to AUTO_INCREMENT.

 When I insert a record, Insert Into User_Table (user_id,user_name) Values (Null,'Jon 
Doe');
 I get  1  John Doe.  But I'm expecting something like 1000 John Doe. And when I do 
another insert, then it will be 1001.  Why this Default Value definition not making 
sure that I start with 1000?

The documentation or FAQ found on mysql.com should answer how to get your 
auto_increment column to start at a value other than 1.

b.



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

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




Re: Generate random, unique value...

2001-10-26 Thread Kyle Hayes

On Friday 26 October 2001 10:00, Dana Holt wrote:
 Can I automatically generate a random, unique, integer value in a certain
 range when inserting data into a column using SQL?

 If so, how?

Random is easy.  Just find a good RNG (random number generator) somewhere 
(there are many available on the 'net, search on Google).  Or, use the RAND 
function that comes with MySQL.  You can find RNGs that have extremely long 
periods.

Unique is easy.  Just use an auto-increment field in MySQL.

Random _and_ unique are not that simple.

Grab a handy book on cryptography.  There are operations on numeric 
(bitstring) values that will do what you want starting with a guaranteed 
unique input (such as from an auto-increment field or a sequence).  The key 
thing to remember is that uniqueness and randomness can be derived in two 
steps, they need not be done in one.

Are you sure it needs to be random?  By definition, if it is unique, it 
can't be totally random since a random number would have a certain 
probability of being the same value twice after a certain number of samples.

Is there a simple SQL statement that will do what you want?  Probably not.

Best,
Kyle

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MicroTelco Services saves money on every Fax:
- Fax to email (FREE)
- Fax to PSTN based Fax (Up to 95% Savings)
- Fax Broadcasting: Send 100s of faxes to fax machines
and email addresses in the time it takes to send just one!
===
So send a fax today and let us know what you think! 
   For more info. visit: www.internetfaxjack.com
===


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

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




Problems with TCP Wrappers

2001-10-26 Thread Rick Mallett

With respect to mysql support for the use of tcp wrappers I wish to
report a bug in the documentation and two suggestions for improvement
to the source code. All comments pertain to version 3.23.43.

First, the following information in section 2.6.3 (Solaris Notes) of
the MySQL manual is totally incorrect and should be deleted from the
manual.

  When using the --with-libwrap configure option, you must also include
  the libraries that `libwrap.a' needs:

  --with-libwrap=/opt/NUtcpwrapper-7.6/lib/libwrap.a -lnsl -lsocket

In fact, --with-libwrap must point at the tcp wrapper install
directory (eg. /opt/NUtcpwrapper-7.6), since the configure script will
attempt to locate the tcpd.h include file using code similar to the
following

  gcc -E -I/opt/NUtcp_wrappers_7.6/include conftest.c /dev/null 2conftest.out

and in like fashion the existence of the library will be checked for
using a configuration test which includes the above -I clause and an
appropriate -L clause pointing to the appropriate lib directory
/opt/NUtcp_wrappers_7.6/lib with a -lwrap option and with the
appropriate ancilliary libraries (eg. -lnsl -lsocket) automatically
included in the compilation of the test.

In other words, the intuitively obvious setting is correct, and the
setting suggested in the manual is totally incorrect. 

Also, on the subject of using tcp wrappers it would help if there was
some way to control the syslog facility at configure/compile time as in

  #ifdef HAVE_LIBWRAP
libwrapName= my_progname+dirname_length(my_progname);
openlog(libwrapName, LOG_PID, TCPD_FACILITY);
  #endif

where TCPD_FACILITY could be set to LOG_AUTH by default to provide
current behaviour or to some other facility such as LOG_LOCAL7 which
is what it has to be in my situation. 

I also recommend that the code be amended to include a log entry on
successful connection in addition to connection refusal, since it is
common for programs which use tcp wrappers to exhibit this behaviour.
This would require an else clause on the if (!hosts_access(req))
statement in mysqld.cc (see WITH_LIBWRAP) with the following as the
sole entry in the else

   syslog(allow_severity, connect from %s, eval_client(req));

This will not bloat the syslog file, BTW, since it only applies to 
connections from other machines and not to connections via localhost
which would be predominant in most installations, IMO. 

- rick mallett

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

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




Re: Making Foreign Keys within MySQL?

2001-10-26 Thread Tore Van Grembergen

The only table type at this moment that supports foreign keys is innodb.
it is distributed with mysql 4.0.
However you need to take the source files or the tar file to instal, the
rpm's have an older version of innodb.

On creation of the table you have to define your constraints (cf manual at
www.innodb.com)
For the moment it is nog possible to do it with an alter table after the
table is created.


- Original Message -
From: McGrotty, Charles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 26, 2001 3:10 PM
Subject: Making Foreign Keys within MySQL?


 I realized I made my previous post look like it was a reply and not the
 original question, so here I go again... =o)

 Original message below
 =

 Hello,

 I have tables in a user administration database and need to link different
 tables with FK's for integrity.

 How do I do this?

 for example:

 I have two tables, one called applications, the other called
 forum_moderators.

 Applications Catches all form submissions.
 Forum_Moderators hold the details of active/current moderators

 I want to link these two tables by rsm_id in applications, and fk_rsm_id
in
 forum_mod's.

 How would i do this in MySQL and or PHP?


 Table Structure:
 for those that need a clearer picture of my layout, I have supplied the
SQL
 statement to create the tables

 #
 #
 # Table structure for table 'applications'
 #

 DROP TABLE IF EXISTS applications;

 CREATE TABLE `applications` (
   `rsm_id` tinyint(4) NOT NULL auto_increment,
   `first_name` varchar(20) NOT NULL default '',
   `last_name` varchar(20) NOT NULL default '',
   `city` varchar(10) NOT NULL default '',
   `state` char(2) NOT NULL default '',
   `dob` varchar(10) NOT NULL default '',
   `forum_nick` varchar(20) NOT NULL default '',
   `forum_select1` varchar(30) NOT NULL default '',
   `forum_select2` varchar(30) NOT NULL default '',
   `forum_select3` varchar(30) NOT NULL default '',
   `bio` blob NOT NULL,
   `email_addr` varchar(100) NOT NULL default '',
   `processed` set('0','1') NOT NULL default '',
   `add_date` date NOT NULL default '-00-00',
   `accept_denied` set('A','D') NOT NULL default '',
   `acc_dec_date` date NOT NULL default '-00-00',
   PRIMARY KEY  (`rsm_id`),
   UNIQUE KEY `email_addr` (`email_addr`),
   UNIQUE KEY `forum_nick` (`forum_nick`),
   UNIQUE KEY `rsm_id` (`rsm_id`),
   KEY `rsm_id_2` (`rsm_id`),
   KEY `forum_nick_2` (`forum_nick`),
   KEY `email_addr_2` (`email_addr`)
 #

 #
 # Table structure for table 'forum_moderators'
 #

 DROP TABLE IF EXISTS forum_moderators;
 CREATE TABLE `forum_moderators` (
   `formod_id` tinyint(4) NOT NULL auto_increment,
   `name` varchar(40) NOT NULL default '',
   `city` varchar(10) NOT NULL default '',
   `state` char(2) NOT NULL default '',
   `forum_nick` varchar(20) NOT NULL default '',
   `mod_forum_1` varchar(30) NOT NULL default '',
   `mod_forum_2` varchar(30) NOT NULL default '',
   `mod_forum_3` varchar(30) NOT NULL default '',
   `email_addr` varchar(100) NOT NULL default '',
   `tremination_date` date default NULL,
   `fk_rsm_id` tinyint(4) NOT NULL default '0',
   PRIMARY KEY  (`formod_id`),
   UNIQUE KEY `formod_id` (`formod_id`,`forum_nick`),
   KEY `formod_id_2` (`formod_id`)
 ) TYPE=MyISAM;
 #
 #

 Regards,
 Charlie

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

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


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

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




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

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




Connecting to a remote mySQL DB via telnet

2001-10-26 Thread Todd Williamsen

I am using Windows 2000 and MS decided to toss the GUI environment for
it.  Plus, I tried connecting like this:

Connect host ip address:3306  

How can I connect to my remote database that is on my hosting provider?

Thank you,
 
Todd Williamsen, MCSE
home: 847.265.4692
Cell: 847.867.9427


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

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




Re: Autoincrement question

2001-10-26 Thread Bill Adams


Bill Adams wrote:

 Demirchyan Oganes-AOD098 wrote:

  Hello everyone,
 
  I wanted to ask you 2 questions.
 
  1. I have a table that has 2 columns, user_id,
 user_name.
  User_id has been setup to a default value 1000
 and to AUTO_INCREMENT.
 
  When I insert a record, Insert Into User_Table
 (user_id,user_name) Values (Null,'Jon Doe');
  I get  1  John Doe.  But I'm expecting
 something like 1000 John Doe. And when I do
 another insert, then it will be 1001.  Why this
 Default Value definition not making sure that I
 start with 1000?

 The documentation or FAQ found on mysql.com
 should answer how to get your auto_increment
 column to start at a value other than 1.

For those of you who asked me for a url, I was
hoping you would go to http://mysql.com/, click on
the big Documentation link at the top of the
page and try either or both of the the Search
able, with user comments or the Dynamic FAQ
links and do a search.

That is what I have just done.  The FAQ does not
have the answer to your question but searching the
documentation for 'auto_increment returns a
number of results.  Looking through a few pages
manually, as I did, along with the browser's
search function reveals that the information is in
the page about alter table at the bottom.

I am trying to teach you to fish so you are fed
for life.  And I was trying to avoid spending the
effort searching for the information myself.  I
just happen to know it existed in the docs and was
trying to point you in the right direction.

b.









 b.

 --
 --

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

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

 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php

--
Bill Adams
TriQuint Semiconductor






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

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




Connecting to a remote mySQL DB via telnet

2001-10-26 Thread Christopher Book

You need a mysql client to connect to a mysql server.
First you telnet to your provider, and from the command prompt connect ala:
mysql -uusername -p database_name

or

If your provider is setup to allow mysql connections from outside their
servers (not as likely) then you can install a mysql client and connect from
your machine without telnet.

Chris

-

I am using Windows 2000 and MS decided to toss the GUI environment for
it.  Plus, I tried connecting like this:

Connect host ip address:3306  

How can I connect to my remote database that is on my hosting provider?

Thank you,
 
Todd Williamsen, MCSE
home: 847.265.4692
Cell: 847.867.9427



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

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




Re: Generate random, unique value...

2001-10-26 Thread Bill Adams

Kyle Hayes wrote:

 On Friday 26 October 2001 10:00, Dana Holt wrote:
  Can I automatically generate a random, unique, integer value in a certain
  range when inserting data into a column using SQL?
 
  If so, how?

 Random is easy.  Just find a good RNG (random number generator) somewhere
 (there are many available on the 'net, search on Google).  Or, use the RAND
 function that comes with MySQL.  You can find RNGs that have extremely long
 periods.

 Unique is easy.  Just use an auto-increment field in MySQL.

 Random _and_ unique are not that simple.

You could put both a number from RAND and an auto-increment field to ensure
uniqueness when combining the two.

But of course crypographicly, that is not a good idea.

b.
mysql



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

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




AW: Problem compiling MySQL-4.0.0-alpha with charset german1

2001-10-26 Thread Stephan Skusa


To me it seems that at this point the utility 'conf_to_src'
isn't build yet, and therefore ctype_extra_sources.c could not
be created!

ctype_extra_sources.c doesn't exist or is empty.

 -Ursprungliche Nachricht-
 Von: Thomas Spahni [mailto:[EMAIL PROTECTED]]
 Gesendet: Freitag, 26. Oktober 2001 11:32
 An: Stephan Skusa
 Cc: [MYSQL]
 Betreff: Re: Problem compiling MySQL-4.0.0-alpha with charset german1
 
 
 On Fri, 26 Oct 2001, Stephan Skusa wrote:
 
  if I do a
  
  ./configure --prefix=/usr/local/mysql-4.0.0 
 --with-charset=german1 --with-in
  nodb --with-tcp-port=3307 --with-unix-socket-path=/tmp/mysql4.sock
 
 what about 
 ./configure --with-charset=latin1_de
 
 ??
 Thomas Spahni
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 

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

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




update/join question

2001-10-26 Thread Russell Uman

i feel like i must be missing something simple because i keep wanting to do things 
like this, but i can't find a one step way to do
it.

whether or not there is an easy way, can someone tell me the best way to do it?

i want to update a field in one table based on data in another table.

example:

CREATE TABLE users (userid INT(11) PRIMARY KEY, userinfo_set CHAR(1) NOT NULL DEFAULT 
0);
CREATE TABLE userinfo (userid INT(11) NOT NULL, userinfo TEXT);

insert a ton of user row, insert 1/2 ton of userinfo rows

what i want is:

UPDATE users SET userinfo_set=1 where (users.userid=userinfo.userid);

aka, i want to set a flag in every row in users if there is a row in userinfo with the 
same userid.

i've been SELECT INTO OUTFILEing (with a join on the two tables) and LOAD DATA 
INFILEing to deal with this. is there a better way?

thanks!


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

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




  1   2   >