Re: Promote MySQL: Info Required!!

2001-10-03 Thread Jeremy Zawodny

On Fri, Sep 28, 2001 at 09:31:26AM -0600, Adam Douglas wrote:

 1. Number of Database Administrators/Developers to support MySQL and overall
 number of employees in the company.

Hmm.

We have no full-time MySQL DBAs.  You don't need one!  We have several
developers who spend a small amount of their time dealing with MySQL.
Our company has something like 2,500 employees (ball-park figure).

 2. Size of database (HD space consumption  # of records).

Across the whole company, we probably have a few hundred gigabytes in
MySQL.  Maybe more.  Maybe less.  Nobody really keeps track, but
that's probably a reasonable guess.

 3. Can MySQL Replication be down going two ways (ex. A - B and B - A).

It can be if you're careful.  It might get easier if MySQL implements
a feature I requested at the Open Source Database Summit.

 4. If you switched from a major commercial database (Oracle, Sybase, MS SQL
 Server, etc.) to MySQL, why? How did the change affect the number of people
 working as Database Administrators (increase, decrease, no effect)?

Doesn't apply, really.  But if we do switch things from Oracle (the
commercial RDBMS we use), I'm certain that it'd be a decrease in admin
effort.

 5. Any repercussion since charging over to MySQL?

n/a

 6. What operating system is MySQL running on?

FreeBSD and Linux

 7. What's the main operating system for your servers and company as a whole?

FreeBSD

 8. What user end front end/tools are used?

Usually custom developed web-based tools.

 9. What development tools are used to create reports, forms, queries,
 scripts?

Perl/C/C++/Python

 10. How advanced are your forms? What tools did you use to create them?

Many are rather simple.  Some are complex.  Most are built by hand in
whatever programming language (plus HTML).

 11. Does MySQL support OLAP (online analytical processing) or similar form
 of this technology?

OLAP is pretty broad in scope.  What, specifically, are you looking for?

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

MySQL 3.23.41-max: up 27 days, processed 543,390,065 queries (232/sec. avg)

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

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




DBI Background (fork) CGI causes Error 2013

2001-10-03 Thread Alex Menendez

Hello, All

I  built a spammer cgi some time ago that sends opt-in email to a list
of recipients stored in a member account db. It has ran fine in the
past. However, recently it is generating 2013 errors (Lost connection to
Mysql server during query) .

The script works by accepting news letter query info via a cgi that
forks a child process which then queries, inserts and updates info into
the db in order to actively mail the queue of recipients in the
background. The main process closes STDOUT and tells the user running
the email campaign that they will be notified when the child process
finishes.

Recently this script has been generating 2013 after the child runs its
very first sql call which happens to be an insert into the table listed
below.

I have recently upgraded the system on which this runs on. The latest
stable versions of perl, DBI, DBD and Mysql are all installed and
active.

Has anyone seen this before? I saw a similar posting on dejanews but
unfortunately it was in Russian which is not exactly my first language
:(

-
Here is the query that is causing the 2013 as a DBI binding string
-
$promotion_sth = $dbh-prepare('INSERT
INTO
promotion

(title,message,recipients,country,state,age_code_id,gende
r,waiver_flag,creator_member_id,date_created)
VALUES
(?,?,?,?,?,?,?,?,?,NOW())');

--
Here is the error as shown w/ DBI-trace(3):
--
- disconnect for DBD::mysql::db
(DBI::db=HASH(0x103b5e68)~0x103bdbac)
imp_dbh-svsock: 101414e8
ERROR EVENT 2013 'Lost connection to MySQL server during query' on
DBI::st=HASH(0x1039b900)
Lost connection to MySQL server during query error 2013 recorded: Lost
connection to MySQL server during query
- dbd_st_execute -2 rows
!! ERROR: 2013 'Lost connection to MySQL server during query'
- execute= undef at spammer.cgi line 161
DBD::mysql::st execute failed: Lost connection to MySQL server during
query at /home/hotbacon/admin-cgi/spammer.cgi line 161.
- errstr in DBD::_::common for DBD::mysql::db
(DBI::db=HASH(0x103b5e68)~0x103bdbac)
- errstr= ( 'Lost connection to MySQL server during query' ) [1
items] at spammer.cgi line 161
Lost connection to MySQL server during query at
/home/hotbacon/admin-cgi/spammer.cgi line 161.

---
And Here is the structure of the table that is being inserted into:
---
+---+---+--+-+-++

| Field |
Type
| Null | Key | Default | Extra  |
+---+---+--+-+-++

| promotion_id  | mediumint(6)
unsigned
|  | PRI | NULL| auto_increment |
| title |
varchar(150)
|  | | ||
| message   |
mediumtext
|  | | ||
| recipients|
enum('members','non_members','all_members','serious_street','occasional_street','all_street')
|  | | members ||
| country   |
varchar(30)
| YES  | | NULL||
| state |
char(2)
| YES  | | NULL||
| age_code_id   |
tinyint(2)
| YES  | | NULL||
| gender|
enum('m','f')
| YES  | | NULL||
| waiver_flag   |
enum('1','0')
| YES  | | NULL||
| date_created  |
datetime
|  | | -00-00 00:00:00 ||
| creator_member_id | int(9)
unsigned
|  | | 0   ||
| promotion_type|
enum('email','web','street')
|  | | email   ||
+---+---+--+-+-++

regards and thanx,
-amen


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

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

2001-10-03 Thread R Talbot

Please solve the problems

#
# groupadd mysql
# useradd -g mysql mysql
# cd /export/home0
# gunzip  mysql-3.23.33.tar.gz | tar xvf -
# cd mysql-3.23.33
# ./configure --prefix=/usr/local/mysql
# make
make  all-recursive

I have compiled 3.22.32, ...3.23.40.. 3.23.42
All on Linux w/  kernel 2.2.10 and 2.2.13   
Gnu make 3.77.xx and GNU make 3.78.xx

What I have learned is that an up to date Make and
libc library are very important .. Earlier versions seem
to compile well with earlier GNU Make/ libc installs and
Later version seem to need updated GNU Make / Libc..

What is your OS flavor and have recent are your library and
tools... Update  when possible...

Hope this helps some...

BOb T


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

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: Order By Limit; Count

2001-10-03 Thread Christian Sage

Hi,

 Order By clause without Limit returns:-
 A
 B
 C
 C
 C
 C
 C
 C
 M
 N
 T
 W

 Order By clause with Limit returns:-

 C
 C
 C
 C
 C
 C
 M
 N
 T
 W

 Is there any way to fix this, so that the results with the limit comes
 out starting with the A and then moves on to the next pages?

Hadn't thought about this before, but what it means (I guess) is that LIMIT
works on the selection, not on the presentation.

What I'm trying to say is that when you consider the sequence in which a
SELECT statement is carried out by the database, an ORDER BY is the second
but last thing that's done (the last being a further restriction of the
result set through a HAVING clause, if present). At the time of the ordering
you already have a result set for the query, and the database is now only
working on the way this result set is presented to the user.

I presume that LIMIT applies to the gathering of the result set, i.e. you
get the required number of rows from the query up to and including the WHERE
clause. Only then it gets ordered, but if your result set does not contain
the records with an 'A' they can't get ordered either. Don't know whether
I'm explaining this very well, but perhaps you get the idea.

...

Have gone and tested it now (3.23.42 on Win2K). Here is the SQL text and the
results:

--- cut

DROP DATABASE IF EXISTS ordertest;
CREATE DATABASE ordertest;
USE ordertest;

CREATE TABLE letters (
  id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  letter CHAR NOT NULL
);

INSERT INTO letters
  (letter)
VALUES
  ('C'),
  ('C'),
  ('C'),
  ('C'),
  ('C'),
  ('C'),
  ('M'),
  ('N'),
  ('T'),
  ('W'),
  ('A'),
  ('B');

SELECT letter
FROM   letters
LIMIT  10;

++
| letter |
++
| C  |
| C  |
| C  |
| C  |
| C  |
| C  |
| M  |
| N  |
| T  |
| W  |
++
10 rows in set (0.00 sec)

SELECT letter
FROM   letters
ORDER  BY letter
LIMIT  10;

++
| letter |
++
| A  |
| B  |
| C  |
| C  |
| C  |
| C  |
| C  |
| C  |
| M  |
| N  |
++
10 rows in set (0.37 sec)

-- cut

Surprise, surprise, turns out MySQL behaves not the way I thought it would,
but rather the way you thought it should. Are you perhaps running a
different version? And could you perhaps show us your table structure(s) and
query so that we can find out what's really happening there?

Cheers,
Christian Sage


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

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




need to recompile php and apache because of mysql upgrade??

2001-10-03 Thread John Mravunac

Hi,

I've just upgraded my MySQL from version 3.22.32 to 3.23.42 from source 
(which was an extremely easy exercise might I add). Now I'm not sure 
whether or not I should also recompile the php and Apache code...I've 
read another posting which suggested this is a good idea to keep the 
system stable, but I would just like to confirm, as everything is 
working fine as is.

Thanks,
John :^)


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

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: repost: Too many open files

2001-10-03 Thread Robin Keech

Thanks for all the replies. They have all helped me solve the actual
problem, which was fairly obvious once you know it, as always.

I was starting the mysql server from a prompt as user mysql, not root.  Only
root has the privileges to up the open file limit of a bash session.
This explained the setrlimit warning in the error log.  Once I started the
server as root then this warning went away, and I presume the open file
limit was raised to what was requested.

Again, thanks for all the help.

Robin

  -Original Message-
 From: Adams, Bill TQO [mailto:[EMAIL PROTECTED]] 
 Sent: 02 October 2001 19:08
 To:   Colin Faber
 Cc:   Robin Keech; [EMAIL PROTECTED]
 Subject:  Re: repost: Too many open files
 
 Colin Faber wrote:
 
  it sounds like you've run out of file descriptors, I suggest
  rebuilding your kernel to handle more.
 
  In a bsd kernel you can do this simply by upping the maximum number of
  users allowed to access the machine at any given time.
 
 Or in Linux (in my rc.local):
 
 echo Set max files to 32768
 echo 32768 /proc/sys/fs/file-max
 
 --Bill
 
 mysql
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01
 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01


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

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 dump only table structure with MySQLDump?

2001-10-03 Thread Andrey Kotrekhov

Hi!
I run now mysql 3.23.42
If I run mysqld without --skip-innodb
Then query delete from a; run so slow (but the table is MYISAM!!!)
Why? Is it a bug or no?

 check the command line option -d (or --no-data)

  -Original Message-
  From: Barry McClure [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 03, 2001 1:45 AM
  To: [EMAIL PROTECTED]
  Subject: --How to dump only table structure with MySQLDump?
 
 
  I would like to extract the DDL for the database so I can re-run
  it elsewhere.
  MySQLDump can do that, but it also exports the data. Is there a
  way for it
  to just export the Create Table statements?
 
  TIA
 
  Barry
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 

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

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



Best regards.
___
Andrey Kotrekhov [EMAIL PROTECTED]
ISP Alkar Teleport
ÔÅÌ. +380 562 34-00-44


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

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 -3 installation problem

2001-10-03 Thread nitin das nk


 

hi,
I  tried to install MySql-3.22.32 on my computer.
Operating system that i am using is Linux version 6.0.
The installation was done from a CD ,got free with the book
MySql/PHP Database Applications . 
I had given the commands for the installtion ,in same manner as listed below

1.bashgunzip mysql-3.22.32.tar.gz
2.bashtar xf mysql-3.22.32.tar
3../configure --prefix=/usr/mysql
4.make
5.make install

After these commands ,book is specifying to get in 'bin' directory of the
mysql folder,then run the command 
./mysql_install-db,
after running the command ,i am getting the result as
Creating db table
Creating host table
Creating user table
Creating func table 
Creating tables_priv table
Creating columns_priv table

TO SET A PASSWORD FOR THE MYSQL  root  USER!

So i tried with the commands that they had given
/usr/mysql/bin/mysqladmin -u root password 'new password(given as mail)',
but after giving the command ,i am getting the result as
:connect to server at 'localhost',failed 
error: 'Can't connect to local MySQL server through socket  '/tmp/mysql.sock'
 (111
check that mysqld is running and that the socket :'/tmp/mysql.sock 'exists!.

I tried to find out 'mysql.sock' file,but it was missing.

So further procedures are terminated,
I need your help regarding these problems,hope that u reply me soon.
yours sincerely,
nitin 


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

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 -3 installation problem

2001-10-03 Thread Carl Troein


nitin das nk writes:

 Operating system that i am using is Linux version 6.0.

There is no such thing as linux 6.0. The latest version
of the kernel is something like 2.4.10 (give or take...)
You're probably referring to the version of whatever
distribution you're using, but not knowing the version
numbers of all the various distros out there, it's hard
to guess which one it might be. RedHat, possibly? Not
that it matters much.

 ./mysql_install-db,
 
 TO SET A PASSWORD FOR THE MYSQL  root  USER!
 
 error: 'Can't connect to local MySQL server through socket  '/tmp/mysql.sock'

Did you by any chance forget to actually _start_
mysqld after installing it? If so, start it.

//C - ever so helpful

-- 
 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: Non Ascii characters

2001-10-03 Thread Haapanen, Tom

Jamie,

This is likely a client software issue.  We use Perl and DBI, and we have no
trouble storing or retrieving non-USASCII characters.

What are you using to access the MySQL database?

Tom Haapanen
[EMAIL PROTECTED]

-Original Message-
From: Jamie Smith [mailto:[EMAIL PROTECTED]]
Sent: 03 October 2001 06:23 
To: Mysql@Lists. Mysql. Com
Subject: Non Ascii characters


I'm having a problem with the sending of the new euro € symbol into the
mysql database through a standard SQL stament. I have tried everything cut
and paste or ALT 0128 on the command line but all I seem to get is a ?
character stored. I know it can be done because I have managed to enter the
symbol using a program 'ArtAdmin' by artronic to enter the data but this
will not be usable because I am trying to write and web based from system to
submit information.
Can anyone tell me how to get this symbol in and are there any others that
might casue trouble.
I have not been able to find anything on this in the manual or previous
posts.

TIA
Jamie


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

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




GUI

2001-10-03 Thread xoldi

Now I'm using Mysql under Microxof system, what kind of GUI to
Administrate mysql databases is the most practique to use ?

Xoldi.


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

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 Platform

2001-10-03 Thread Anand Agarwal

I have developed my application on MS-SQL on Win' NT platform using
Powerbuilder.

Can I run this application on Linux and MYSQL.

Please respond immediately as we are trying to promote this combination
actively.

With warm regards

Anand Agarwal
e-mail: - [EMAIL PROTECTED]
Your attitude decidesYour altitude...

- Original Message -
From: Andreas Schmidt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 01, 2001 8:23 PM
Subject: MS-Access


 Hi List

 I want to migrate from a NT-Server to a Linux Server. Therefore I'm
 looking
 for a solution to run my existing MS-Access-Databases under MySQL. Is
 there a chance to point from a MySQL-DB to a MS-Access-DB in order that
 my data can stay within the MS-Access-DB?

 Andi


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

 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




Installing PHP with MySQL

2001-10-03 Thread Ralf R. Kotowski

Hi,

I got Red Hat 6.2 and the Mysql 3.23.36-1 RPM packages installed, 
when I try to compile PHP with MySQL it tells me that it can't find 
the mysql header files... now where are those located? I tried 
specifying every dir that has something to do with MySQL, no luck.

Thank you very much for your help!

Ralf

http://www.itl.tv

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

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: AW: Order By Limit; Count

2001-10-03 Thread Ashwin Kutty


Hi,

The version of MySQL is (this could be it, I'll try upgrading this now):-
3.23.41 on Linux kernel version 2.4.7-2 on a Redhat 8 server.

The table (table1) has the following fields:-
author varchar(128)
category varchar(64)
title varchar(128)
location varchar(64)
platform varchar(40)
note varchar(128)

The query I tried is:-
SELECT * from table1 WHERE title LIKE %keyword% ORDER BY title LIMIT 0,10;

Any help would be greatly appreciated.

Christian Sage wrote:

Hi,

Order By clause without Limit returns:-
A
B
C
C
C
C
C
C
M
N
T
W

Order By clause with Limit returns:-

C
C
C
C
C
C
M
N
T
W

Is there any way to fix this, so that the results with the limit comes
out starting with the A and then moves on to the next pages?


Hadn't thought about this before, but what it means (I guess) is that LIMIT
works on the selection, not on the presentation.

What I'm trying to say is that when you consider the sequence in which a
SELECT statement is carried out by the database, an ORDER BY is the second
but last thing that's done (the last being a further restriction of the
result set through a HAVING clause, if present). At the time of the ordering
you already have a result set for the query, and the database is now only
working on the way this result set is presented to the user.

I presume that LIMIT applies to the gathering of the result set, i.e. you
get the required number of rows from the query up to and including the WHERE
clause. Only then it gets ordered, but if your result set does not contain
the records with an 'A' they can't get ordered either. Don't know whether
I'm explaining this very well, but perhaps you get the idea.

...

Have gone and tested it now (3.23.42 on Win2K). Here is the SQL text and the
results:

--- cut

DROP DATABASE IF EXISTS ordertest;
CREATE DATABASE ordertest;
USE ordertest;

CREATE TABLE letters (
  id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  letter CHAR NOT NULL
);

INSERT INTO letters
  (letter)
VALUES
  ('C'),
  ('C'),
  ('C'),
  ('C'),
  ('C'),
  ('C'),
  ('M'),
  ('N'),
  ('T'),
  ('W'),
  ('A'),
  ('B');

SELECT letter
FROM   letters
LIMIT  10;

++
| letter |
++
| C  |
| C  |
| C  |
| C  |
| C  |
| C  |
| M  |
| N  |
| T  |
| W  |
++
10 rows in set (0.00 sec)

SELECT letter
FROM   letters
ORDER  BY letter
LIMIT  10;

++
| letter |
++
| A  |
| B  |
| C  |
| C  |
| C  |
| C  |
| C  |
| C  |
| M  |
| N  |
++
10 rows in set (0.37 sec)

-- cut

Surprise, surprise, turns out MySQL behaves not the way I thought it would,
but rather the way you thought it should. Are you perhaps running a
different version? And could you perhaps show us your table structure(s) and
query so that we can find out what's really happening there?

Cheers,
Christian Sage


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

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



-- 
Wise men talk because they have something to say; fools talk 
because they have to say something. - Plato

Ashwin Kutty
Systems Administrator
Dalhousie University Libraries
(902) 494-2694




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

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: AW: Order By Limit; Count

2001-10-03 Thread Carl Troein


Ashwin Kutty writes:

 The query I tried is:-
 SELECT * from table1 WHERE title LIKE %keyword% ORDER BY title LIMIT 0,10;

The quotes are missing around the string constant.

-- 
 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: INSERT INTO SELECT ??

2001-10-03 Thread Paul DuBois

At 12:53 PM +0800 10/3/01, chong wee siong wrote:
Hi DBAs:
   I want to copy TableA in DatabaseA to TableB in DatabaseB
with changes in the attributes of the tables, what options do I have?

I tried these:

a) insert into TableB (id) select (id) from DatabaseA.TableA;
this works
b) insert into TableB (id,data) select (id,data) from DatabaseA.TableA;
but this does not work, why? and how do I do this?

They syntax is illegal for your second attempt.  The column list for
the SELECT part shouldn't have parentheses around it:


insert into TableB (id,data) select id,data from DatabaseA.TableA;

Parentheses work in your first attempt because (id) is a simple
parenthesized expression that produces id as its value.

-- 
Paul DuBois, [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: Installing PHP with MySQL

2001-10-03 Thread Carl Troein


Ralf R. Kotowski writes:

 I got Red Hat 6.2 and the Mysql 3.23.36-1 RPM packages installed, 
 when I try to compile PHP with MySQL it tells me that it can't find 
 the mysql header files... now where are those located? I tried 
 specifying every dir that has something to do with MySQL, no luck.

Did you install all 5 RPMs or just a subset of them?
As far as I can tell, you need to install the RPM
that has 'devel' in its name. If you've already done
so and it still doesn't work, try locating the files
with 'find', or something.

//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: Creating indexes on large tables

2001-10-03 Thread Adams, Bill TQO

Perhaps your index file (.MYI) is growing larger than 2GB, the file-size
limit on 2.2.x kernels?

Or, if you have moved the tables with symlinks, MySQL will put the new file
(most of the time?) in the configured data directory and not where the
symlink points.

--Bill



Mike Lucente wrote:

 I'm running out of space while creating indexes on some fairly large (1.8
 GB) tables, even though I have quite a bit of space available in the
 partition (utilization is at 30%).

 I know that the create process works as follows (from the manual):

 Create a new table named `A-xxx' with the requested changes.
   All rows from the old table are copied to `A-xxx'.
   The old table is renamed `B-xxx'.
   `A-xxx' is renamed to your old table name.
   `B-xxx' is deleted.

 Given that, I should have plenty of room. Disk utilization doesn't appear
 to exceed 60% during the process.

 Any idea what could be causing this?

 ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.

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

 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




Re: Creating indexes on large tables

2001-10-03 Thread David Turner

If this is the case. What are the steps necessary for index rebuilds? Can
I specify where the index file is rebuilt? Any idea when we can specify 
the location of datafiles and indexfiles?

Thanks, Dave
On Wed, Oct 03, 2001 at 07:57:35AM -0700, Adams, Bill TQO wrote:
 Perhaps your index file (.MYI) is growing larger than 2GB, the file-size
 limit on 2.2.x kernels?
 
 Or, if you have moved the tables with symlinks, MySQL will put the new file
 (most of the time?) in the configured data directory and not where the
 symlink points.
 
 --Bill
 
 
 
 Mike Lucente wrote:
 
  I'm running out of space while creating indexes on some fairly large (1.8
  GB) tables, even though I have quite a bit of space available in the
  partition (utilization is at 30%).
 
  I know that the create process works as follows (from the manual):
 
  Create a new table named `A-xxx' with the requested changes.
All rows from the old table are copied to `A-xxx'.
The old table is renamed `B-xxx'.
`A-xxx' is renamed to your old table name.
`B-xxx' is deleted.
 
  Given that, I should have plenty of room. Disk utilization doesn't appear
  to exceed 60% during the process.
 
  Any idea what could be causing this?
 
  ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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

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

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




recordset - sequence error (asp-mysql)

2001-10-03 Thread Dirk Vermeer

Hi all,

I created a table like this

create table t_table (
   id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT ,
   name TEXT NOT NULL,
   description TEXT
);

the table contains some records but the description fields defaults to null
for all the records allready entered

In asp (iis5) I loop till EOF

adodataconnection ...
...
Set recordset = adodataconnection.Execute (select * from t_table)
recordset.MoveFirst
Do Until recordset.EOF
...
recordset.MoveNext
Loop

recordset.MoveFirst' - sequence error

recordset.Close

I get a sequence error when I try to go back to the first record

however if i enter ONE record with a description .. it works

Is there anyone out there that can point out the logic behind this ?

Thanks in advance

Dirk Vermeer



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

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: Creating indexes on large tables

2001-10-03 Thread Adams, Bill TQO

David Turner wrote:

 If this is the case. What are the steps necessary for index rebuilds? Can
 I specify where the index file is rebuilt? Any idea when we can specify
 the location of datafiles and indexfiles?

For the kernel: You either need to upgrade to a later 2.4.x series kernel which,
I believe, have the 64-bit file size capability.  However, MySQL still has
limitations on the table size (I do not know about the index file size 'though,
see the manual about that).

Another possibility is to use merge tables to break your table and index files
into smaller chucks.  But that can be error prone so just be prepared to ask some
questions. ;-).


You can change the location of the data/index files in the config file and/or in
safe_mysqld.  The problem only happens if you have moved the files via sym
links.  If you move the entire directory then it is not a problem:

Okay (example):
cd /usr/local/mysql/var
ls -l
  good_db  - ../../../path/to/big/disk


Bad:
cd /usr/local/mysq/var
ls -l
  bad_db
cd bad_db
ls -l
  table1.MYD - ../../../path/to/big/disk/table1.MYD


When you reindex/repair, etc. table1, it will be moved back to the bad_db
directory.  The only time you should do something like the second case is if you
have multiple disks and want to put different tables on different disks for
faster access (e.g you will access all of the tables at the same time).  Of
course SCSI is best for this and/or if each disk is on its own controller.
 Separating tables on two IDE disks on the same bus is pointless.

--Bill




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

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




Re: inserting images

2001-10-03 Thread AJDIN BRANDIC

I have never done it but have seen posts on this topic.  From what I 
understand you need to create a BLOB field in your DB (MySQL) then upload 
file to your server, read it with fopen (or ...) into a variable then 
insert that variable into the BLOB field you have in your DB.

Hope I am right here?

Regards

Ajdin

On Wed, 3 Oct 2001, Sandeep Murthy wrote:

 hi all,
 
 I have been trying to insert images into my mysql database thru PHP  for the
 past 2 days without any luck.. After having tried various combinations of
 queries, I gave up..
 
 Wud be grateful if anyone can post a query for inserting images in to my
 database..
 
 TIA,
 Sandeep
 
 
 This is what i hv tried:
 
 HTML
 HEAD
 TITLEBinary Data Insert Form/TITLE
 /HEAD
 
 BODY
 H1Upload a File:/H1
 
 FORM enctype=multipart/form-data
  method=post action=do_insert.php
 INPUT type=file name=img1 size=30
 INPUT type=submit name=submit
  value=Use this File
 
 /FORM
 /BODY
 /HTML
 
 __
 ?
 if (!isset($img1)) {
 header(Location: insert_file.html);
 exit;
 }
 
 $db = @mysql_connect(localhost,root,sandeep) or
 die(Can't connect to server.);
 @mysql_select_db(yourDB, $db) or
 die(Can't select database.);
 
 $binary_junk = addslashes (fread(fopen($img1, r), filesize($img1)));
 $insert_data = INSERT INTO
 images (img_id, binary_junk, filename, filesize, filetype)
 VALUES ('1', '$binary_junk', '$img1_name', '$img1_size', '$img1_type');
 
 @mysql_query($insert_data) or
 
 The error is occuring here , am getting a couldnt insert data error
 
 die(Couldn't insert data.);
 
 ?
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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 a specific select

2001-10-03 Thread Hugo Koji Kobayashi

Hi,

I'm making some tests with mysql and I got the errors below when I
run these selects:

SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id LIMIT 10;
ERROR 1034: Incorrect key file for table: '#sql17adb_41f_4'. Try to
repair it

SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id HAVING
COUNT(*)  8;
ERROR 1030: Got error 12 from table handler

If I run the same queries without the where clause it's ok.

I don't know if it's a problem with mysql or it's something I'm
missing on configuration parameters.

Below, I provide some information that can be useful to reproduce the
problem.

TIA,
Hugo


How to repeat: run the sql script generated by the perl code below

--begin--
#!/usr/bin/perl

open(DESC,  error_test.sql);
print DESCFIM;
CREATE TABLE error_test (
  id int(11) NOT NULL default '0',
  info int(11) NOT NULL default '0',
  KEY error_test_id (id)
) TYPE=MyISAM;
FIM

for ($i = 1; $i  50; $i++) {
$id = int(rand 30);
print DESC INSERT INTO error_test VALUES (.$id.,1);\n;
}

print DESC SELECT id, COUNT(*) FROM error_test GROUP BY id LIMIT 10;\n;
print DESC SELECT id, COUNT(*) FROM error_test GROUP BY id HAVING COUNT(*)  8;\n;
print DESC SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id LIMIT 
10;\n;
print DESC SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id HAVING 
COUNT(*)  8;\n;

close(DESC);
--end--

Release: mysql-3.23.42, compiled from source
 CFLAGS=-O3 CXX=gcc CXXFLAGS=-O3 -felide-constructors
 -fno-exceptions -fno-rtti ./configure --prefix=/usr/local/mysql
 --with-berkeley-db --with-innodb --without-debug --with-libwrap
 --with-mit-threads=no --without-readline --enable-assembler
 --with-mysqld-ldflags=-all-static --enable-thread-safe-client

Environment: FreeBSD 4.3-RELEASE, Dual PIII Xeon 550MHz, 1GB RAM

mysqld started with bin/safe_mysqld -u mysql -O key_buffer=64M -O
table_cache=256 -O sort_buffer=4M -O record_buffer=1M
--log-slow-queries


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

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




Re: inserting images

2001-10-03 Thread Sandeep Murthy

The database I have created for storing images has a field called
binary_junk which is of type BLOB but its still not working...

TIA,
sandeep
- Original Message -
From: AJDIN BRANDIC [EMAIL PROTECTED]
To: Sandeep Murthy [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 5:23 PM
Subject: Re: inserting images


 I have never done it but have seen posts on this topic.  From what I
 understand you need to create a BLOB field in your DB (MySQL) then upload
 file to your server, read it with fopen (or ...) into a variable then
 insert that variable into the BLOB field you have in your DB.

 Hope I am right here?

 Regards

 Ajdin

 On Wed, 3 Oct 2001, Sandeep Murthy wrote:

  hi all,
 
  I have been trying to insert images into my mysql database thru PHP  for
the
  past 2 days without any luck.. After having tried various combinations
of
  queries, I gave up..
 
  Wud be grateful if anyone can post a query for inserting images in to my
  database..
 
  TIA,
  Sandeep
 
 
  This is what i hv tried:
 
  HTML
  HEAD
  TITLEBinary Data Insert Form/TITLE
  /HEAD
 
  BODY
  H1Upload a File:/H1
 
  FORM enctype=multipart/form-data
   method=post action=do_insert.php
  INPUT type=file name=img1 size=30
  INPUT type=submit name=submit
   value=Use this File
 
  /FORM
  /BODY
  /HTML
 
  __
  ?
  if (!isset($img1)) {
  header(Location: insert_file.html);
  exit;
  }
 
  $db = @mysql_connect(localhost,root,sandeep) or
  die(Can't connect to server.);
  @mysql_select_db(yourDB, $db) or
  die(Can't select database.);
 
  $binary_junk = addslashes (fread(fopen($img1, r), filesize($img1)));
  $insert_data = INSERT INTO
  images (img_id, binary_junk, filename, filesize, filetype)
  VALUES ('1', '$binary_junk', '$img1_name', '$img1_size', '$img1_type');
 
  @mysql_query($insert_data) or
 
  The error is occuring here , am getting a couldnt insert data error
 
  die(Couldn't insert data.);
 
  ?
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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




Left Join problem

2001-10-03 Thread George Eric R Contr AFSPC/CVYZ

I'm not getting the behavior I expect from this select.

SELECT available.target, tracked.sensor
FROM available LEFT JOIN tracked ON available.target=tracked.target
WHERE available.window=137 AND tracked.window=137 AND available.sensor=8;

Now, I know for this window, that there are 25 records for sensor 8 in the
available table:

SELECT count(*) FROM available WHERE window=137 AND sensor=8;

count(*)
25

Now in the tracked table, some of the targets that are available to sensor 8
are actually tracked by another sensor, and some are not tracked at all.  I
expected the left join to show me which targets that are available to target
8 are tracked by which sensor, with NULL values in the right column for
targets that are left untracked.

I get half of that.  My result set has 20 records.  It correctly shows which
sensor tracked which target. It doesn't show the 4 untracked targets at all?

Ideas?
Thanks
Eric

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

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: Left Join problem

2001-10-03 Thread Johnson, Gregert

It looks to me as though the tracked.window=137 condition is suppressing output of 
any available rows which do not have a target match in tracked - tracked.window 
would = NULL in those cases.

--Greg Johnson

-Original Message-
From:   George Eric R Contr AFSPC/CVYZ 
[mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, October 03, 2001 11:50 AM
To: [EMAIL PROTECTED]
Subject:Left Join problem

I'm not getting the behavior I expect from this select.

SELECT available.target, tracked.sensor
FROM available LEFT JOIN tracked ON available.target=tracked.target
WHERE available.window=137 AND tracked.window=137 AND 
available.sensor=8;

Now, I know for this window, that there are 25 records for sensor 8 in 
the
available table:

SELECT count(*) FROM available WHERE window=137 AND sensor=8;

count(*)
25

Now in the tracked table, some of the targets that are available to 
sensor 8
are actually tracked by another sensor, and some are not tracked at 
all.  I
expected the left join to show me which targets that are available to 
target
8 are tracked by which sensor, with NULL values in the right column for
targets that are left untracked.

I get half of that.  My result set has 20 records.  It correctly shows 
which
sensor tracked which target. It doesn't show the 4 untracked targets 
at all?

Ideas?
Thanks
Eric

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

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: Left Join problem

2001-10-03 Thread George Eric R Contr AFSPC/CVYZ

Ok, I can see that now.  If the record doesn't exist in the tracked table,
it can't meet the window criteria.

The one way I see to get around this, in the absense of subselects, is to
retrieve the tracked data that meets the window criteria into a temporary
table.  Right?

-Original Message-
From: Johnson, Gregert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 10:03 AM
To: [EMAIL PROTECTED]
Subject: RE: Left Join problem


It looks to me as though the tracked.window=137 condition is suppressing
output of any available rows which do not have a target match in tracked
- tracked.window would = NULL in those cases.

--Greg Johnson

-Original Message-
From:   George Eric R Contr AFSPC/CVYZ
[mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, October 03, 2001 11:50 AM
To: [EMAIL PROTECTED]
Subject:Left Join problem

I'm not getting the behavior I expect from this select.

SELECT available.target, tracked.sensor
FROM available LEFT JOIN tracked ON
available.target=tracked.target
WHERE available.window=137 AND tracked.window=137 AND
available.sensor=8;

Now, I know for this window, that there are 25 records for
sensor 8 in the
available table:

SELECT count(*) FROM available WHERE window=137 AND
sensor=8;

count(*)
25

Now in the tracked table, some of the targets that are
available to sensor 8
are actually tracked by another sensor, and some are not
tracked at all.  I
expected the left join to show me which targets that are
available to target
8 are tracked by which sensor, with NULL values in the right
column for
targets that are left untracked.

I get half of that.  My result set has 20 records.  It
correctly shows which
sensor tracked which target. It doesn't show the 4 untracked
targets at all?

Ideas?
Thanks
Eric


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

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

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

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

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

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




RE: Left Join problem

2001-10-03 Thread Johnson, Gregert

Or, you could try this:

SELECT available.target, tracked.sensor
FROM available LEFT JOIN tracked ON available.target=tracked.target
AND tracked.window=137
WHERE available.window=137 AND available.sensor=8;


-Original Message-
From:   George Eric R Contr AFSPC/CVYZ 
[mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, October 03, 2001 12:08 PM
To: [EMAIL PROTECTED]
Subject:RE: Left Join problem

Ok, I can see that now.  If the record doesn't exist in the tracked 
table,
it can't meet the window criteria.

The one way I see to get around this, in the absense of subselects, is 
to
retrieve the tracked data that meets the window criteria into a 
temporary
table.  Right?

-Original Message-
From: Johnson, Gregert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 10:03 AM
To: [EMAIL PROTECTED]
Subject: RE: Left Join problem


It looks to me as though the tracked.window=137 condition is 
suppressing
output of any available rows which do not have a target match in 
tracked
- tracked.window would = NULL in those cases.

--Greg Johnson

-Original Message-
From:   George Eric R Contr AFSPC/CVYZ
[mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, October 03, 2001 11:50 AM
To: [EMAIL PROTECTED]
Subject:Left Join problem

I'm not getting the behavior I expect from this select.

SELECT available.target, tracked.sensor
FROM available LEFT JOIN tracked ON
available.target=tracked.target
WHERE available.window=137 AND tracked.window=137 AND
available.sensor=8;

Now, I know for this window, that there are 25 records 
for
sensor 8 in the
available table:

SELECT count(*) FROM available WHERE window=137 AND
sensor=8;

count(*)
25

Now in the tracked table, some of the targets that are
available to sensor 8
are actually tracked by another sensor, and some are 
not
tracked at all.  I
expected the left join to show me which targets that 
are
available to target
8 are tracked by which sensor, with NULL values in the 
right
column for
targets that are left untracked.

I get half of that.  My result set has 20 records.  It
correctly shows which
sensor tracked which target. It doesn't show the 4 
untracked
targets at all?

Ideas?
Thanks
Eric


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

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, 

Is it possible to Rename Database

2001-10-03 Thread Brandon Lewis

Is it possible to rename a 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: Left Join problem

2001-10-03 Thread Carl Troein


George Eric R Contr AFSPC/CVYZ writes:

 Ok, I can see that now.  If the record doesn't exist in the tracked table,
 it can't meet the window criteria.
 
 The one way I see to get around this, in the absense of subselects, is to
 retrieve the tracked data that meets the window criteria into a temporary
 table.  Right?

That's unnecessary. Use an ON condition instead, i.e.
... LEFT JOIN table ON field=value WHERE ...

//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: Problem with a specific select

2001-10-03 Thread Carl Troein


Hugo Koji Kobayashi writes:

 I'm making some tests with mysql and I got the errors below when I
 run these selects:
 
 SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id LIMIT 10;
 ERROR 1034: Incorrect key file for table: '#sql17adb_41f_4'. Try to
 repair it

If you get an error message, be sure to read it. :-O
Run a REPAIR TABLE on the table, and then it should work.

//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: inserting images

2001-10-03 Thread Carl Troein


Sandeep Murthy writes:

 The database I have created for storing images has a field called
 binary_junk which is of type BLOB but its still not working...

[snipped PHP code]
Man, I can see why you have problems getting your code to
work. Try checking for errors instead of assuming that every
function call succeeds, and print sensible error messages
when things fail. At the very least take a look at
mysql_error(). Actually printing (and looking at) the query
that fails would not be a bad idea either.

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




Performance tuning Mysql

2001-10-03 Thread Vien Huynhle

I am getting this error in my log files from mysql
 
(Got timeout reading communication packets)
 
I'm starting safemysql with the variables
 
-O key_buffer=16M -O sort_buffer=1M -O back_log=200 
 
mysql show status
- ;
+--+--+
| Variable_name| Value|
+--+--+
| Aborted_clients  | 0|
| Aborted_connects | 1|
| Bytes_received   | 9204605  |
| Bytes_sent   | 13211959 |
| Connections  | 23   |
| Created_tmp_disk_tables  | 0|
| Created_tmp_tables   | 0|
| Created_tmp_files| 0|
| Delayed_insert_threads   | 0|
| Delayed_writes   | 0|
| Delayed_errors   | 0|
| Flush_commands   | 1|
| Handler_delete   | 0|
| Handler_read_first   | 39275|
| Handler_read_key | 97534|
| Handler_read_next| 79518|
| Handler_read_prev| 0|
| Handler_read_rnd | 0|
| Handler_read_rnd_next| 39287|
| Handler_update   | 0|
| Handler_write| 0|
| Key_blocks_used  | 485  |
| Key_read_requests| 1575217  |
| Key_reads| 19971|
| Key_write_requests   | 0|
| Key_writes   | 0|
| Max_used_connections | 20   |
| Not_flushed_key_blocks   | 0|
| Not_flushed_delayed_rows | 0|
| Open_tables  | 30   |
| Open_files   | 37   |
| Open_streams | 0|
| Opened_tables| 36   |
| Questions| 136803   |
| Select_full_join | 0|
| Select_full_range_join   | 0|
| Select_range | 0|
| Select_range_check   | 0|
| Select_scan  | 0|
| Slave_running| OFF  |
| Slave_open_temp_tables   | 0|
| Slow_launch_threads  | 0|
| Slow_queries | 0|
| Sort_merge_passes| 0|
| Sort_range   | 0|
| Sort_rows| 0|
| Sort_scan| 0|
| Table_locks_immediate| 136813   |
| Table_locks_waited   | 0|
| Threads_cached   | 0|
| Threads_created  | 22   |
| Threads_connected| 21   |
| Threads_running  | 1|
| Uptime   | 1084 |
+--+--+
 
There is a large amount selects made to the database.  
 
I have tried to tune it but no luck.


Vien Huynhle
Clearsail Communications



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

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: Creating indexes on large tables

2001-10-03 Thread Mike Lucente

I'm running 2.4.2 and I'm not using symlinks.

On Wed, 3 Oct 2001, Adams, Bill TQO wrote:

 Perhaps your index file (.MYI) is growing larger than 2GB, the file-size
 limit on 2.2.x kernels?
 
 Or, if you have moved the tables with symlinks, MySQL will put the new file
 (most of the time?) in the configured data directory and not where the
 symlink points.
 
 --Bill
 
 
 
 Mike Lucente wrote:
 
  I'm running out of space while creating indexes on some fairly large (1.8
  GB) tables, even though I have quite a bit of space available in the
  partition (utilization is at 30%).
 
  I know that the create process works as follows (from the manual):
 
  Create a new table named `A-xxx' with the requested changes.
All rows from the old table are copied to `A-xxx'.
The old table is renamed `B-xxx'.
`A-xxx' is renamed to your old table name.
`B-xxx' is deleted.
 
  Given that, I should have plenty of room. Disk utilization doesn't appear
  to exceed 60% during the process.
 
  Any idea what could be causing this?
 
  ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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




Re: Problem with a specific select

2001-10-03 Thread Hugo Koji Kobayashi

On Wed, Oct 03, 2001 at 06:39:45PM +0200, Carsten H. Pedersen wrote:
  Hi,
  
  I'm making some tests with mysql and I got the errors below when I
  run these selects:
  
  SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id LIMIT 10;
  ERROR 1034: Incorrect key file for table: '#sql17adb_41f_4'. Try to
  repair it
 
 Um, that last sentence from MySQL is what's known as a hint: 
 MySQL tells you that the file containing the indexes is corrupt. 
 Do what it says:
 
 REPAIR TABLE error_test
 

I already tried to repair it, and the problem remains the same.

  SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id HAVING
  COUNT(*)  8;
  ERROR 1030: Got error 12 from table handler
  
  If I run the same queries without the where clause it's ok.
  
  I don't know if it's a problem with mysql or it's something I'm
  missing on configuration parameters.
 
 Because when you do not have a WHERE clause, the indexes
 aren't used.
 

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

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




can't use m2o.pl

2001-10-03 Thread another oracle dba

Hi all:

I have tried running the m2o.pl scrip to convert the mysql dump 
into an Oracle DDL and it seems to me that it didn't do anything
at all. I ran the command the way README suggest :

m2o  mysqldump  oracledump,

but saw a number of the mysql-specific commands in the resulting
file. Has anyone been able to use m2o successfully to convert a
mysql scrip to oracle's?

thanks

AOD

__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com

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

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




Re: Creating indexes on large tables

2001-10-03 Thread Mike Lucente

I'm also unable to create files 2GB with mysqldump, even after a
recompile with gcc 2.96, RH 7.1 w/2.4.2 kernel, glibc 2.2.2.

hmmm ...

On Wed, 3 Oct 2001, Adams, Bill TQO wrote:

 Perhaps your index file (.MYI) is growing larger than 2GB, the file-size
 limit on 2.2.x kernels?
 
 Or, if you have moved the tables with symlinks, MySQL will put the new file
 (most of the time?) in the configured data directory and not where the
 symlink points.
 
 --Bill
 
 
 
 Mike Lucente wrote:
 
  I'm running out of space while creating indexes on some fairly large (1.8
  GB) tables, even though I have quite a bit of space available in the
  partition (utilization is at 30%).
 
  I know that the create process works as follows (from the manual):
 
  Create a new table named `A-xxx' with the requested changes.
All rows from the old table are copied to `A-xxx'.
The old table is renamed `B-xxx'.
`A-xxx' is renamed to your old table name.
`B-xxx' is deleted.
 
  Given that, I should have plenty of room. Disk utilization doesn't appear
  to exceed 60% during the process.
 
  Any idea what could be causing this?
 
  ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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
 


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

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




Help!

2001-10-03 Thread Alex Lima Silva

 My big problem is the rollback, every time when I try to use a rollback
 command I get this error:
 ERROR 1196: warning: some non-transaction changed tables couldn´t be
rolled
 back
 
 Do you know why ?
 
 thanks for help


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

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: Creating indexes on large tables

2001-10-03 Thread LoPresti, Mark

Someone wrote::

  Or, if you have moved the tables with symlinks, MySQL will put the new
file
 (most of the time?) in the configured data directory and not where the
 symlink points.

Really?
The Index file wont be in the same directory as the database itself if I am
using symlinks to the database?
I didnt know this.  Is there a way around this?

Thanks.




Mark A. LoPresti
Senior Quantitative Analyst
Thomson Financial 
Research and Analytics
First Call/IBES
1455 Research Blvd.
Rockville, MD 20850
Email: [EMAIL PROTECTED]
Phone: 301.545.4630
Fax: 301.545.6650



-Original Message-
From: Mike Lucente [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 1:25 PM
To: Adams, Bill TQO
Cc: [EMAIL PROTECTED]
Subject: Re: Creating indexes on large tables


I'm running 2.4.2 and I'm not using symlinks.

On Wed, 3 Oct 2001, Adams, Bill TQO wrote:

 Perhaps your index file (.MYI) is growing larger than 2GB, the file-size
 limit on 2.2.x kernels?
 
 Or, if you have moved the tables with symlinks, MySQL will put the new
file
 (most of the time?) in the configured data directory and not where the
 symlink points.
 
 --Bill
 
 
 
 Mike Lucente wrote:
 
  I'm running out of space while creating indexes on some fairly large
(1.8
  GB) tables, even though I have quite a bit of space available in the
  partition (utilization is at 30%).
 
  I know that the create process works as follows (from the manual):
 
  Create a new table named `A-xxx' with the requested changes.
All rows from the old table are copied to `A-xxx'.
The old table is renamed `B-xxx'.
`A-xxx' is renamed to your old table name.
`B-xxx' is deleted.
 
  Given that, I should have plenty of room. Disk utilization doesn't
appear
  to exceed 60% during the process.
 
  Any idea what could be causing this?
 
  ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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

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

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




query problem

2001-10-03 Thread gaurang khatri

Dear Friends,
 
I am using mysql 3.23.42. I want to execute one
query  to get specific result but not getting the
correct  result.
 
I have 2 tables named: ContactList and GroupList.
 
Their structure is as below:
 
 +---+
   ContactList
 +---+
 username varchar(15)   
 nickname varchar(15)
 primary key(username, nickname)
 
 +-+
   GroupList
 +-+
 username  varchar(15)  
 nickname  varchar(15)
 groupname varchar(15)
 primary key(username, groupname, nickname)
 
 
 - Table CotactList has following values:
 
 ++
  username  nickname
 ++
  gaurangmalay
  gaurangviral
  gaurangnilay
  gaurangajay
  gaurangamit
  gaurangraja
 
  
 - Table GroupList has following values:
 
 ++
  username  groupname   nickname
 ++
  gaurangfriend  malay
  gaurangfriend  viral
 
 
 - Now I want to get those 'nickname' from
  ContactList which do not appear in GroupList with  
  following condition:
ContactList.username = 'gaurang'
ContactList.username = GroupList.username
groupname= 'friend'
 
 - So as result of the query I should get following
 values:
nilay
ajay
amit
raja
 
 - I executed following query, it gives result with
 MS-Access but as it uses inner query and mysql does
 not support it, it did not work with mysql:
select nickname from ContactList where
 username='gaurang' and nickname not in (select
 nickname from GroupList where username='gaurang' and
 groupname='friend')
 
 - I also tried with following query but did not get
 the desired result:
select cl.nickname from ContactList cl,
 GroupList gl where cl.username='gaurang' and
 cl.username=gl.username and gl.groupname='friend'
 and cl.nickname!=gl.nickname
 
 
 If anybody can help me in this problem I would be
 thankful to him.
 
 
 Thanks
 gaurang.
 



Do You Yahoo!?
Send a newsletter, share photos  files, conduct polls, organize chat events. Visit 
http://in.groups.yahoo.com

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

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




Convert table type

2001-10-03 Thread April Sims

We are looking to convert all ISAM tables to the new type MYISAM

Has anyone else converted all tables in all their databases in one fell 
swoop to
a new type? using the alter table command.

Thanks for any gotchas, hints or suggestions.




 
April Sims  MCSE, CNE   Abilene Christian University
OCP 8i DBA  ACU Box 29005
Information Technology  Abilene, TX 79699
[EMAIL PROTECTED]   Vx:(915)674-2681 Fx:674-6724
 



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

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 dump only table structure with MySQLDump?

2001-10-03 Thread Heikki Tuuri

Andrey,

it is not a bug. Monty wanted to avoid some changes
in 3.23 and decided to do 'delete from a' with individual
row deletes if InnoDB is defined. In 4.0 you should
use TRUNCATE TABLE to empty a table, and it works
fast for all table types.

Regards,

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

Hi!
I run now mysql 3.23.42
If I run mysqld without --skip-innodb
Then query delete from a; run so slow (but the table is MYISAM!!!)
Why? Is it a bug or no?

 check the command line option -d (or --no-data)

  -Original Message-
  From: Barry McClure [mailto:barry [EMAIL PROTECTED]]
  Sent: Wednesday, October 03, 2001 1:45 AM
  To: [EMAIL PROTECTED]
  Subject: --How to dump only table structure with MySQLDump?
 
 
  I would like to extract the DDL for the database so I can re-run
  it elsewhere.
  MySQLDump can do that, but it also exports the data. Is there a
  way for it
  to just export the Create Table statements?
 
  TIA
 
  Barry
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 

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

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



Best regards.
   
   Andrey Kotrekhov [EMAIL PROTECTED]
   ISP Alkar Teleport
   ???. +380 562 34-00-44


---
-




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

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: Creating indexes on large tables

2001-10-03 Thread Sergei Golubchik

Hi!

On Oct 03, Mike Lucente wrote:
 I'm running out of space while creating indexes on some fairly large (1.8
 GB) tables, even though I have quite a bit of space available in the
 partition (utilization is at 30%).
 
 I know that the create process works as follows (from the manual):
 
 Create a new table named `A-xxx' with the requested changes. 
   All rows from the old table are copied to `A-xxx'. 
   The old table is renamed `B-xxx'. 
   `A-xxx' is renamed to your old table name. 
   `B-xxx' is deleted.
 
 Given that, I should have plenty of room. Disk utilization doesn't appear
 to exceed 60% during the process.
 
 Any idea what could be causing this?
 
 ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.

Most probably, you're getting out of space for temp files.
MySQL usually tries to create indexes _after_ loading the data, not in
the same time. It uses then repair by sort method which gives more
than 100 times speedup.

These temporary files are created NOT in the datadir (--datadir) but in the tempdir
(--tempdir). Be sure it has enough space.

Then, those temporary files can be significantly larger than original
MYD (and resulting MYI) file, especially if you have, for example,
VARCHAR(255) field, that is mostly occupated by one- or two-characher
strings.

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: Is it possible to Rename Database

2001-10-03 Thread Ken Menzel

Hi Brandon,
   It is possible if you are you are using myisam or DBD table types,
but you have to rename the directory from the Unix shell prompt.
There is not yet a RENAME DATABASE command (althought it is on the
todo list) and no way that I know of (short of renaming each table if
you only have a few tables) of renaming a INNODB table.  This is not
to be done lightly.

Remember to shutdown the server before raming the directory and change
any permissions (GRANT) that might be applicable.
The rename the directory then restart the server.

Best of luck
Ken
- Original Message -
From: Brandon Lewis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 12:57 PM
Subject: Is it possible to Rename Database


 Is it possible to rename a 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: Creating indexes on large tables

2001-10-03 Thread Adams, Bill TQO


Apparently you have to compile for large file support and have glibc  2.1.3.
http://www.suse.de/~aj/linux_lfs.html

I have not used it so I do not know the real-world limitations.

Or (for 100MB files):
mysqldump db table |split -b 1 - table

--Bill


Mike Lucente wrote:

 I'm also unable to create files 2GB with mysqldump, even after a
 recompile with gcc 2.96, RH 7.1 w/2.4.2 kernel, glibc 2.2.2.

 hmmm ...

 On Wed, 3 Oct 2001, Adams, Bill TQO wrote:

  Perhaps your index file (.MYI) is growing larger than 2GB, the file-size
  limit on 2.2.x kernels?
 
  Or, if you have moved the tables with symlinks, MySQL will put the new file
  (most of the time?) in the configured data directory and not where the
  symlink points.
 
  --Bill
 
 
 
  Mike Lucente wrote:
 
   I'm running out of space while creating indexes on some fairly large (1.8
   GB) tables, even though I have quite a bit of space available in the
   partition (utilization is at 30%).
  
   I know that the create process works as follows (from the manual):
  
   Create a new table named `A-xxx' with the requested changes.
 All rows from the old table are copied to `A-xxx'.
 The old table is renamed `B-xxx'.
 `A-xxx' is renamed to your old table name.
 `B-xxx' is deleted.
  
   Given that, I should have plenty of room. Disk utilization doesn't appear
   to exceed 60% during the process.
  
   Any idea what could be causing this?
  
   ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   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
 

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

 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




RE: Use of the MySQL logo - licensing agreement

2001-10-03 Thread Michael Widenius


Hi!

Sorry for the REAL long response to this thread.  It took just a long
time for our lawyers to understand what we really want to do with the
MySQL AB trademark.  They are so used to protect all issues regarding
their clients trademark that they don't understand that some of the
restrictions they wanted to impose on us is not in our best interest
(:

I have also been busy too busy on getting 4.0.0 ready for distribution
that I haven't had a lot of time to spend on this.

You can find our revised trademark policy at:

http://www.mysql.com/company/trademark.html

I hope this clarifies all issues that has been up on discussion.

We want people to make it easy to use our trademark, we only have to
be carefully that no-one misuses our trademark so that we would risk
loosing it.

Regards,
Monty
CTO of MySQL AB

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

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: Creating indexes on large tables

2001-10-03 Thread Mike Lucente

This worked once I recompiled the distribution. Thanks.

On Wed, 3 Oct 2001, Adams, Bill TQO wrote:

 
 Apparently you have to compile for large file support and have glibc  2.1.3.
 http://www.suse.de/~aj/linux_lfs.html
 
 I have not used it so I do not know the real-world limitations.
 
 Or (for 100MB files):
 mysqldump db table |split -b 1 - table
 
 --Bill
 
 
 Mike Lucente wrote:
 
  I'm also unable to create files 2GB with mysqldump, even after a
  recompile with gcc 2.96, RH 7.1 w/2.4.2 kernel, glibc 2.2.2.
 
  hmmm ...
 
  On Wed, 3 Oct 2001, Adams, Bill TQO wrote:
 
   Perhaps your index file (.MYI) is growing larger than 2GB, the file-size
   limit on 2.2.x kernels?
  
   Or, if you have moved the tables with symlinks, MySQL will put the new file
   (most of the time?) in the configured data directory and not where the
   symlink points.
  
   --Bill
  
  
  
   Mike Lucente wrote:
  
I'm running out of space while creating indexes on some fairly large (1.8
GB) tables, even though I have quite a bit of space available in the
partition (utilization is at 30%).
   
I know that the create process works as follows (from the manual):
   
Create a new table named `A-xxx' with the requested changes.
  All rows from the old table are copied to `A-xxx'.
  The old table is renamed `B-xxx'.
  `A-xxx' is renamed to your old table name.
  `B-xxx' is deleted.
   
Given that, I should have plenty of room. Disk utilization doesn't appear
to exceed 60% during the process.
   
Any idea what could be causing this?
   
** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.
   
-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
   
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
  
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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




RE: Is it possible to Rename Database

2001-10-03 Thread Carsten H. Pedersen

 Is it possible to rename a database?

I would assume that the only way to do is is to
shut down the server, then rename the directory
of the database.

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



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

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




RE: query problem

2001-10-03 Thread Carsten H. Pedersen

 Dear Friends,
  
 I am using mysql 3.23.42. I want to execute one
 query  to get specific result but not getting the
 correct  result.
  
 I have 2 tables named: ContactList and GroupList.
 
snip

  - Now I want to get those 'nickname' from
   ContactList which do not appear in GroupList with  
   following condition:
   ContactList.username = 'gaurang'
   ContactList.username = GroupList.username
   groupname= 'friend'

snip

Try using a left join. Bob Hall explains the concept
very well on this page:

http://users.starpower.net/rjhalljr/MySQL/sql.html

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



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

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




RE: Is it possible to Rename Database

2001-10-03 Thread Ravi Raman

Or, use mysqldump to dump the entire database, edit the CREATE DATABASE line
at the top to the new name and pipe it all back into mysql, then drop the
old one?

-ravi

-Original Message-
From: Carsten H. Pedersen [mailto:[EMAIL PROTECTED]]
Sent: October 3, 2001 11:50 AM
To: Brandon Lewis; [EMAIL PROTECTED]
Subject: RE: Is it possible to Rename Database


 Is it possible to rename a database?

I would assume that the only way to do is is to
shut down the server, then rename the directory
of the database.

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



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

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



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

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




Migration to mysql from MS SQL Server

2001-10-03 Thread Pavel Hant

Hi everybody,

I am trying to migrate a database from MS SQL Server 2000 to mysql.  Does
anybody know any source of information on this matter, or can anybody share
his/her own experience of such a migration?  Suggestions?

 Any help would be appreciated.

Thanks,

Pavel


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

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: Convert table type

2001-10-03 Thread Carsten H. Pedersen

 We are looking to convert all ISAM tables to the new type MYISAM
 
 Has anyone else converted all tables in all their databases in one fell 
 swoop to
 a new type? using the alter table command.
 
 Thanks for any gotchas, hints or suggestions.

A somewhat unconventional method which works
very well (it should be noted that we did this
when the data had to be moved to a new host
anyway):

Dump the data using mysqldump, then use sed
or your favorite editor to change instances of
ISAM to MyISAM, then re-import the data
once again.

It's actually quite fast, and adds the advantage
that you can off-load the temporary copy (i.e. 
the dump files) to another disk - which was
an important issue in our particular case.

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



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

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




RE: Use of the MySQL logo - licensing agreement

2001-10-03 Thread massey

Cool! Now I add the Powered by MySQL to my site. At leaste thats what I
think I remember after a half hour of readingG

M;)



 Hi!

 Sorry for the REAL long response to this thread.  It took just a long
 time for our lawyers to understand what we really want to do with the
 MySQL AB trademark.  They are so used to protect all issues regarding
 their clients trademark that they don't understand that some of the
 restrictions they wanted to impose on us is not in our best interest (:

 I have also been busy too busy on getting 4.0.0 ready for distribution
 that I haven't had a lot of time to spend on this.

 You can find our revised trademark policy at:

 http://www.mysql.com/company/trademark.html

 I hope this clarifies all issues that has been up on discussion.

 We want people to make it easy to use our trademark, we only have to be
 carefully that no-one misuses our trademark so that we would risk
 loosing it.

 Regards,
 Monty
 CTO of MySQL AB

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

 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: Convert table type

2001-10-03 Thread denis

Carsten H. Pedersen wrote:

  We are looking to convert all ISAM tables to the new type MYISAM
 
  Has anyone else converted all tables in all their databases in one fell
  swoop to
  a new type? using the alter table command.
 
  Thanks for any gotchas, hints or suggestions.

 A somewhat unconventional method which works
 very well (it should be noted that we did this
 when the data had to be moved to a new host
 anyway):

 Dump the data using mysqldump, then use sed
 or your favorite editor to change instances of
 ISAM to MyISAM, then re-import the data
 once again.

 It's actually quite fast, and adds the advantage
 that you can off-load the temporary copy (i.e.
 the dump files) to another disk - which was
 an important issue in our particular case.

We did it in one fell swoop, had no problems.

I would make a backup copy, just in case though.

Denis
volunteermatch.org


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

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




Where's this script

2001-10-03 Thread Mike Britt

I'm hoping someone can point me in the right direction.  I'm trying to find
this perl script that is a link on the MySQL.com site but I get this
message:


550 /mirrors/mysql/Downloads/Contrib/excel2mysql.pl: No such file or
directory


Anyone know where this perl script is?  I've got a lot of excel files to
convert to MySQL.  Thanks!



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

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




RE: Migration to mysql from MS SQL Server

2001-10-03 Thread Will French

I just did this with a rather large database.  Here are the steps that I
followed:

1.  In MSSQL Enterprise Manager, use generate scripts to, well, generate
your SQL scripts. (right click on any table and select All|Generate
Scripts).  I decided to break save the index builds until after the data was
loaded so I actually created two script files.

2.  Edit the scripts.  I used notepad and Excel to modify the scripts for
MySql compatibility.  This mostly involved using the ever-popular search and
replace (e.g. eliminate all the [square] brackets that MS is so fond of,
dumping the collation sequence stuff, converting my bit fields to tinyint,
etc).  When the text massaging was more complex, I would cut and paste it
into Excel then used worksheet functions like Find() Mid() Left(), etc.,
then paste the section back into notepad.  Because my schema is not terribly
exotic, I found the field type conversion to be pretty straightforward -
your experience may be different.

3.  Get the data out of MSSQL.  Some people are fond of the newer DTS (data
transformation services) but us old timers still prefer BCP (which, in case
you don't know is a command line bulk copy program).  I created a batch
file with one line for each table.  If you are using trusted security model,
a single bcp command would look like this:
C:\Data   BCP dbname.dbo.tblname out tblname.txt -S srvrname -T -c -t
\t -r \n
If you are using Sql Server authentication, then it would look like this:
C:\Data   BCP dbname.dbo.tblname out tblname.txt -S srvrname -U sa -P
sapwd -c -t \t -r \n
The command line options -c -t \t -r \n tell it to convert fields to
character data, terminate fields with a tab character (hex 09) and terminate
lines with a carriage-return/linefeed pair (hex 0D 0A).  The line (or row)
terminator is decieving 'cause it looks like I just asked for a linefeed but
it gives you both anyway.

4.  Run your create table script in mysql (i use \. scriptname.sql from
the mysql prompt.

5.  Load the data into mysql.  This one's easy:

mysql  use dbname;

mysqlload data infile 'c:\\data\\tblname.txt'
 into table tblname
 lines terminated by '\r\n';

6.  Assuming you didn't already build your indexes in step 4, run the script
to build them now.


There are probably a million different ways to do this.  This is the way I
did it and it worked well for me.  Since I have huge amounts of data, the
fact that both BCP and load data infile are very quick was a deciding
factor.

Hope this helps.

Will French



 -Original Message-
 From: Pavel Hant [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 03, 2001 2:59 PM
 To: [EMAIL PROTECTED]
 Cc: Pavel Hant
 Subject: Migration to mysql from MS SQL Server


 Hi everybody,

 I am trying to migrate a database from MS SQL Server 2000 to mysql.  Does
 anybody know any source of information on this matter, or can
 anybody share
 his/her own experience of such a migration?  Suggestions?

  Any help would be appreciated.

 Thanks,

 Pavel


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

 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: Where's this script

2001-10-03 Thread Carsten H. Pedersen

 I'm hoping someone can point me in the right direction.  I'm 
 trying to find
 this perl script that is a link on the MySQL.com site but I get this
 message:
 
 
 550 /mirrors/mysql/Downloads/Contrib/excel2mysql.pl: No such file or
 directory
 
 
 Anyone know where this perl script is?  I've got a lot of excel files to
 convert to MySQL.  Thanks!

Search for excel2mysql on google, there are several
results. If you can't follow the link, use the Google
cache copy instead :-)

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



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

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




Converting MsSQL7 to MySQL

2001-10-03 Thread admin

I am working on a project for a client that got roped into MsSQL7 by her
last hosting company. I am looking for a good way to convert a MsSQL7
Database to MySQL. Anyone know of a piece of software that will convert the
Database files or atleast suck from one database to the another.

Thanks in advance.

Sincerely,
James Ashton,President
Global Internet Tech, Inc.
http://www.gitflorida.com
407-367-2165


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

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




RE: Is it possible to Rename Database

2001-10-03 Thread Daniel Ouellet

Either way, DON'T FORGET to edit the table right if you use any, etc.

Or you will not access it at all.

Just a quick friendly reminder!

 -Original Message-
 From: Ravi Raman [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 03, 2001 18:04
 To: Carsten H. Pedersen; Brandon Lewis; [EMAIL PROTECTED]
 Subject: RE: Is it possible to Rename Database
 
 
 Or, use mysqldump to dump the entire database, edit the CREATE 
 DATABASE line
 at the top to the new name and pipe it all back into mysql, then drop the
 old one?
 
 -ravi
 
 -Original Message-
 From: Carsten H. Pedersen [mailto:[EMAIL PROTECTED]]
 Sent: October 3, 2001 11:50 AM
 To: Brandon Lewis; [EMAIL PROTECTED]
 Subject: RE: Is it possible to Rename Database
 
 
  Is it possible to rename a database?
 
 I would assume that the only way to do is is to
 shut down the server, then rename the directory
 of the database.
 
 / Carsten
 --
 Carsten H. Pedersen
 keeper and maintainer of the bitbybit.dk MySQL FAQ
 http://www.bitbybit.dk/mysqlfaq
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Migration to mysql from MS SQL Server

2001-10-03 Thread Venu

Hi !!!

 -Original Message-
 From: Will French [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 03, 2001 12:28 PM
 To: Pavel Hant; [EMAIL PROTECTED]
 Subject: RE: Migration to mysql from MS SQL Server


 I just did this with a rather large database.  Here are the steps that I
 followed:

 1.  In MSSQL Enterprise Manager, use generate scripts to, well, generate
 your SQL scripts. (right click on any table and select All|Generate
 Scripts).  I decided to break save the index builds until after the data was
 loaded so I actually created two script files.

 2.  Edit the scripts.  I used notepad and Excel to modify the scripts for
 MySql compatibility.  This mostly involved using the ever-popular search and
 replace (e.g. eliminate all the [square] brackets that MS is so fond of,
 dumping the collation sequence stuff, converting my bit fields to tinyint,
 etc).  When the text massaging was more complex, I would cut and paste it
 into Excel then used worksheet functions like Find() Mid() Left(), etc.,
 then paste the section back into notepad.  Because my schema is not terribly
 exotic, I found the field type conversion to be pretty straightforward -
 your experience may be different.

 3.  Get the data out of MSSQL.  Some people are fond of the newer DTS (data
 transformation services) but us old timers still prefer BCP (which, in case
 you don't know is a command line bulk copy program).  I created a batch
 file with one line for each table.  If you are using trusted security model,
 a single bcp command would look like this:
   C:\Data   BCP dbname.dbo.tblname out tblname.txt -S srvrname -T -c -t
 \t -r \n
 If you are using Sql Server authentication, then it would look like this:
   C:\Data   BCP dbname.dbo.tblname out tblname.txt -S srvrname -U sa -P
 sapwd -c -t \t -r \n
 The command line options -c -t \t -r \n tell it to convert fields to
 character data, terminate fields with a tab character (hex 09) and terminate
 lines with a carriage-return/linefeed pair (hex 0D 0A).  The line (or row)
 terminator is decieving 'cause it looks like I just asked for a linefeed but
 it gives you both anyway.

 4.  Run your create table script in mysql (i use \. scriptname.sql from
 the mysql prompt.

 5.  Load the data into mysql.  This one's easy:

   mysql  use dbname;

   mysqlload data infile 'c:\\data\\tblname.txt'
into table tblname
lines terminated by '\r\n';

 6.  Assuming you didn't already build your indexes in step 4, run the script
 to build them now.


 There are probably a million different ways to do this.  This is the way I
 did it and it worked well for me.  Since I have huge amounts of data, the
 fact that both BCP and load data infile are very quick was a deciding
 factor.

 Hope this helps.

 Will French



  -Original Message-
  From: Pavel Hant [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 03, 2001 2:59 PM
  To: [EMAIL PROTECTED]
  Cc: Pavel Hant
  Subject: Migration to mysql from MS SQL Server
 
 
  Hi everybody,
 
  I am trying to migrate a database from MS SQL Server 2000 to mysql.  Does
  anybody know any source of information on this matter, or can
  anybody share
  his/her own experience of such a migration?  Suggestions?
 
   Any help would be appreciated.
 
  Thanks,
 

If you can make use of MS Access and ODBC in the middle layer in the conversion,
from MSSQL--MySQL, then probably you don't need any editing. Here is the simple
procedure:

1. Install MS Access and MS ODBC Driver
2. Import all or selected tables from MS SQL to MS Access through MS ODBC Driver
3. Export all or selected tables from Access to MySQL through MyODBC

Also, there are other tools available to export or import data from/to Access
to/from MySQL in the www.mysql.com contributed section

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


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

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




Re: Installing PHP with MySQL

2001-10-03 Thread Ralf R. Kotowski

I did install all RPM's exept the benchmark. What is the name of the
header files?

On 3 Oct 2001, at 14:20, Carl Troein wrote:


 Ralf R. Kotowski writes:

  I got Red Hat 6.2 and the Mysql 3.23.36-1 RPM packages installed,
  when I try to compile PHP with MySQL it tells me that it can't find
  the mysql header files... now where are those located? I tried
  specifying every dir that has something to do with MySQL, no luck.

 Did you install all 5 RPMs or just a subset of them?
 As far as I can tell, you need to install the RPM
 that has 'devel' in its name. If you've already done
 so and it still doesn't work, try locating the files
 with 'find', or something.

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




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

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




performance issues with large tables?

2001-10-03 Thread Aaron Brick

hello all,

i am interested in determining whether there are performance issues of which
i should be aware related to the usage of a table which takes up ones or
tens of gigabytes. i am planning to use an index of some kind.

i'd appreciate hearing about any experience which you'd relate, or
any theoretical considerations.

thanks,

aaron brick.


   /\
  |   Aaron Brick (415) 206 - 4685   |
  |   [EMAIL PROTECTED] Room 3501C, SFGH   |

  Programmer Analyst, Functional Genomics Core  
   Sandler Center for Basic Research in Asthma
   Lung Biology Center, Department of Medicine
San Francisco General Hospital
   University of California, San Francisco

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

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




Import *.sql file form sybase

2001-10-03 Thread Craig Newlander

I've checked the mailing archive and did not find what I am looking for.

How can I import data dumped from sybase into .sql files into MySql?

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

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




Re:Help!

2001-10-03 Thread Heikki Tuuri

Alex,

you are using MyISAM type tables which do not support
rollback. Use BDB or InnoDB tables.

Regards,

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

 My big problem is the rollback, every time when I try to use a rollback
 command I get this error:
 ERROR 1196: warning: some non-transaction changed tables couldn´t be
rolled
 back
 
 Do you know why ?
 
 thanks for help




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

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: Import *.sql file form sybase

2001-10-03 Thread Johnny Withers

Depending on weather or not it uses standard SQL, you couuld simply
run:

mysql -u user -ppassword  file.sql

however, I doubt mysql will understand the SQL generated from
your other SQL DB. Might be a better idea to recreate all the
tables/fields in mySQL manually, then dumping to .csv files
(comma seperated values) and using

LOAD DATA 

statements to get the data into mySQL.

-doesnthaveareallycooldotsig

-
Johnny Withers
[EMAIL PROTECTED]
p. 601.853.0211
c. 601.209.4985 

-Original Message-
From: Craig Newlander [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 4:12 PM
To: [EMAIL PROTECTED]
Subject: Import *.sql file form sybase


I've checked the mailing archive and did not find what I am looking for.

How can I import data dumped from sybase into .sql files into 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



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

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: \n is SLASH, N instead of newline

2001-10-03 Thread Benjamin Pflugmann

Hi.

On Wed, Oct 03, 2001 at 11:26:30AM +0800, [EMAIL PROTECTED] wrote:
  It may not intuitive at first, but it is really what one
  wants for default. For example, how would you else know, whether
 
  test
  asdf
 
  was originally one row (test\nasdf) or two rows (test+asdf)?
 
 I would know because I'm the one who thought up and wrote -- for good
 reasons -- the select test\nasdf query.

I presumed that. You wouldn't ask for it, if you couldn't use it.
Therefore, of course, I meant the general case.

 The principle is: commands should work consistently. Computers
 should give you what you ask for.

batch mode doesn't necessarily mean raw mode. You want to ask for
raw mode, but ask for batch mode.

 mySQL should not make exceptions
 of special cases on the assumption that the user will be confused.

But doing it this way would render the output completely useless for
all uses, except for your special case.

Additionally, as I have shown, there is an simple way from the current
output to the special case, but not the other way around.

And please note, that not MySQL, but only the mysql command line
client chooses to do this escaping.

I agree, that one could argue, that the mysql command line client
should offer an option to output raw data, too.

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




schema

2001-10-03 Thread Russell Miller

Hi,

I just got finished creating a database schema.  I tried to follow all the
rules and Normal Forms and all of that stuff, and I think I got it right,
but as this is my first time creating a production schema I'm not sure.  I
was wondering if someone would be willing to take a look over my schema and
let me know of any glaring errors?

Thanks, I appreciate it!

--Russell


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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




Re: Problem with a specific select

2001-10-03 Thread Hugo Koji Kobayashi

On Wed, Oct 03, 2001 at 05:02:27PM +, Carl Troein wrote:
 
 Hugo Koji Kobayashi writes:
 
  I'm making some tests with mysql and I got the errors below when I
  run these selects:
  
  SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id LIMIT 10;
  ERROR 1034: Incorrect key file for table: '#sql17adb_41f_4'. Try to
  repair it
 
 If you get an error message, be sure to read it. :-O
 Run a REPAIR TABLE on the table, and then it should work.
 

No, it doesn't work. I have already run CHECK TABLE, REPAIR TABLE and
the problem still occurs:

-
mysql check table error_test;
+--+---+--+--+
| Table| Op| Msg_type | Msg_text |
+--+---+--+--+
| error.error_test | check | status   | OK   |
+--+---+--+--+
1 row in set (0.88 sec)

mysql repair table error_test;
+--++--+--+
| Table| Op | Msg_type | Msg_text |
+--++--+--+
| error.error_test | repair | status   | OK   |
+--++--+--+
1 row in set (4.77 sec)

mysql SELECT id, COUNT(*) FROM error_test WHERE info = 1 GROUP BY id
LIMIT 10;
ERROR 1034: Incorrect key file for table: '#sqlffa6_1_3'. Try to
repair it
-

It's the reason why I sent this message to the list. Maybe someone can
explain me why this problem is ocurring with the key file.

I thought it was a problem with a table from another DB server that I
imported to mysql, but on table error_test I only made initial inserts
(sql generated by the perl script) to populate it and then the select
statement above.

Any thoughts?

Thanks,
Hugo

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

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




MySQLGUI for OS X?

2001-10-03 Thread Chris Davis

I am having trouble porting MySQLGUI to Mac OS X.  Any plans to make a 
package?

-chris

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

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




row security

2001-10-03 Thread Mostafa Al-Mallawani

Hi, 
I wanted to know if you can allow certain users to edit certain rows.
Please, if anyone knows how to do it, then please tell me, thanks.



Mysql and PHP, installation [How to]

2001-10-03 Thread Ralf R. Kotowski

In order to install PHP with mysql, when mysql is installed from 
RPM's:

Make sure you have all the MySQL RPM's, specially the devel package
then the PHP ./configure command is:

--with-mysql=/usr

and not the default --with-mysql=/usr/local

I just posted this so others can find the answer to this, it took me 
about 5 hours to figure it out :)

greetz

Ralf

http://www.itl.tv

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

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-3.23.42 on HPUX 11.00

2001-10-03 Thread Tony Galan

Can someone help me decipher this make error?

Making all in client
CC -DUNDEF_THREADS_HACK -I./../include
-I../include -I./.. -I..
-I..-O3 -DDBUG_OFF   -DHAVE_BROKEN_PREAD
-DDONT_USE_FINITE
-D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -c mysql.cc
aCC: warning 901: unknown option: `-3': use +help for
online
documentation.
Error 8: ./../include/global.h, line 671 # Invalid
type specifier
combination in declaration: char bool.
typedef charbool;   /* Ordinary
boolean values 0 1 */

Error (future) 667: ./../include/global.h, line 671
# Type name
expected in typedef declaration.
typedef charbool;   /* Ordinary
boolean values 0 1 */
^
Warning:1 future errors were detected and
ignored. Add a '+p'
option to detect and fix them before they become
fatal errors in a future release. Behavior of this
ill-formed program 
is
not guaranteed to match that of a well-formed program
*** Error exit code 2

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
#

Btw, I am using HP's ANSI C  C++ compilers.
I also removed the -Aa flag, but it did not help.



__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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

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: Non Ascii characters

2001-10-03 Thread Doc Nielsen

hey

If the text is supposed to be parsed from a mySQL to a HTML webpage, using
#128; or euro; should display a € sign.
A simple replace would then do the trick.

Doc

- Original Message -
From: Haapanen, Tom [EMAIL PROTECTED]
To: Mysql@Lists. Mysql. Com [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 1:15 PM
Subject: RE: Non Ascii characters


Jamie,

This is likely a client software issue.  We use Perl and DBI, and we have no
trouble storing or retrieving non-USASCII characters.

What are you using to access the MySQL database?

Tom Haapanen
[EMAIL PROTECTED]

-Original Message-
From: Jamie Smith [mailto:[EMAIL PROTECTED]]
Sent: 03 October 2001 06:23
To: Mysql@Lists. Mysql. Com
Subject: Non Ascii characters


I'm having a problem with the sending of the new euro € symbol into the
mysql database through a standard SQL stament. I have tried everything cut
and paste or ALT 0128 on the command line but all I seem to get is a ?
character stored. I know it can be done because I have managed to enter the
symbol using a program 'ArtAdmin' by artronic to enter the data but this
will not be usable because I am trying to write and web based from system to
submit information.
Can anyone tell me how to get this symbol in and are there any others that
might casue trouble.
I have not been able to find anything on this in the manual or previous
posts.

TIA
Jamie


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

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




not allowed to connect to this MySQL server

2001-10-03 Thread Emailit2

I don't know anything about MySQL, Ive just been trying(with no luck)to 
install a forum(Snitz forum from www.snitz.com) on my website. My website is 
Linux/MySQL/Chilisoft!
I open my setup.asp in my browser like: www.dvox.com/forum/setup.asp I get 
the prompt to  login. Once I login I get this:

ADODB.Connection.1 error '80004005' 

SQLState: S1000
Native Error Code: 1130
[TCX][MyODBC]Host 'dvox.com' is not allowed to connect to this MySQL 
server


/forum/setup_login.asp, line 58 

Any info about what this means, and how to fix it is appreciated
Thanks!

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

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




Re: \n is SLASH, N instead of newline -- SOLUTION (why not mention it?)

2001-10-03 Thread Uriel Wittenberg

 batch mode doesn't necessarily mean raw mode. You want to ask for
 raw mode, but ask for batch mode.

Luckily this led me to look up the letter r in command line options
and I happened to find the -r option. Which is exactly what I need.

My question was so clear. I have to wonder why 3 prior responses did not
even hint at the solution.

Your first response sought to justify why mySQL was giving me the
unwanted result. Then you suggested converting mySQL's result with
another tool.

But I simply need -r.

Actually the manual, for -r, says only: Write column values without
escape conversion. Used with --batch. What does this mean exactly? Is
it only that newlines in output data will not be converted to \n? I
don't see escape conversion documented.

 But doing it this way would render the output completely useless for
 all uses, except for your special case.

I really have no idea what you mean here. Without -r, mySQL converts
newlines in output data to the 2 characters slash, n (\n). Why would
output be completely useless if it didn't do this??



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

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: \n is SLASH, N instead of newline -- SOLUTION (why not mention it?)

2001-10-03 Thread Benjamin Pflugmann

Hi.

On Thu, Oct 04, 2001 at 07:53:15AM +0800, [EMAIL PROTECTED] wrote:
  batch mode doesn't necessarily mean raw mode. You want to ask for
  raw mode, but ask for batch mode.
 
 Luckily this led me to look up the letter r in command line options
 and I happened to find the -r option. Which is exactly what I need.

Fine.

 My question was so clear. I have to wonder why 3 prior responses did not
 even hint at the solution.

Simply because I did not know!? 

Aside from that, I spent the time to created a work-around for you, so
you already have a solution.

 Your first response sought to justify why mySQL was giving me the
 unwanted result. Then you suggested converting mySQL's result with
 another tool.

What's wrong with the last? It works, doesn't it?

Sorry, that I wanted to help. :-/

I simply tried to explain why it does what it does (regardless if this
is considered reasonable by you or me).

 But I simply need -r.
 
 Actually the manual, for -r, says only: Write column values without
 escape conversion. Used with --batch. What does this mean exactly? Is
 it only that newlines in output data will not be converted to \n?

From the output format, I assume that it does the same with tabs
(because tab is used as field seperator). And maybe also for 0-bytes.
And of course with backslashes, because backslashes got a special
meaning now:

mysql -N -B -e select 'test\tasdf\01234\\qwert'
test\tasdf\01234\\qwert

I had a look at the source and in fact, that are exactly all cases.

 I don't see escape conversion documented.

Don't know either.

  But doing it this way would render the output completely useless for
  all uses, except for your special case.
 
 I really have no idea what you mean here. Without -r, mySQL converts
 newlines in output data to the 2 characters slash, n (\n). Why would
 output be completely useless if it didn't do this??

I explained that in my last mail in the part to which you reply here.
Except for the special case, were you know which data belong to which
row, you couldn't tell whether a newline is a newline or the seperator
for a new row.

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




process lists

2001-10-03 Thread Griff Hamlin, III

Hello all,

Can anyone tell me how to read the output of the 'mysqladmin
processlist' command? I cannot find any documentation on what each
column really means.

Thank you.


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

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




very newbie insert question

2001-10-03 Thread sjs

This is my first script, so I am sorry it is so newbie-ish.
I think I have the correct script to open the connection, open the database
and the table. However, I cannot get the insert into to work. I have read
several online sources and books, all of which are slightly different. It is
not a parse error.  Can you help?

Thanks
SJS
 Script as follows:

html
headtitleAdding Your Record to the Database/title/head
body
center
?php
if((!$lastName) || (!firstName) ||(!emailAddress))
{
echo You have not entered all required informaton.br Please try again;
exit;
}
$lastName=addslashes($lastName);
$firstName=addslashes($firstName);
$email_address=addslashes($email_address);
@ $db=mysql_pconnect(, ,);
if (!$db)
{
echo Couldn't connect to the database.brIf problem persists, please
contact webmaster;
exit;
}
$db= mysql_select_db(emailDB);
if (!$db)
{
echo Sorry. Could not retrieve correct database.br If problem persists,
please contact webmaster;
}
$sql = INSERT INTO email_addresses VALUES ('$lastName', '$firstName',
'$email_address');
$result = mysql_query($sql);
if (!$result)
{
echo pSorry.brYour address was not successfully added.brIf problem
persists, please contact webmaster.;
}
else
{
echo pDONE DEAL!;
}
?
/body
/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: very newbie insert question

2001-10-03 Thread Russell Miller

I did not see the full schema so I can't give you a definite answer.
However, your syntax is wrong:

INSERT INTO email_addresses (last_name, first_name, email_address) VALUES
($lastname, $firstname, $email_address);

For each value you specify, you also have to specify a column name.

Did you set it up so the email_address field is the primary key?

HTH.

--Russell

- Original Message -
From: sjs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 7:51 PM
Subject: very newbie insert question


 This is my first script, so I am sorry it is so newbie-ish.
 I think I have the correct script to open the connection, open the
database
 and the table. However, I cannot get the insert into to work. I have
read
 several online sources and books, all of which are slightly different. It
is
 not a parse error.  Can you help?

 Thanks
 SJS
  Script as follows:

 html
 headtitleAdding Your Record to the Database/title/head
 body
 center
 ?php
 if((!$lastName) || (!firstName) ||(!emailAddress))
 {
 echo You have not entered all required informaton.br Please try again;
 exit;
 }
 $lastName=addslashes($lastName);
 $firstName=addslashes($firstName);
 $email_address=addslashes($email_address);
 @ $db=mysql_pconnect(, ,);
 if (!$db)
 {
 echo Couldn't connect to the database.brIf problem persists, please
 contact webmaster;
 exit;
 }
 $db= mysql_select_db(emailDB);
 if (!$db)
 {
 echo Sorry. Could not retrieve correct database.br If problem persists,
 please contact webmaster;
 }
 $sql = INSERT INTO email_addresses VALUES ('$lastName', '$firstName',
 '$email_address');
 $result = mysql_query($sql);
 if (!$result)
 {
 echo pSorry.brYour address was not successfully added.brIf problem
 persists, please contact webmaster.;
 }
 else
 {
 echo pDONE DEAL!;
 }
 ?
 /body
 /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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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




Re: very newbie insert question

2001-10-03 Thread Chris Johnson

One only needs to specify the column names if and only if there are not
values, in the correct order, for all of the columns in the table.

That is:
Create Table foo (
aid  intnot nullprimary key,
last varchar(30),
firstvarchar(30),
emailvarchar(60)
);

Right:
Insert Into foo Values (1, '$lastname', '$firstname', '$email');
Insert Into foo (last, first, email) Values ('$lastname', '$firstname',
'$email');

Wrong:
Insert Into foo Values ('$lastname', '$firstname', '$email');

..chris

- Original Message -
From: Russell Miller [EMAIL PROTECTED]
To: sjs [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 7:53 PM
Subject: Re: very newbie insert question


I did not see the full schema so I can't give you a definite answer.
However, your syntax is wrong:

INSERT INTO email_addresses (last_name, first_name, email_address) VALUES
($lastname, $firstname, $email_address);

For each value you specify, you also have to specify a column name.

Did you set it up so the email_address field is the primary key?

HTH.

--Russell

- Original Message -
From: sjs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 7:51 PM
Subject: very newbie insert question


 This is my first script, so I am sorry it is so newbie-ish.
 I think I have the correct script to open the connection, open the
database
 and the table. However, I cannot get the insert into to work. I have
read
 several online sources and books, all of which are slightly different. It
is
 not a parse error.  Can you help?

 Thanks
 SJS
  Script as follows:

 html
 headtitleAdding Your Record to the Database/title/head
 body
 center
 ?php
 if((!$lastName) || (!firstName) ||(!emailAddress))
 {
 echo You have not entered all required informaton.br Please try again;
 exit;
 }
 $lastName=addslashes($lastName);
 $firstName=addslashes($firstName);
 $email_address=addslashes($email_address);
 @ $db=mysql_pconnect(, ,);
 if (!$db)
 {
 echo Couldn't connect to the database.brIf problem persists, please
 contact webmaster;
 exit;
 }
 $db= mysql_select_db(emailDB);
 if (!$db)
 {
 echo Sorry. Could not retrieve correct database.br If problem persists,
 please contact webmaster;
 }
 $sql = INSERT INTO email_addresses VALUES ('$lastName', '$firstName',
 '$email_address');
 $result = mysql_query($sql);
 if (!$result)
 {
 echo pSorry.brYour address was not successfully added.brIf problem
 persists, please contact webmaster.;
 }
 else
 {
 echo pDONE DEAL!;
 }
 ?
 /body
 /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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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



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

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: process lists

2001-10-03 Thread Chris Johnson

It appears (without verifying it myself), these are the approximate
meanings:

IdThe process or thread ID of this particular job or process in the
database
UserUsername of this job or process or connection
HostFrom which host is the User connected
dbWhat is the default database or selected database in use by the User
CommandWhat's this process or thread or connection doing right now
TimeSome sort of indication of time but I'm not sure in what units or
start point
StateSome sort of indication of what this process is doing right now
InfoAdditional information about the command being run right now


- Original Message -
From: Griff Hamlin, III [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 6:42 PM
Subject: process lists


Hello all,

Can anyone tell me how to read the output of the 'mysqladmin
processlist' command? I cannot find any documentation on what each
column really means.

Thank you.


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

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



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

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: Migration to mysql from MS SQL Server

2001-10-03 Thread Will French

venu: If you can make use of MS Access and ODBC in the middle layer in
venu: the conversion,
venu: from MSSQL--MySQL, then probably you don't need any editing.
venu: Here is the simple
venu: procedure:

Yes this is true and probably a superior method for small databases (say,
less than 300Mb).  But if your database is large (mine is  6Gb , with a few
tables  1Gb), then the method you outline is excrutiatingly
sslllooww.  Also keep in mind that MS Access has a hard
coded 2Gb limit on database size.  Finally I would mention that the script
editing chores were, for me, valuable in that they provided me with a chance
to review my schema for opportunities to take advantage of some features in
MySQL not available in MS SQL (date fieldtypes where MS has only datetime,
enum and set types, etc).

Will

 -Original Message-
 From: Venu [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 03, 2001 4:00 PM
 To: [EMAIL PROTECTED]; Pavel Hant; [EMAIL PROTECTED]
 Subject: RE: Migration to mysql from MS SQL Server


 Hi !!!

  -Original Message-
  From: Will French [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 03, 2001 12:28 PM
  To: Pavel Hant; [EMAIL PROTECTED]
  Subject: RE: Migration to mysql from MS SQL Server
 
 
  I just did this with a rather large database.  Here are the steps that I
  followed:
 
  1.  In MSSQL Enterprise Manager, use generate scripts to,
 well, generate
  your SQL scripts. (right click on any table and select All|Generate
  Scripts).  I decided to break save the index builds until after
 the data was
  loaded so I actually created two script files.
 
  2.  Edit the scripts.  I used notepad and Excel to modify the
 scripts for
  MySql compatibility.  This mostly involved using the
 ever-popular search and
  replace (e.g. eliminate all the [square] brackets that MS is so fond of,
  dumping the collation sequence stuff, converting my bit fields
 to tinyint,
  etc).  When the text massaging was more complex, I would cut
 and paste it
  into Excel then used worksheet functions like Find() Mid() Left(), etc.,
  then paste the section back into notepad.  Because my schema is
 not terribly
  exotic, I found the field type conversion to be pretty straightforward -
  your experience may be different.
 
  3.  Get the data out of MSSQL.  Some people are fond of the
 newer DTS (data
  transformation services) but us old timers still prefer BCP
 (which, in case
  you don't know is a command line bulk copy program).  I
 created a batch
  file with one line for each table.  If you are using trusted
 security model,
  a single bcp command would look like this:
  C:\Data   BCP dbname.dbo.tblname out tblname.txt -S
 srvrname -T -c -t
  \t -r \n
  If you are using Sql Server authentication, then it would look
 like this:
  C:\Data   BCP dbname.dbo.tblname out tblname.txt -S
 srvrname -U sa -P
  sapwd -c -t \t -r \n
  The command line options -c -t \t -r \n tell it to convert fields to
  character data, terminate fields with a tab character (hex 09)
 and terminate
  lines with a carriage-return/linefeed pair (hex 0D 0A).  The
 line (or row)
  terminator is decieving 'cause it looks like I just asked for a
 linefeed but
  it gives you both anyway.
 
  4.  Run your create table script in mysql (i use \.
 scriptname.sql from
  the mysql prompt.
 
  5.  Load the data into mysql.  This one's easy:
 
  mysql  use dbname;
 
  mysqlload data infile 'c:\\data\\tblname.txt'
   into table tblname
   lines terminated by '\r\n';
 
  6.  Assuming you didn't already build your indexes in step 4,
 run the script
  to build them now.
 
 
  There are probably a million different ways to do this.  This
 is the way I
  did it and it worked well for me.  Since I have huge amounts of
 data, the
  fact that both BCP and load data infile are very quick was a deciding
  factor.
 
  Hope this helps.
 
  Will French
 
 
 
   -Original Message-
   From: Pavel Hant [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, October 03, 2001 2:59 PM
   To: [EMAIL PROTECTED]
   Cc: Pavel Hant
   Subject: Migration to mysql from MS SQL Server
  
  
   Hi everybody,
  
   I am trying to migrate a database from MS SQL Server 2000 to
 mysql.  Does
   anybody know any source of information on this matter, or can
   anybody share
   his/her own experience of such a migration?  Suggestions?
  
Any help would be appreciated.
  
   Thanks,
  

 If you can make use of MS Access and ODBC in the middle layer in
 the conversion,
 from MSSQL--MySQL, then probably you don't need any editing.
 Here is the simple
 procedure:

 1. Install MS Access and MS ODBC Driver
 2. Import all or selected tables from MS SQL to MS Access through
 MS ODBC Driver
 3. Export all or selected tables from Access to MySQL through MyODBC

 Also, there are other tools available to export or import data
 from/to Access
 to/from MySQL in the www.mysql.com contributed section

 Regards, venu
 --
 For 

UPPERCASE/lowercase/MixedCase table column names?

2001-10-03 Thread Barry M

I'm putting together my first MySQL database and I've noticed in the book 
I'm reading all of the entity names (table  column names) are in lower case.
Other database vendors use UPPERCASE for all of their entity names because 
they are case sensitive.

Is there a reason why I can't use Mixed_Case column names? Or is there a 
reason why I should use lower_case names?

TIA

Barry

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

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




Re: Re: UPPERCASE/lowercase/MixedCase table column names?

2001-10-03 Thread Jason Brooke

 database,sql,query,table

 Is there a reason why I can't use Mixed_Case column names? Or is there a 
 reason why I should use lower_case names?
 
 TIA
 
 Barry
 

 No 
 
 jason 




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

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




Re: \n is SLASH, N instead of newline -- SOLUTION (why not mention it?)

2001-10-03 Thread Uriel Wittenberg

   batch mode doesn't necessarily mean raw mode. You want to ask
for
   raw mode, but ask for batch mode.
 
  Luckily this led me to look up the letter r in command line
options
  and I happened to find the -r option. Which is exactly what I
need.

 Fine.

  My question was so clear. I have to wonder why 3 prior responses did
not
  even hint at the solution.

 Simply because I did not know!?

Sorry if I misunderstood, but you seemed to be implying (above) that I
should ask for 'raw mode', and that is indeed the solution. I don't
know how else to ask for it other than by the -r option.

 Aside from that, I spent the time to created a work-around for you, so
 you already have a solution.

You said something about awk or sed. Are mySQL users generally
familiar with these tools? I'm not, so that was not a solution for me.

  Actually the manual, for -r, says only: Write column values
without
  escape conversion. Used with --batch. What does this mean exactly?
Is
  it only that newlines in output data will not be converted to \n?

 From the output format, I assume that it does the same with tabs
 (because tab is used as field seperator). And maybe also for 0-bytes.
 And of course with backslashes, because backslashes got a special
 meaning now:

 mysql -N -B -e select 'test\tasdf\01234\\qwert'
 test\tasdf\01234\\qwert

 I had a look at the source and in fact, that are exactly all cases.

Seems to me the documentation is confused. It says the effect of using
the -r option is to Write column values without escape conversion.

It should explain that what it means by escape conversion is that
those 4 special characters are converted to 2-character representations
(\n, \t, \0, \\ respectively).

   But doing it this way would render the output completely useless
for
   all uses, except for your special case.
 
  I really have no idea what you mean here. Without -r, mySQL converts
  newlines in output data to the 2 characters slash, n (\n). Why
would
  output be completely useless if it didn't do this??

 I explained that in my last mail in the part to which you reply here.
 Except for the special case, were you know which data belong to which
 row, you couldn't tell whether a newline is a newline or the seperator
 for a new row.

I agree, you couldn't tell. But you haven't explained why that would
render the output completely useless for all uses, except for your
special case.

IF the user (or system designer) has made a mistake; IF his data
contains newlines; IF he does not intend those newlines to be displayed
as newlines; IF the fact that they are displayed that way will somehow
confuse him; THEN maybe somebody has a problem.

It's a question of philosophy: do you design a system with lots of
special rules intended to anticipate mistakes and rescue the users who
make them? Or do you give users simplicity, power, consistency, and let
them get what they ask for?

What's more natural, more simple? Output all characters the same way? Or
take some of them (4, in this case) and change them to 2-character codes
(then forget to document the behavior)?


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

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




RE: Re: UPPERCASE/lowercase/MixedCase table column names?

2001-10-03 Thread Edge, Martin (SSABSA)

We're in the process of rewritting our internal systems in java, using
MySQL. Moving away from VB and MSSQL. We are adopting standard java naming
conventions, ie:
candId
addressLine1
addressLine2
etc...
So only real advice is to stick to a standard.

-medge

 -Original Message-
 From: Jason Brooke [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 04, 2001 1:12 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Re: UPPERCASE/lowercase/MixedCase table  column names? 
 
 
  database,sql,query,table
 
  Is there a reason why I can't use Mixed_Case column names? 
 Or is there a 
  reason why I should use lower_case names?
  
  TIA
  
  Barry
  
 
  No 
  
  jason 
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

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

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




Support related to tables

2001-10-03 Thread Manish Mehta

Hello,

I have some queries related to MySQL
  a.. The Default table_cache = 64 . what its mean? If i increase the
table_cache to 600 whats happened with my mysqladmin processlist (related to
speed) and what is max_tmp_tables.
  b.. If in our database we have 20 tables. how many tables open when a user
connect to my database?
  c.. Does this thing is true that in mysql one thread one for each
connection if yes ,then what's a mean of thread_stack?
  d.. Does MySQL Support Distributed Database .If not, then what's the way
out ?
  e.. What is max_user_connection?
  f.. Is their any Load Tester in MySQL?
Manish Mehta




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

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




Text formatting for HTML output.

2001-10-03 Thread Neil Silvester

Currently I am using a standard TEXTAREA/TEXTAREA field for information 
input to the MySQL database. When I display the allready information in the 
text fields to allow the user to manipulte the information, the formatting 
includes any carrige returns that have been entered. However when I display 
the text using the mysql_fetch_array the returns are no more, and instead 
are only displayed as a single space between the next word. I know this is 
due to the way that HTML reads whitespace, but how can I force the 
formatting of the text so it is displayed how the user intended.
I have tried to use ADDSLASHES() to reformatt the variables befofe entering 
them into the tables, but I am unsure if this is the right method. And if 
so, how can I convert the \n to br?
I am not sure if this is a question that I should be asking to this maillist 
or not, but I thought I would give it a shot.

MySQL = 3.23
Language= PHP

Any help would be greated with open arms.

_
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




Re: \n is SLASH, N instead of newline -- SOLUTION (why not mention it?)

2001-10-03 Thread Benjamin Pflugmann

Hi.

I think we should let this thread die, as the original problem is
solved, and the user already can choose the behaviour via -r.

Bye,

Benjamin.


On Thu, Oct 04, 2001 at 11:52:11AM +0800, [EMAIL PROTECTED] wrote:
batch mode doesn't necessarily mean raw mode. You want to ask for
raw mode, but ask for batch mode.
  
   Luckily this led me to look up the letter r in command line options
   and I happened to find the -r option. Which is exactly what I need.
 
  Fine.
 
   My question was so clear. I have to wonder why 3 prior responses did not
   even hint at the solution.
 
  Simply because I did not know!?
 
 Sorry if I misunderstood, but you seemed to be implying (above) that I
 should ask for 'raw mode', and that is indeed the solution. I don't
 know how else to ask for it other than by the -r option.
[...]

-- 
[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: Yes or No

2001-10-03 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 09:33:53AM +, [EMAIL PROTECTED] wrote:
[...]
 I've seen rumors about bool being an alias for tinyint(1), but it's
 not in the manual and I haven't tested it.

Actually, it's in the manual (but just recently ;), but it tells
otherwise: http://www.mysql.com/doc/C/o/Column_types.html

--
BIT
BOOL
CHAR
These three are synonyms for CHAR(1).
--

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: MySQL 3.23.36 crash on MDK 8

2001-10-03 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 11:30:46AM +0200, [EMAIL PROTECTED] wrote:
 hello,
 
 sorry for my english,
 
 I have a compaq bi PII 400 Mhz with 512 Mo of ram.
 Linux mandrake 8 kernel 2.4.6
 MySQL 3.23.36, apache 1.3.19 with php 4.0.4pl1

Please upgrade MySQL to a recent version (3.23.42 is current) and try
again. If the reason for the hand is already known, it will have been
fixed in newer versions.

 disk free space /usr/ : 2Go /var/ : 2,4 Go
 
[...]
 
 test with linux + apache + php + postgresql and W2000 + IIS5 + asp + SQL
 Server passed
 
 but the test (=7 clients http (first test is ok)) with linux + apache + php
 + mysql crash mysql (/etc/rc.d/init.d/mysql start|stop, mysql, mysqladmin
 and any query don't work)

Does kill or kill -9 work? If not, it's not a problem with MySQL, but
rather with the kernel or with hardware (and the way MySQL uses this).

Next step would be to enable debugging and look where it hangs, but
more about that when you report back.

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: Help me with SELECT - GROUP BY - IF

2001-10-03 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 01:02:19PM +0100, [EMAIL PROTECTED] wrote:
 Hi there. I have problems with mySQL
 
 What I would like to do is:
 
 I have a statement
 
 SELECT a.id AS ID, IDmark, IDrecipe, ocenjevalec, ocena,
 ROUND(AVG(ocena),1) as povprecje, COUNT(*) as all, IF (ID=ocenjevalec,
 'yes', 'no') as zeocenil
 FROM ocenerecepti, obiskovalci
 WHERE IDrecept = 1365 group by IDrecipe
 
 But 'zeocenil' allways returns no, because it groups all the data together
 and only the first data that has IDrecept = 1365 is checked with if sentance.
 
 I have to use group by because of AVG and count. Is there any if-like
 function that checks ALL records for the ID=ocenjevalec, not just the first
 (or the grouped by, seems to take 'ocenjevalec' as from the first data).

It may be randomly chosen, but most often is the first.

 this is not possible, how can I achieve that? Should I make another
 recordset?

You can use the fact that boolean expression in MySQL evaluate to 1
resp. 0 if used in an integer context, and use SUM() to force
evaluation of all of them:

IF( SUM( ID=ocenjevalec )  0 ,'yes', 'no') as zeocenil

which is a short form for the more obvious

IF( SUM( IF(ID=ocenjevalec,1,0) )  0 ,'yes', 'no') as zeocenil

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




Re: databases

2001-10-03 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 05:23:51PM +0200, [EMAIL PROTECTED] wrote:
 Hi,
 
 i have a simple question:
 how many databases is mysql able to handle.

There is no hard limit by MySQL. There are limits brought in by your
operating system, though.

 i have a mysql server on a dual xenon with 2GB ram
 with 300 Databases (for each customer one)
 but in the meantime a simple query takes ages to complete 10s
 select * from table tablename
 (11K rows)
 (no other links are active 100% cpu for this query)
 
 the same db on a fresh mysql installation (same binary  config)
 on a second box (dual xenon 2GB Ram) is as fast as it i expect 
 it to be les than 1s.

What happens if you run this query a second time (on both boxes)?

What about other tasks like copying files? 

 therfore the exact dirrence between the boxes is only that 
 one has 300 DB's the other not.
 
 both boxes had no load while testing.
 
 has someone the same a idea if this realy the reason or not ?

300 other DB will not bother, if they are not going to be used during
your test (as you described). The main effect that others DB have
(during load) will be that the resources have to be shared, mainly
filesystem caches and disk accesses.

300 DB with its tables _might_ be a problem for the filessystem to
handle, but then the filesystem is crap, IMNSHO.

 Box OS FBSD 4.3 (yes a OS not scrap)

Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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