Re: OS X Installation and Setup

2003-09-12 Thread Andy Callan
> Does the installation of the PKG itself finish successful?

No problems installing the files, the PKG works fine and everything is as it should be 
in /usr/local/

> It's essential to start up mysqld before you continue with using
> mysqladmin.

When i try to startup the mysqld it works but then I get "msqld ended" immediately 
afterwards, I tried to follow the two posts about that with the online 
documentation with no luck.  If you need anymore info just let me know, thanks a 
lot for your response.

 Cheers,
Andy


-- 
Andy Callan
St. Thomas More College
Rm M112
Mounts Bay Rd.
Crawley, WA 6009
IM: CALid05
www.nd.edu/~acallan1



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



Date computation in MySQL & PHP

2003-09-12 Thread delz
Hi All,

I want to know how do I use computations on dates in php or mysql like for
example, today is September 13, 2003 (2003-09-13) and I want to get the date
output if I add 5 days from the given date so that my output would be
September 18, 2003 (2003-09-18). And if any given day falls on a Sunday, it
will be moved to Monday. I just want to disregard Sunday and want to use
Monday to Saturday. Anyone who can help me will be appreciated.

Regards,

Delz



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



placing the OMIM database locally

2003-09-12 Thread Jeroen Van Goey
Hi,
I want to put the OMIM databse locally on my computer. I downloaded the
file genemap from ftp://ftp.ncbi.nih.gov/repository/OMIM/ It contains a
list of fields, separated by the '|' character. An example is:

1.1|9|11|95|1pter-p36.13|CCV|P|Cataract, congenital, Volkmann
type||115665|Fd|linked to Rh in Scottish family||Cataract, congenital,
Volkmann type (2)| | ||
1.2|9|25|01|1pter-p36.13|ENO1, PPH, MPB1|C|Enolase-1, alpha||172430|S,
F, R, REa|||Enolase deficiency (1)| | |4(Eno1)|
1.3|10|23|87|1pter-p36.13|GDH|C|Glucose dehydrogenase||138090|S, F
| ||
...

The fields are, in order :

1  - Numbering system, in the format  Chromosome.Map_Entry_Number
2  - Month entered
3  - Day "
4  - Year"
5  - Location
6  - Gene Symbol(s)
7  - Gene Status (see below for codes)
8  - Title
9  - 
10 - MIM Number
11 - Method (see below for codes)
12 - Comments
13 -
14 - Disorders
15 - Disorders, cont.
16 - Disorders, cont
17 - Mouse correlate
18 - Reference

I now want to "CREATE TABLE genemap", but I'm a bit unsure as of what
parameters to use (VARCHAR, INTEGER,...), and what values are of these
parameters.

So, has anybody done this before, or can you point me to a place where
I can find this information? 

Thanks in advance, Jeroen


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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



Re: Cleaning up a messy mysql

2003-09-12 Thread Paul DuBois
At 9:26 PM -0700 9/12/03, Scott Haneda wrote:
I have inherited a mysql install, in the user table, there are many
usernames and passwords that are not connected to any databases or tables.
Looks like someone deleted the databases at one time and neglected to d it
right and left ghost users around.
Not necessarily. Do any of these accounts have any of the privilege
columns set to 'Y'?  If so, they do have privileges (global privileges).
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

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


Cleaning up a messy mysql

2003-09-12 Thread Scott Haneda
I have inherited a mysql install, in the user table, there are many
usernames and passwords that are not connected to any databases or tables.
Looks like someone deleted the databases at one time and neglected to d it
right and left ghost users around.

Any way to issue some sql that would search these out and then optionally
clean it all up?
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]Novato, CA U.S.A.


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



Re: don't work

2003-09-12 Thread Bob Hall
On Fri, Sep 12, 2003 at 10:28:11PM -0400, SWIT wrote:
> Nice subject line huh ?
> Mysql 4.0.14 freebsd. (why does it say unknown by the way ?)
> 
> I get this when trying to run
> badboy# Starting mysqld daemon with databases from /usr/local/mysql/data
> 030912 22:08:06  mysqld ended
> 
> 
> [1]Done  ./mysqld_safe
> 
> I RTFM twice. I followed the manual as best as I could.
> Now I was logged in as
> user
> su -
> when I did all the stuff that the instro's said to do.
> Mysql is installed in /usr/local/yada-yadaa-yada-whatever
> and I did the ln -s thingy (can u tell I'm not unix geek yet)
> I did all the chmods and chgrps per the manual.
> I can't find a error log either.
> not in /var/db
> not in /usr/local/mysql or the sub dir
> 
> Installed from the binaries for freebsd. Am running version 4.8

I've always installed MySQL from the ports, so I never had to do 
those Unix thingies. Never had a problem. The simplest solution is 
to install from the ports.

Bob Hall

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



more on don't work.

2003-09-12 Thread SWIT
badboy# ./mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (
2)
that file is not there.
should I touch it ?
argggh !
and ya say windows sucks. (ok the beer is talking now)


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



Re: Wrong usage of DB GRANT and GLOBAL PRIVILEGES

2003-09-12 Thread Paul DuBois
At 10:32 PM -0400 9/12/03, Roy Smith wrote:
On Friday, September 12, 2003, at 10:24  PM, Paul DuBois wrote:
FILE is a global privilege (it's recorded only in the user table)
and must be granted at that level:
GRANT FILE ON *.* TO 'roy'@'localhost';
Ah.  That makes sense.  Thanks.

I'm not sure why you're trying to grant to just "roy".  That's the
same as 'roy'@'%'.  Is that how your account is actually set up?
Yes.  I've got a bit of a toy environment, on a secure network, for 
educational purposes, so I havn't really given much thought to this 
kind of stuff.
Okay.  Then the GRANT statement I showed should end in "TO 'roy'", not
"TO 'roy'@'localhost'".
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

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


Re: Wrong usage of DB GRANT and GLOBAL PRIVILEGES

2003-09-12 Thread Roy Smith
On Friday, September 12, 2003, at 10:24  PM, Paul DuBois wrote:
FILE is a global privilege (it's recorded only in the user table)
and must be granted at that level:
GRANT FILE ON *.* TO 'roy'@'localhost';
Ah.  That makes sense.  Thanks.

I'm not sure why you're trying to grant to just "roy".  That's the
same as 'roy'@'%'.  Is that how your account is actually set up?
Yes.  I've got a bit of a toy environment, on a secure network, for 
educational purposes, so I havn't really given much thought to this 
kind of stuff.

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


don't work

2003-09-12 Thread SWIT
Nice subject line huh ?
Mysql 4.0.14 freebsd. (why does it say unknown by the way ?)

I get this when trying to run
badboy# Starting mysqld daemon with databases from /usr/local/mysql/data
030912 22:08:06  mysqld ended


[1]Done  ./mysqld_safe

I RTFM twice. I followed the manual as best as I could.
Now I was logged in as
user
su -
when I did all the stuff that the instro's said to do.
Mysql is installed in /usr/local/yada-yadaa-yada-whatever
and I did the ln -s thingy (can u tell I'm not unix geek yet)
I did all the chmods and chgrps per the manual.
I can't find a error log either.
not in /var/db
not in /usr/local/mysql or the sub dir

Installed from the binaries for freebsd. Am running version 4.8

thanks
Mark


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



Re: Wrong usage of DB GRANT and GLOBAL PRIVILEGES

2003-09-12 Thread Paul DuBois
At 8:59 PM -0400 9/12/03, Roy Smith wrote:
I'm running  mysql-standard-4.0.14-pc-linux-i686.

I've got a database netscore which I want to be able to bulk load. 
The database already exists and I can do inserts into tables:

[EMAIL PROTECTED] schema]$ mysql -s
mysql> use netscore
mysql> insert into boat values (100, 'foo', 'foo', 'foo', 101);
mysql>
but I can't do a "load data infile".  When I try, I get access denied:

[EMAIL PROTECTED] schema]$ mysql -s
mysql> use netscore
mysql> load data infile 'data/boat.data' into table boat;
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)
mysql>
I tried to do a "grant file", but get a "wrong usage" error:

[EMAIL PROTECTED] schema]$ mysql -u root -p -s
Enter password:
mysql> grant file on netscore.* to roy;
ERROR 1221: Wrong usage of DB GRANT and GLOBAL PRIVILEGES
mysql>
FILE is a global privilege (it's recorded only in the user table)
and must be granted at that level:
GRANT FILE ON *.* TO 'roy'@'localhost';

I'm not sure why you're trying to grant to just "roy".  That's the
same as 'roy'@'%'.  Is that how your account is actually set up?
I don't understand this message.  Doesn't the "on netscore.*" clause 
mean I'm setting privileges at the database level?  Why does it 
think I'm doing a global?


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

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


Wrong usage of DB GRANT and GLOBAL PRIVILEGES

2003-09-12 Thread Roy Smith
I'm running  mysql-standard-4.0.14-pc-linux-i686.

I've got a database netscore which I want to be able to bulk load.  The 
database already exists and I can do inserts into tables:

[EMAIL PROTECTED] schema]$ mysql -s
mysql> use netscore
mysql> insert into boat values (100, 'foo', 'foo', 'foo', 101);
mysql>
but I can't do a "load data infile".  When I try, I get access denied:

[EMAIL PROTECTED] schema]$ mysql -s
mysql> use netscore
mysql> load data infile 'data/boat.data' into table boat;
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)
mysql>
I tried to do a "grant file", but get a "wrong usage" error:

[EMAIL PROTECTED] schema]$ mysql -u root -p -s
Enter password:
mysql> grant file on netscore.* to roy;
ERROR 1221: Wrong usage of DB GRANT and GLOBAL PRIVILEGES
mysql>
I don't understand this message.  Doesn't the "on netscore.*" clause 
mean I'm setting privileges at the database level?  Why does it think 
I'm doing a global?

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


RE: Querys Dropped/Connections Lost

2003-09-12 Thread Dathan Vance Pattishall
Can you send you’re my.cnf options in /etc? You might have wait-timeout
set.

- Dathan Vance Pattishall
  - Sr. Programmer and mySQL DBA for FriendFinder Inc.
  - http://friendfinder.com/go/p40688


-->-Original Message-
-->From: Daniel Baughman [mailto:[EMAIL PROTECTED]
-->Sent: Friday, September 12, 2003 4:21 PM
-->To: [EMAIL PROTECTED]
-->Subject: Querys Dropped/Connections Lost
-->
-->I have a mysql server running on a dual processor pentium 233 (a real
-->power
-->house :) ).  And I have serveral php web sites that access it
locally.
-->One
-->of about 15 reads results in the following error being generated:
-->
-->
-->Error
-->
-->MySQL said:
-->
-->Lost connection to MySQL server during query
-->
-->
-->Anyone got a fix or have heard of that before?
-->
-->
-->Daniel Baughman
-->
-->
-->--
-->MySQL General Mailing List
-->For list archives: http://lists.mysql.com/mysql
-->To unsubscribe:
-->http://lists.mysql.com/[EMAIL PROTECTED]


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



Querys Dropped/Connections Lost

2003-09-12 Thread Daniel Baughman
I have a mysql server running on a dual processor pentium 233 (a real power 
house :) ).  And I have serveral php web sites that access it locally.  One 
of about 15 reads results in the following error being generated:


Error

MySQL said:

Lost connection to MySQL server during query


Anyone got a fix or have heard of that before?


Daniel Baughman


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



Re: Selecting consecutive rows

2003-09-12 Thread Bruce Feist
Robert Kilroy wrote:

I've been trying to work out a query for this project
and I'm finally at the end of my rope. Basically, I
have a ticket sales app. There is a table that has
row_num and seat_num and seat_status. 

If you have the luxury of being able to change this, consider replacing
it with a table with row_num, low_seat_num, n_seats, and
seat_group_status.  In other words, store information on consecutive
groups of seats instead of on individual seats.  This table will be
significantly smaller than your original table, yet it will make queries
such as the one you describe practical.
The down side is that as I described it, there's redundant data in it,
which can lead to inconsistency if a program gets careless: what if
there are two overlapping ranges of seats described in the table?  You
could avoid that problem by not storing high_seat_num instead of
low_seat_num and n_seats, and by having the range automatically start
with the previous record found (or '1', if there is no previous record
for the row of seats).  In other words, if there were two records for a
row of seats and one had a high_seat_num of 6 and the other a
high_seat_num of 15, the first one would be considered to describe a
range of seats from 1 to 6 and the second would be seats from 7 to 15.
Although this structure would be stabler, it would make querying more
difficult.
What I need to
do is retrieve X number of seats that are sequential.
For example, if someone requests 4 seats, and seats 1
and 2 are sold, he would get seats 3, 4, 5, 6. Or if
seats 5, 6 are sold he would get 7, 8, 9, 10.
 

Here's a sample query the first way, with both low_seat_num and n_seats
represented.  :seats_needed will be a variable indicating how many seats
are requested.  To keep it simple, in these queries I'm going to find
*all* seat ranges suitable instead of the one in the lowest row.
SELECT *
 FROM row_range
 WHERE n_seats >= :seats_needed AND seat_status = AVAILABLE;
Note that this query is *very* efficient if there's a compound index
defined on seat_status followed by n_seats.
Things are much more complex the second way, where we have
high_seat_num.   I will assume that there's a dummy record for each row
with high_seat_num = 0 and seat_group_status = DUMMY for simplicity.
Here's one way of doing it.
SELECT r2.row_num, max (r1.high_seat_num + 1) AS low_seat_num,
r2.high_seat_num, r2.seat_group_status
 FROM row_range r1, row_range r2
 WHERE r1.row_num = r2.row_num AND r1.high_seat_num < r2.high_seat_num
AND r2.seat_group_status = AVAILABLE
 GROUP BY r2.row_num, r2.high_seat_num, r2.seat_group_status
 HAVING r2.high_seat_num + 1 - r1.high_seat_num >= :seats_needed;
Here's a way of doing it with your current structure.  It requires a
subquery, though, so it won't work in all versions of MySQL.
SELECT r.row_num, r.seat_num AS low_seat_num, r.seat_num + :seats_needed
AS high_seat_num, r.seat_status
 FROM row_info r
 WHERE r.seat_status = AVAILABLE AND
 not exists (SELECT * from row_info r1
WHERE r.row_num = r1.row_num AND r1.seat_num <
r.seat_num + :seats_needed AND r.row_status <> AVAILABLE);
And, finally, here's a way of doing it with your current structure
without subqueries, but requiring multiple SQL statements and a
temporary table.
/* ranges will contain all candidate ranges of seats, where the first
and last are AVAILABLE, but there might be unavailable seats in between */
CREATE TEMPORARY TABLE ranges
 SELECT r1.*
   FROM row_info r1, row_info r2
   WHERE r1.row_num = r2.row_num AND r1.seat_num + :seats_needed - 1 =
r2.seat_num AND r1.seat_status = AVAILABLE AND r2.seat_status = AVAILABLE;
/* good_ranges uses a left join to find rows in "ranges" without
non-AVAILABLE seats in the range */
CREATE TEMPORARY TABLE good_ranges
 SELECT r.*
FROM ranges r LEFT JOIN row_info bad ON r.row_num = bad.row_num
   AND (bad.seat_num BETWEEN r.seat_num + 1 AND r.seat_num
+ :seats_needed -2)
   AND bad.seat_status <> AVAILABLE
WHERE bad.row_num IS NULL;
SELECT *
  FROM good_ranges;
DROP ranges, good_ranges;

Warning: None of the above queries has been tested!

Bruce Feist



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


date calculation, design advice needed (continued)

2003-09-12 Thread Chambers John
arrgg, sorry i made a mistake and my precedent mail
was sent before i finished wrting it :-{, 

the query is:

INSERT INTO `TBL_COUNT_EXCLUDE`
SELECT MAIN.id, SUM(IF(EX.excl_date BETWEEN
MAIN.start_date AND MAIN.end_date, 1, 0)) AS
excl_count
FROM TBL_MAIN_DATE AS MAIN, TBL_EXCLUDE_DATE AS EX
GROUP BY id

and after that i substract the number of days between
start_date and end_date for each row, minus
excl_count.

i dont think this is very efficient, and it takes a
long time to compute on millions of rows, so any
advice will be greatly appreciated.

here's some info on the data i manipulate:

- there's can't be more than 3 months between
start_date and end_date

- start_date and end_date can span on two consecutives
year, i will have some cases with start_date :
2003-12-10 and end_date : 2004-02-10)


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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



date calculation, design advice needed

2003-09-12 Thread Chambers John
hi all,

i've a question concerning the calculation of the
number of days between 2 dates, and after searching
the mailing list i'm still stuck, any help will be
appreceiated :}

actually i've a table with a lot of rows (varying
between 5 to 15 millions), each row has a unique id
and 2 date:
start_date and end_date (which are in fact datetime
fields).

i need to calculate the (integer) number of days
between start_date and end_date for each row BUT
without counting some dates (mostly sundays and some
holidays) if they are present between start_date and
end_date.

i dont know if it's very clear (sorry, english is not
my native language) so here's an example of what i'm
trying actually :

- i've created a table to store the dates i need to
exclude :

CREATE TABLE `TBL_EXCLUDE_DATE` (
  `excl_date` date NOT NULL default '-00-00',
  `label` char(32) NOT NULL default '',
  PRIMARY KEY  (`excl_date`)
)


and populated it with all the sundays of year 2003 and
some others dates like christmas, easter monday, etc
etc

i've also my main table with my millions of rows:

CREATE TABLE `TBL_MAIN_DATE` (
  `id` mediumint(9) unsigned NOT NULL auto_increment,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `start_date` (`start_date`),
  KEY `end_date` (`end_date`)
)

i created also a third table for storing the number of
days to exclude for each row:

CREATE TABLE `TBL_COUNT_EXCLUDE` (
  `id` mediumint(9) unsigned NOT NULL,
  `excl_count` tinyint unsigned NOT NULL,
  PRIMARY KEY  (`id`)
)

and i populate it with this query:

INSERT INTO `TBL_COUNT_EXCLUDE`
SELECT TEST.id, SUM(IF(EX.excl_date BETWEEN
TEST.start_date AND TEST.end_date, 1, 0)) AS nb_jour
FROM TBL_TEST AS TEST, SILOE_REF_EXCLUSION_DATE AS EX
GROUP BY id


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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



Re: slave stopped replicating with uncommon errors in the log

2003-09-12 Thread Dan
I almost forgot to mention versions:
Master is:
MySQL 4.0.14-standard-log
Redhat 8
kernel 2.4.18-14
Slave is:
MySQL 4.0.12-log
Redhat 9
kernel 2.4.20-19.9


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


slave stopped replicating with uncommon errors in the log

2003-09-12 Thread Dan Edwards
Hi, I have a master -> slave setup that's been working for years. Then 
yesterday I shutdown the slave with a "shutdown -r now", added some more 
ram, booted it back up. Then a few minutes later data stopped being 
inserted/updated into tables. The slave process was still running, and 
the Read_Master_Log_Pos var in "show slave status" was incrementing away 
like everything was just fine. So I looked in the log file and found this:

030911 18:01:51  /usr/sbin/mysqld: Normal shutdown

030911 18:01:51  Slave I/O thread exiting, read up to log 'db-bin.012', 
position 829896886
030911 18:07:57  mysqld started
030911 18:07:58  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.12-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
030911 18:07:58  Slave I/O thread: connected to master 
'[EMAIL PROTECTED]:3306',  replication started in log 'db-bin.012' at 
position 829896886
030911 18:16:17  Error in Log_event::read_log_event(): 'read error', 
data_len=149,event_type=2
030911 18:16:17  Error reading relay log event: slave SQL thread aborted 
because of I/O error
030911 18:16:17  Could not parse log event entry, check the master for 
binlog corruption
This may also be a network problem, or just a bug in the master or slave 
code.
030911 18:16:17  Error running query, slave SQL thread aborted. Fix the 
problem, and restart the slave SQL thread with "SLAVE START". We stopped 
at log 'db-bin.012' position 829892665

I've searched google for these errors and can't find any solutions. My 
specific question is it says "check the master for binlog corruption" so 
I did a "mysqlbinlog -j 829892665 db-bin.012" on the master and it works 
fine. So no obvious corruption there. Is there anything else to check 
that could be fixed?

I think at the very least there is a pretty obvious bug here that "show 
slave status" doesn't indicate any problems, but no data is being 
inserted/updated into tables.

I'll be taking down the master tonight to get a snapshot to restore the 
slave, resetting the binlogs. If I should save anything for the sake of 
helping track down the above bug let me know before then.

Thanks for any help!
Dan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Retrieve a binary file from a mysql database

2003-09-12 Thread colbey


>From mysql manual:

If you want to create the resulting file on some other host than the
server host, you can't use SELECT ... INTO OUTFILE. In this case you
should instead use some client program like mysqldump --tab or mysql -e
"SELECT ..." > outfile to generate the file



On Fri, 12 Sep 2003, karim bernardet wrote:

> Hello,
>
> Is it possible to retrieve a file stored in a blob field using a mysql
> client from a host which is not the server ?
>
> Thanks for your help,
>
>
> Karim.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>

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



Re: converting from MS Access

2003-09-12 Thread Bob Hall
On Fri, Sep 12, 2003 at 05:02:29PM +, [EMAIL PROTECTED] wrote:
> Hi I am trying to convert an existing access database to MYSQl and not having 
> much luck I have tried dbtools but I end up with nothing transfering.  Am I 
> doing something wrong or is there a better conversion tool

You can export Access tables as tab delimited files, and import them into 
MySQL with mysqlimport or LOAD DATA INFILE. Check the documentation for 
details. This question comes up a lot, so you can get a lot of information 
by searching the archives.

As to whether you're doing something wrong with dbtools; no one can 
answer your question without knowing what you are doing.

Bob Hall

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



C-JDBC (Was RE: Has anyone heard of SafeKit?)

2003-09-12 Thread Neil Aggarwal
Heikki:

I agree that there a many issues to addres when trying to use
multiple databases as a single database.  

The C-JDBC project (at least on the surface) seems to think
it is possible.  Their web page is at:
http://c-jdbc.objectweb.org/
They even have a way to use multiple controllers to avoid
that being a single point of failure.

I am more interested in a homogenous MySQL environment instead
of a heterogenous one.

If you have any insights into potential probles with their
approach, I would really like to hear them.

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by 
17% or more in 6 months or less! => http://newsletter.JAMMConsulting.com

> -Original Message-
> From: Heikki Tuuri [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 12, 2003 1:55 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Has anyone heard of SafeKit?
> 
> 
> Dan,
> 
> - Original Message - 
> From: ""Dan Greene"" <[EMAIL PROTECTED]>
> Newsgroups: mailing.database.myodbc
> Sent: Friday, September 12, 2003 7:58 PM
> Subject: RE: Has anyone heard of SafeKit?
> 
> 
> > I believe it, as there's an open source project c-jdbc 
> (clustered jdbc) =
> > that can do it for x number of machines running any jdbc 
> compatible db's =
> > (and they don't even need to be the same type...)
> 
> that is extremely hard to implement :). Think about 
> deadlocks, serialization
> differences, SQL dialects, etc.
> 
> Best regards,
> 
> Heikki Tuuri
> Innobase Oy
> http://www.innodb.com
> Foreign keys, transactions, and row level locking for MySQL
> InnoDB Hot Backup - a hot backup tool for MySQL
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?> [EMAIL PROTECTED]
> 


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



Re: Has anyone heard of SafeKit?

2003-09-12 Thread Heikki Tuuri
Dan,

- Original Message - 
From: ""Dan Greene"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Friday, September 12, 2003 7:58 PM
Subject: RE: Has anyone heard of SafeKit?


> I believe it, as there's an open source project c-jdbc (clustered jdbc) =
> that can do it for x number of machines running any jdbc compatible db's =
> (and they don't even need to be the same type...)

that is extremely hard to implement :). Think about deadlocks, serialization
differences, SQL dialects, etc.

Best regards,

Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for MySQL




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



Re: Lots of FULLTEXT stuff (suggestions)

2003-09-12 Thread Sergei Golubchik
Hi!

On Sep 11, Matt W wrote:
> Hi Sergei!
> 
> I'll try to keep my observations/ideas below as short and simple to
> understand as possible. :-)

Thanks :)

Here I reply very quickly to some questions.
Another reply will follow...
 
> Sure, boolean mode is faster in *some* cases, since, as you said, it
> doesn't need "the list of all matched documents." From my experience,
> it's [only] faster in searches like ' some words ' (no boolean
> operators; and yes, I know "some" is a stopword ;-)), especially with
> LIMIT, but it just returns the first documents it finds with any single
> word.

No, it's MUCH faster then search string contains popular words.  E.g.
1,000,000 rows, and the few (say, five) words that are present in
400,000 rows each, but intersection is small (numbers similar to my
benchmarks).  This will make NL fulltext search engine to keep a list of
1,000,000 documents (w/o actual row data of course) in the memory - and
search through it - it'll be hell as slow.

> ...
> the ones that contain more of the words
> will usually be ranked highest from my experience.

Normally yes.
But this is not guaranteed. E.g. the document that contain only one of
the words, but is short can have higher relevance than the other one
than contains both words, but also has many other words, so relative
weight of these two words in the document is low. This effect is only
noticeable when texts' lengths are significatly different.

> It would be great if these disk seeks could be optimized to read a chunk
> of rows at a time *in row order* as it seems right now that each row is
> read one-at-a-time in relevance order. Like if you could take a chunk
> of, say, 1000 row pointers which are in relevance order, sort them in
> datafile row order, and then read them like that. Wouldn't this cause
> fewer random seeks since you keep moving "in the same direction" in the
> file?

Yes, that would.
I can say it for sure, as this optimization is already implemented in
MySQL. It is used in filesort. I should've known it can be used here too
:)
Thanks.

> Right now if I want all words in my application, I'm favoring using a
> natural language query with LIMIT 1000 or so and then running another
> query with LIKE to check those 1000 document IDs to see if they contain
> all words.

You can simply do AND MATCH ... AGAINST ("..." IN BOOLEAN MODE)+0

+0 will guarantee that in this case an index will not be used,
so that it will be used for your MATCH in natural-language mode.
(I cannot say out of my head what MATCH from both optimizer will prefer,
so this simple trick will do)

> I was even thinking that IN BOOLEAN MODE syntax should be removed
> (ignored, actually, to maintain backwards compatibility) and whether or
> not boolean operators are used in the query determines whether or not
> boolean mode is used (relevance sorting in both cases). This seems
> logical. :-)

Yes, it how it worked in the very first version.
Then I though to make it explicit to avoid problems with boolean
operators that can occasionally be present in the natural language query
(especially when it is a big chunk of text - a very typical application
for NL search).
 
> > > To the developers: any word on if and when any of these things would be
> > > implemented? I know from the TODO and other list messages that some
> > > will. Any *estimates* (in months or MySQL version) on when would be
> > > great. Just any info on new full-text features, even ones that I didn't
> > > mention, would be awesome to hear. :-) And like how they would be
> > > implemented and used by us (syntax, etc.).
> >
> > As I told - it's very difficult to predict this :(
> > Anyway, I doubt anything that requires changing .frm
> > file structure will get into 4.1
> >
> > > How about changing the default min/max (or just min if you want) word
> > > length? I think everyone *really* wishes ft_min_word_len was 3.  Seems
> > > like that and indexing numbers shorter than min_word_len could be easily
> > > done. Please? :-)
> >
> > Yes, it's safe enough for 4.1
> 
> Sorry, I don't know what this means. :-) You mean ft_min_word_len will
> be 3 by default in 4.1? And what is "safe enough?"

"safe enough" means that no big features can be added to 4.1 anymore.
Only small local changes.
Most fulltext-related changes are local :)
 
> P.S. Is there a document somewhere that has information about the
> internals of full-text search or MySQL in general? I noticed this "bk
> commit - mysqldoc tree (1.790)" message on the Internals list the other
> day:
> http://lists.mysql.com/list.php?3:mss:9961:200309:bpfbpgphemknogaidjep
> and bk commit - mysqldoc tree (1.799)
> http://lists.mysql.com/list.php?3:mss:9996:200309:lejkmpinlmdninacgcpl
> They appear to be updating a document about internals (inc. full-text
> search). However, I can't find this document anywhere (source (for
> Win32), MySQL site/docs). Could you tell me where to get it? :-) Thanks!

It's in the bk tree only.
But you may use http bk interf

RE: SQL query crashes MySQL

2003-09-12 Thread Irwin Boutboul
Yes, that is exactly what I am experiencing. The result comes back, and 
the server dies
So it's probably a known bug
It s via mysqlcc. With command line it works fine in fact (good catch).
I'm not familiar with the JDBC driver/mysqlcc. Does it (the JDBC) also use 
mysqlcc ? Or can I run safely my queries with the JDBC driver ? (or shall 
I test too:)

Thanks,




Irwin Boutboul
Advanced Internet Technology
150 Kettletown Road, B2-N06
Southbury, CT 06488
Phone: 203-486-5614




"Little, Tim" <[EMAIL PROTECTED]> 
09/12/2003 01:58 PM

To
Irwin Boutboul/Watson/[EMAIL PROTECTED]
cc

Subject
RE: SQL query crashes MySQL






Does that crash the server in command-line mode (via mysql) or just in
MySQLcc?

I've seen similar crashes (actual full server crashes) in similar queries
but only under mysqlcc.  It seems that the results come back but the 
server
dies just after that point.  Is this what you are experiencing?

Tim...

-Original Message-
From: Irwin Boutboul [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 12:03 PM
To: [EMAIL PROTECTED]
Subject: SQL query crashes MySQL


Here it is: 

select  floor(avg(selection.bandwidth))*8000 as avgbandwidth  from (select 

avg(bandwidth) as bandwidth from FEEDBACK_DOWNLOADS where servername= ? 
and  ( bytesdownloaded > 50 or timeduration > 3000 ) group by id order 

by starttime desc limit 20) as selection;


This complex (?) query makes mySQL crash everytime. 

If I replace the inner 'select avg(bandwidth)' by 'select *' it works 
fine.

I am pretty  sure this is not related to my table. You could create any 
table and try a query like that on it...  If you can t reproduce the bug, 
I can give the details of my table.

Shall I file a bug for this one ? 

(MySQL 4.1)

Irwin Boutboul
Advanced Internet Technology
150 Kettletown Road, B2-N06
Southbury, CT 06488
Phone: 203-486-5614



RE: Foreign key update and Error :: 1217 with v4.0.15 [SOLVED]

2003-09-12 Thread Daevid Vincent
Ah! So what I had to do was then...

show create table rep_table; 

alter table rep_table drop foreign key 0_359;

ALTER TABLE rep_table ADD FOREIGN KEY (`rep_company_code`) REFERENCES
`company_table` (`company_code`) ON UPDATE CASCADE;
 
It all works now. Man, talk about good timing 'eh? A few months ago I
wouldn't be able to do this huh ;-)

> -Original Message-
> From: Heikki Tuuri [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 11, 2003 11:33 PM
> To: Daevid Vincent; [EMAIL PROTECTED]
> Subject: Re: Foreign key update and Error :: 1217 with v4.0.15
> 
> 
> Daevid,
> 
> CONSTRAINT `0_359` FOREIGN KEY (`rep_company_code`) REFERENCES
> `company_table` (`company_code`)
> 
> you do not have ON UPDATE CASCADE in your constraint. MySQL 
> versions < 4.0.8
> ignored it.
> 
> Best regards,
> 
> Heikki Tuuri
> Innobase Oy
> http://www.innodb.com
> Foreign keys, transactions, and row level locking for MySQL
> InnoDB Hot Backup - a hot backup tool for MySQL
> 
> 
> - Original Message - 
> From: "Daevid Vincent" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "'Heikki Tuuri'" <[EMAIL PROTECTED]>
> Sent: Friday, September 12, 2003 4:01 AM
> Subject: RE: Foreign key update and Error :: 1217 with v4.0.15
> 
> 
> Heikki, I took your advice and installed the RPM updates to no avail:
> 
> [root]# rpm -qa | grep "mysql" -i
> MySQL-server-4.0.15-0
> mod_auth_mysql-1.11-1
> MySQL-devel-4.0.15-0
> MySQL-shared-4.0.15-0
> php-mysql-4.1.2-7.2.6
> MySQL-client-4.0.15-0
> MySQL-shared-compat-4.0.15-0
> 
> And it seems to be running...
> 
> mysql> \s
> --
> mysql  Ver 12.21 Distrib 4.0.15, for pc-linux (i686)
> 
> Connection id:  1
> Current database:   mysql
> Current user:   [EMAIL PROTECTED]
> SSL:Not in use
> Current pager:  stdout
> Using outfile:  ''
> Server version: 4.0.15-standard
> Protocol version:   10
> Connection: Localhost via UNIX socket
> Client characterset:latin1
> Server characterset:latin1
> UNIX socket:/tmp/mysql.sock
> Uptime: 1 min 53 sec
> 
> Also, I noticed that my phpinfo() shows "Client API version = 
> 3.23.56" -- is
> that normal?
> But oddly enough, my phpMyAdmin page shows "MySQL 
> 4.0.15-standard running on
> localhost as [EMAIL PROTECTED]"
> 
> Anyways, back to the real problem...
> 
> Updating via my web page produced the error 1217, so thinking that the
> PHP/mySQL version mentioned above might be a factor, I just 
> logged into the
> mysql CLI program (Ver 12.21 Distrib 4.0.15, for pc-linux (i686)) and
> exectued the query directly there. However I still get the 
> same error...
> 
> mysql> UPDATE company_table SET company_code = 'bunk1234' 
> WHERE company_id =
> '91' LIMIT 1;
> ERROR 1217: Cannot delete or update a parent row: a foreign 
> key constraint
> fails
> 
> I looked at some InnoDB status log that phpMyAdmin has, and 
> it shows some
> debug info that doesn't make sense to me. It complains that there is a
> record, but of course there is a record. That's the record I want to
> update?!
> 
> 
> LATEST FOREIGN KEY ERROR
> 
> 030911 17:41:07 Transaction:
> TRANSACTION 0 913922, ACTIVE 0 sec, process no 24665, OS 
> thread id 36874
> updating or deleting, thread declared inside InnoDB 499
> mysql tables in use 1, locked 1
> 4 lock struct(s), heap size 320, undo log entries 1
> MySQL thread id 1, query id 3118 localhost root Updating
> UPDATE company_table SET company_code = 'bunk1234',
> Foreign key constraint fails for table crimson/rep_table:
> ,
>   CONSTRAINT `0_359` FOREIGN KEY (`rep_company_code`) REFERENCES
> `company_table` (`company_code`)
> Trying to delete or update in parent table, in index 
> company_code tuple:
>  0: len 8; hex 62756e6b34333231; asc bunk4321;; 1: len 3; hex 
> 5b; asc
> ..[;;
> But in child table crimson/rep_table, in index 
> rep_company_code, there is a
> record:
> RECORD: info bits 0 0: len 8; hex 62756e6b34333231; asc 
> bunk4321;; 1: len 2;
> hex 0001; asc ..;;
> 
> 
> > -Original Message-
> > From: Heikki Tuuri [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 11, 2003 12:45 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Foreign key update and Error :: 1217
> >
> >
> > Daevid,
> >
> > there is really one update you need to do first: upgrade to
> > MySQL-4.0.14.
> >
> > http://www.innodb.com/ibman.html#InnoDB_foreign_keys
> > "
> > Starting from version 3.23.50, you can also associate the ON
> > DELETE CASCADE
> > or ON DELETE SET NULL clause with the foreign key constraint.
> > Corresponding
> > ON UPDATE options are available starting from 4.0.8.
> > "
> >
> > Best regards,
> >
> > Heikki Tuuri
> > Innobase Oy
> > http://www.innodb.com
> > Foreign keys, transactions, and row level locking for MySQL
> > InnoDB Hot Backup - a hot backup tool for MySQL
> >
> >
> > - Original Message - 
> > From: ""Daevid Vincent"" <[EMAIL PROTE

RE: SELECT only unique records

2003-09-12 Thread Paul DuBois
At 2:07 PM -0400 9/12/03, Dan Greene wrote:
SELECT state_ID FROM financial_master WHERE category_ID = '1'
becomes
SELECT unique state_ID FROM financial_master WHERE category_ID = '1'
-or-
SELECT distinct state_ID FROM financial_master WHERE category_ID = '1'
DISTINCT will work, but UNIQUE will not.

DISTINCTROW is a synonym for DISTINCT.


2 points !

 -Original Message-
 From: Comcast [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 12, 2003 2:03 PM
 To: [EMAIL PROTECTED]
 Subject: SELECT only unique records
 I am sure this is a slam-dunk, but I am new to this and
 stumped ... thanks.
 I have the following statement, but I need it to pull only
 unique listings - I get repeated items.
 SELECT state_ID FROM financial_master WHERE category_ID = '1'





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


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

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


Re: SELECT only unique records

2003-09-12 Thread Dwight Trumbower
At 01:02 PM 9/12/2003, Comcast wrote:

I am sure this is a slam-dunk, but I am new to this and stumped ... thanks.
I have the following statement, but I need it to pull only unique listings 
- I get repeated items.

SELECT state_ID FROM financial_master WHERE category_ID = '1'
SELECT DISTINCT state_ID FROM financial_master WHERE category_ID = '1'

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


RE: SELECT only unique records

2003-09-12 Thread Dathan Vance Pattishall



-->-Original Message-
-->From: Comcast [mailto:[EMAIL PROTECTED]
-->Sent: Friday, September 12, 2003 11:03 AM
-->To: [EMAIL PROTECTED]
-->Subject: SELECT only unique records
-->
-->I am sure this is a slam-dunk, but I am new to this and stumped ...
-->thanks.
-->I have the following statement, but I need it to pull only unique
-->listings - I get repeated items.
-->
-->SELECT state_ID FROM financial_master WHERE category_ID = '1'

If you need UNIQUE listings look up DISTINCT / GROUP BY SQL statements

Example

SELECT DISTINCT(state_ID) from financial_master WHERE category_ID='1';



-->
-->
-->

- Dathan Vance Pattishall
  - Sr. Programmer and mySQL DBA for FriendFinder Inc.
  - http://friendfinder.com/go/p40688


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



RE: SELECT only unique records

2003-09-12 Thread Roger Davis
Try

SELECT DISTINCT state_ID FROM financial_master WHERE category_ID = '1'

Roger

> -Original Message-
> From: Comcast [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 12, 2003 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: SELECT only unique records
> 
> 
> I am sure this is a slam-dunk, but I am new to this and stumped 
> ... thanks.
> I have the following statement, but I need it to pull only unique 
> listings - I get repeated items.
> 
> SELECT state_ID FROM financial_master WHERE category_ID = '1'
> 
> 
> 
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003
> 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003


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



RE: SELECT only unique records

2003-09-12 Thread Fortuno, Adam
SELECT DISTINCT(state_ID) FROM financial_master WHERE category_ID = '1';

OR

SELECT state_ID FROM financial_master WHERE category_ID = '1' GROUP BY
state_ID;

-Original Message-
From: Comcast [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 2:03 PM
To: [EMAIL PROTECTED]
Subject: SELECT only unique records


I am sure this is a slam-dunk, but I am new to this and stumped ... thanks.
I have the following statement, but I need it to pull only unique listings -
I get repeated items.

SELECT state_ID FROM financial_master WHERE category_ID = '1'





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



RE: SELECT only unique records

2003-09-12 Thread Dan Greene
SELECT state_ID FROM financial_master WHERE category_ID = '1'
becomes
SELECT unique state_ID FROM financial_master WHERE category_ID = '1'
-or-
SELECT distinct state_ID FROM financial_master WHERE category_ID = '1'

2 points !

> -Original Message-
> From: Comcast [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 12, 2003 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: SELECT only unique records
> 
> 
> I am sure this is a slam-dunk, but I am new to this and 
> stumped ... thanks.
> I have the following statement, but I need it to pull only 
> unique listings - I get repeated items.
> 
> SELECT state_ID FROM financial_master WHERE category_ID = '1'
> 
> 
> 
> 
> 

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



SELECT only unique records

2003-09-12 Thread Comcast
I am sure this is a slam-dunk, but I am new to this and stumped ... thanks.
I have the following statement, but I need it to pull only unique listings - I get 
repeated items.

SELECT state_ID FROM financial_master WHERE category_ID = '1'






Re: SQL query crashes MySQL

2003-09-12 Thread Sergei Golubchik
Hi!

On Sep 12, Irwin Boutboul wrote:
> Here it is: 
> 
> select  floor(avg(selection.bandwidth))*8000 as avgbandwidth  from (select 
> avg(bandwidth) as bandwidth from FEEDBACK_DOWNLOADS where servername= ? 
> and  ( bytesdownloaded > 50 or timeduration > 3000 ) group by id order 
> by starttime desc limit 20) as selection;
> 
> This complex (?) query makes mySQL crash everytime. 
> 
> If I replace the inner 'select avg(bandwidth)' by 'select *' it works 
> fine.
> 
> I am pretty  sure this is not related to my table. You could create any 
> table and try a query like that on it...  If you can t reproduce the bug, 
> I can give the details of my table.
> 
> Shall I file a bug for this one ? 

If MySQL crashes you definitely shall to file a bugreport (on
http://bugs.mysql.com) - so that you can be sure 4.1.1 will not crash :)

But try to provide a test case.
If you think that one "could create any table and try a query like that
on it" - then provide a set of SQL statements starting from CREATE
TABLE... that will crash MySQL.

Though we try our best to carefully examine all bugreports, bugs with
clear repeatable test cases get higher priority, of course.
 
Regards,
Sergei

-- 
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   <___/  www.mysql.com

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



Re: How to recovery the root password?

2003-09-12 Thread Mikhail Entaltsev
Edwin,

check this link. Hope it will help you.
http://www.mysql.com/doc/en/Resetting_permissions.html

Best regards,
Mikhail.

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 12, 2003 7:22 PM
Subject: How to recovery the root password?


> Dear List.
>
> This morning we made some changes in the user field of the mysql database,
> we changes the  root password  there, after that we can not get access to
> our mysql server with the new root password and with the old password
> neither.
> How can we do? Is there any procedures for recovery the password or to
> access to the server in this case?
>
> Thank you for your help.
>
> EDWIN LIMACHI N.
> DATACOM - Instalaciones
> TSE - INFONET BOLIVIA
> Phone. 591-2-2123978
> Movil: 591-715-29967
> Fax: 591-2-2123975
>
>
>


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



Replication question

2003-09-12 Thread Dathan Vance Pattishall
Here is the scenario:
4.0.15 as the master
3.23.57 is the slave 
 
I can't get them to replicate until I downgraded 4.0.15 to 3.23.57
This was the error produced
 
030911 23:45:47  Slave: connected to master '[EMAIL PROTECTED]:3306',
replication star
ted in log 'FIRST' at position 79
030911 23:45:47  Slave: did not get the expected error running query
from master - ex
pected: 'Invalid error code' (256), got 'no error' (0)
030911 23:45:47  Slave:  error running query '' 
030911 23:45:47  Error running query, slave aborted. Fix the problem,
and re-start th
e slave thread with "mysqladmin start-slave". We stopped at log 'FIRST'
position 79
030911 23:45:47  Slave thread exiting, replication stopped in log
'FIRST' at position 79
 
I was under the impression that replication between 3.23.x and 4.0.x is
possible. 
I did check and make sure that 
CHANGE MASTER TO MASTER_LOG_FILE='another_log_file', MASTER_LOG_POS=4;
was executed.
On 4.0.15 I made sure the REPLICATION user had REPLICATION permissions.
A Connection was made did change the log position from 4 to 79, then
replication could not continue even with SET
SQL_SLAVE_SKIP_COUNTER=x;slave start;
 
I did a Google search on the error message, and saw no solutions to this
problem.
 
Any suggestions?
 
- Dathan Vance Pattishall
  - Sr. Programmer and mySQL DBA for FriendFinder Inc.
  - http://friendfinder.com/go/p40688
 
 


Retrieve a binary file from a mysql database

2003-09-12 Thread karim bernardet
Hello,

Is it possible to retrieve a file stored in a blob field using a mysql 
client from a host which is not the server ?

Thanks for your help,

Karim.

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


How to recovery the root password?

2003-09-12 Thread elimachi
Dear List.

This morning we made some changes in the user field of the mysql database, 
we changes the  root password  there, after that we can not get access to 
our mysql server with the new root password and with the old password 
neither.
How can we do? Is there any procedures for recovery the password or to 
access to the server in this case?

Thank you for your help.

EDWIN LIMACHI N.
DATACOM - Instalaciones
TSE - INFONET BOLIVIA
Phone. 591-2-2123978
Movil: 591-715-29967
Fax: 591-2-2123975 




Re: Error while altering a table

2003-09-12 Thread Paul DuBois
At 1:04 PM -0400 9/12/03, [EMAIL PROTECTED] wrote:
...just a shot in the dark, but isn't 'description' a reserved word?  If so,
um, maybe a bug/inconsistency between table types.  If not, ramble on.
DESC and DESCRIBE are reserved, but DESCRIPTION is not...



--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

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


Re: Error while altering a table

2003-09-12 Thread Tbird67ForSale
...just a shot in the dark, but isn't 'description' a reserved word?  If so, 
um, maybe a bug/inconsistency between table types.  If not, ramble on.

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



converting from MS Access

2003-09-12 Thread sallycash
Hi I am trying to convert an existing access database to MYSQl and not having 
much luck I have tried dbtools but I end up with nothing transfering.  Am I 
doing something wrong or is there a better conversion tool

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



RE: Has anyone heard of SafeKit?

2003-09-12 Thread Dan Greene
I believe it, as there's an open source project c-jdbc (clustered jdbc) that can do it 
for x number of machines running any jdbc compatible db's (and they don't even need to 
be the same type...)

> -Original Message-
> From: Neil Aggarwal [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 12, 2003 12:53 PM
> To: [EMAIL PROTECTED]
> Cc: 'Jeff Patterson'
> Subject: Has anyone heard of SafeKit?
> 
> 
> Hello:
> 
> According to this company:
> http://www.evidian.com/safekit/index.htm
> 
> They have a way to create a cluster out of two distinct
> machines running MySQL.
> 
> Has anyone heard of this?
> Has anyone used it?
> Is it just pure marketing hype?
> 
> Thanks,
>   Neil
> 
> --
> Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
> FREE! Valuable info on how your business can reduce operating 
> costs by 
> 17% or more in 6 months or less! => 
> http://newsletter.JAMMConsulting.com
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 

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



Has anyone heard of SafeKit?

2003-09-12 Thread Neil Aggarwal
Hello:

According to this company:
http://www.evidian.com/safekit/index.htm

They have a way to create a cluster out of two distinct
machines running MySQL.

Has anyone heard of this?
Has anyone used it?
Is it just pure marketing hype?

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by 
17% or more in 6 months or less! => http://newsletter.JAMMConsulting.com


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



Re: mysql 4.0.15: configure fails

2003-09-12 Thread Michael Stassen
Lenz Grimmer wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,

On Fri, 12 Sep 2003, Michael Stassen wrote:


I have Mac OS X 10.2.6 with December 2002 Dev Tools and the Dec 2002 gcc
updater, which means I'm using gcc 3.3.


[...]

I assume you mean the August 2003 updater? This is the one that included
the gcc-3.3 update.
When I downloaded it on August 30, it was called 
"Dec2002gccUpdater.dmg," perhaps because it was an update to the Dec 
2002 DevTools.  That has disappeared and the August 2003 gcc Updater now 
sits in its place.  Looking at the About file, they look mostly the 
same, except the August 2003 version has added the -fast flag to gcc for 
G4 and G5 optimization.

I deleted -traditional-cpp from the FLAGS in configure, then reran it as
before.  Configure completed successfully, after which I was able to
build with make.  Running `make test` resulted in "all tests passed."
I've installed it, and it seems to be working.
Unless someone tells me otherwise, I'm going to conclude that this was a
configure bug and that removing -traditional-cpp was the correct fix.
In that case, configure ought to be fixed for everyone.


Thanks for the hint - we did not test the Mac OS X build with gcc-3.3 yet.
Your fix looks correct - we will update our configure script accordingly.
Not sure if "-traditional-cpp" is required for Mac OS X at all - maybe I
can simply remove it for darwin6 in general.
You're welcome.  My man gcc says:

   -traditional
   -traditional-cpp
   Formerly, these options caused GCC to attempt to emu-
   late a pre-standard C compiler.  They are now only
   supported with the -E switch.  The preprocessor con-
   tinues to support a pre-standard mode.  See the GNU
   CPP manual for details.
This isn't my area of expertise, but that doesn't look to me like 
something Mac OS X needs.  I should point out, however, that I have not 
tried this with any previous version of OS X / DevTools, only with 
10.2.6 and gcc 3.3.

Bye,
	LenZ
- -- 
Michael

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


RE: Running two MySQL Servers (4.0.x & 4.1.x) in Same Machine

2003-09-12 Thread Thierno Cissé
Hi,
> Can I run two MySQL Servers in same machine ??
yes you can, just place it into 2 distinct directories, like :
SERVER 1 : /usr/local/mysql-4.0.x
SERVER 2 : /usr/local/mysql-4.1.x  
 
> Could I install MySQL 4.1.x in same machime with RPM install ??
i don't try it, but with binary distribution yes you can. 
 
> Any conflicts ?
Any , if you use 2 different port number.
You configure it with my.cnf file by the variable named  (port =
3306)
Note that if you have 2 MySQL servers on the same machine, pay attention
to name some files like socket file, log file, err file with different
names.
Also the my.cnf file will not located in /etc because it becomes server
specific options/configuration file.
 
Hope this help
 
Regards
 
Thierno 6C
 
 

-Original Message-
From: Oscar (TOMCAT) [mailto:[EMAIL PROTECTED] 
Sent: vendredi 12 septembre 2003 14:53
To: [EMAIL PROTECTED]
Subject: Running two MySQL Servers (4.0.x & 4.1.x) in Same Machine



Hi, 
 
Can I run two MySQL Servers in same machine ?? I have Red Hat 8, and
MySQL 4.0.x installed and running (RPM install).
 
Could I install MySQL 4.1.x in same machime with RPM install ??
 
Any conflicts ? How to configure MySQL to listen in other port ?
 
Thanks,
===
José Oscar de Souza Eduardo
Coordenador de Projetos
tel: 3047-4541
fax: 3047-4550
[EMAIL PROTECTED]
=== 
 
 



Re: Error while altering a table

2003-09-12 Thread Heikki Tuuri
Irwin,

do you have in my.cnf

default-character-set=...

set to something else than latin1?

Can you make a small test case which demonstrates the problem?

Can you test with MySQL-4.0.15, and if the error happens also there, please
post the output of SHOW INNODB STATUS after that unsuccessful ALTER TABLE?

Best regards,

Heikki
Innobase Oy
http://www.innodb.com
InnoDB - transactions, row level locking, and foreign keys for MySQL
InnoDB Hot Backup - a hot backup tool for MySQL
Order MySQL support from http://www.mysql.com/support/index.html


...
Subject: Error while altering a table
From: Irwin Boutboul
Date: Fri, 12 Sep 2003 11:41:29 -0400



I always get that with MySQL 4.1:

alter table ACL_GROUPS add description varchar(255) default 'N/A';
ERROR 1025: Error on rename of './downloadgrid/#sql-1361_1a3' to
'./downloadgrid/ACL_GROUPS' (errno: 150)

If the table type is MyIsam, it works fine, I can alter the table. However
I can not revert to innodb after.
I don t really see why I can t add a column to a table... should not alter
the foreign key constraints...


show create table ACL_GROUPS;
++--


--+
| Table  | Create Table  |
++--


--+
| ACL_GROUPS | CREATE TABLE `ACL_GROUPS` (
  `groupid` char(30) character set latin1 NOT NULL default '',
  `creationtime` datetime default '-00-00 00:00:00',
  `active` smallint(6) default '1',
  `priority` smallint(6) default '1',
  PRIMARY KEY  (`groupid`)
) TYPE=InnoDB |
++--


--+
1 row in set (0.00 sec)

Irwin Boutboul
Advanced Internet Technology
150 Kettletown Road, B2-N06
Southbury, CT 06488
Phone: 203-486-5614


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



MySQL C problem with 4.1.0 Alpha

2003-09-12 Thread David Ritter
Hello all,

I am running into a problem with the C client and I would like to know if
the error I am seeing is expected or not.

The application I am running does not know anything about the SQL statements
it is running.  So I don't know whether
I am executing a statement with bound parameters or not.

I call mysql_prepare on a statement to see if there are any parameters to
bind.  Currently I observe that if there are no
placeholders in the SQL Statement then mysql_prepare returns a NULL
MYSQL_STMT.  That is fine, but when I go on to
make the subsequent mysql_real_query call, my application crashes.

I have found if I comment out the call to mysql_prepare the subsequent
execution works fine so it seems that something is
happening to the MYSQL connection structure and leaving it in a bad state.

Is this supposed to happen?  Is it a bug?  Does anyone have any advice for a
different way to check and see if a SQL statement
has parameters that can be bound (without parsing the string myself)?

Thanks!
Dave

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



SQL query crashes MySQL

2003-09-12 Thread Irwin Boutboul
Here it is: 

select  floor(avg(selection.bandwidth))*8000 as avgbandwidth  from (select 
avg(bandwidth) as bandwidth from FEEDBACK_DOWNLOADS where servername= ? 
and  ( bytesdownloaded > 50 or timeduration > 3000 ) group by id order 
by starttime desc limit 20) as selection;


This complex (?) query makes mySQL crash everytime. 

If I replace the inner 'select avg(bandwidth)' by 'select *' it works 
fine.

I am pretty  sure this is not related to my table. You could create any 
table and try a query like that on it...  If you can t reproduce the bug, 
I can give the details of my table.

Shall I file a bug for this one ? 

(MySQL 4.1)

Irwin Boutboul
Advanced Internet Technology
150 Kettletown Road, B2-N06
Southbury, CT 06488
Phone: 203-486-5614


Numeric Types and display attribute

2003-09-12 Thread Dwight Trumbower
I'm sure this has been discussed before, I just haven't found it.

When creating numeric data types you have the option of putting a display 
attribute. After reading the docs, I'm not really sure why you would want 
to do this.

From a DBA point of view, I don't care how the number is displayed. That 
is up to the ui designer. Is there any performance gain to using the 
display attribute?

Dwight
[EMAIL PROTECTED] 

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


Error while altering a table

2003-09-12 Thread Irwin Boutboul
I always get that with MySQL 4.1:

alter table ACL_GROUPS add description varchar(255) default 'N/A';
ERROR 1025: Error on rename of './downloadgrid/#sql-1361_1a3' to 
'./downloadgrid/ACL_GROUPS' (errno: 150)

If the table type is MyIsam, it works fine, I can alter the table. However 
I can not revert to innodb after.
I don t really see why I can t add a column to a table... should not alter 
the foreign key constraints...


show create table ACL_GROUPS;
+++
| Table  | Create Table  |
+++
| ACL_GROUPS | CREATE TABLE `ACL_GROUPS` (
  `groupid` char(30) character set latin1 NOT NULL default '',
  `creationtime` datetime default '-00-00 00:00:00',
  `active` smallint(6) default '1',
  `priority` smallint(6) default '1',
  PRIMARY KEY  (`groupid`)
) TYPE=InnoDB |
+++
1 row in set (0.00 sec)

Irwin Boutboul
Advanced Internet Technology
150 Kettletown Road, B2-N06
Southbury, CT 06488
Phone: 203-486-5614


RE: Compling on RedHat 9

2003-09-12 Thread Peter Koutsoulias
Cheers mate!  It worked.  When I googled for that error, I had removed the
c:1790 part of the message (the link you provided has the exact same error
message except it occurs on a different line) so the page didn't come up.

I tried export CXX="gcc" first because it was the easiest, and it didn't
work on my system.  However, after installing libstdc++devel and gcc-c++, it
worked like a charm.

Thanks again.

Peter.


-Original Message-
From: Lenz Grimmer [mailto:[EMAIL PROTECTED]
Sent: September 12, 2003 4:03 AM
To: Peter Koutsoulias
Cc: [EMAIL PROTECTED]
Subject: RE: Compling on RedHat 9


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Thu, 11 Sep 2003, Peter Koutsoulias wrote:

> OK, here are the last few lines from make.  I configured using the
> following:
>
> ./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql
>
> errors:
>
> libmysql.c: In function `mysql_real_connect':
> libmysql.c:1790: warning: passing arg 5 of `gethostbyname_r' from
> incompatible pointer type
> libmysql.c:1790: too few arguments to function `gethostbyname_r'
> libmysql.c:1790: warning: assignment makes pointer from integer without a
> cast
> make[2]: *** [libmysql.lo] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> I tried ./configure without the --with-mysqld-user flag.  still the same
> errors.


Quoting http://www.mysql.com/doc/en/Compilation_problems.html:

If you get a compilation error on Linux (e.g. SuSE Linux 8.1 or Red
Hat Linux 7.3) similar to the following one:

libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
libmysql.c:1329: too few arguments to function `gethostbyname_r'
libmysql.c:1329: warning: assignment makes pointer from integer without a
cast
make[2]: *** [libmysql.lo] Error 1

By default, the configure script attempts to determine the correct
number of arguments by using g++ the GNU C++ compiler. This test yields
wrong results, if g++ is not installed. There are two ways to work around
this problem:

 o Make sure that the GNU C++ g++ is installed. On some Linux
   distributions, the required package is called gpp, on others it is
   named gcc-c++.
 o Use gcc as your C++ compiler by setting the CXX environment variable
   to gcc:

 export CXX="gcc"

   Please note that you need to run configure again afterwards.

Bye,
LenZ
- --
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YX25SVDhKrJykfIRAlasAKCA0dWrWOkxdG2bOsz7dyM5PASJpwCfSTiv
EVrsxrZaEyCeaREEYyfpVoA=
=ZEEP
-END PGP SIGNATURE-

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



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



Re: Compling on RedHat 9

2003-09-12 Thread Mike . Kent

You might want to check that the developer tools were installed with Red
Hat 9; if not, you'll have trouble. The RPM is easiest to use, works like a
charm.



   

  Jeremy Zawodny   

  <[EMAIL PROTECTED]To:   Peter Koutsoulias <[EMAIL 
PROTECTED]>
  om>  cc:   [EMAIL PROTECTED] 

   Subject:  Re: Compling on RedHat 9  

  09/11/2003 06:24 

  PM   

  Please respond to

  mysql

   

   





On Thu, Sep 11, 2003 at 10:22:13AM -0400, Peter Koutsoulias wrote:
> I couldn't find an appropriate mailing list for compiling MySQL, so I
> thought I'd try here.
>
> anyone successfully compile MySQL 4 on RedHat 9?  I keep getting errors
on
> libmysql.c during the make step.  Google doesn't reveal a whole lot about
> compiling MySQL on RedHat which leaves me to believe most people use
RPMs.

A while ago, when I had access to a RH9 box I compiled it without much
trouble--at least none that I still remebmer.

You might post compilation the errors you're seeing...

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

MySQL 4.0.15-Yahoo-SMP: up 4 days, processed 165,947,775 queries (450/sec.
avg)

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







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



unscribe

2003-09-12 Thread Chukwuemeka Nwankwo

--- Roger Baklund <[EMAIL PROTECTED]> wrote:
> * Robert Kilroy
> > I've been trying to work out a query for this
> project
> > and I'm finally at the end of my rope. Basically,
> I
> > have a ticket sales app. There is a table that has
> > row_num and seat_num and seat_status. What I need
> to
> > do is retrieve X number of seats that are
> sequential.
> > For example, if someone requests 4 seats, and
> seats 1
> > and 2 are sold, he would get seats 3, 4, 5, 6. Or
> if
> > seats 5, 6 are sold he would get 7, 8, 9, 10.
> 
> Try a grouped self join:
> 
> SELECT t1.row_num,t1.seat_num,COUNT(t2.seat_num)+1
> AS "seats"
>   FROM theater t1
>   LEFT JOIN theater t2 ON
> t2.row_num = t1.row_num AND
> t1.seat_num < t2.seat_num AND
> t2.seat_num < t1.seat_num + 4 AND
> t2.seat_status="free"
>   WHERE
> t1.seat_status="free"
>   GROUP BY
> t1.row_num,t1.seat_num
>   HAVING
> seats = 4;
> 
> This example finds 4 seats, both occurences of the
> digit "4" in the above
> query needs to be dynamic, and changed to whatever
> number of seats you want
> to find. You can also find seats "in the back" or
> "in the front" by adding a
> check in the WHERE clause on t1.row_num larger or
> smaller than whatever is
> the middle seat row in the theatre.
> 
> Explanation of the query: First we read all free
> seats
> (t1.seat_status="free"), then we join to the same
> table, finding all free
> seats on the same row (t2.row_num = t1.row_num),
> with a higher seat number
> (t1.seat_num < t2.seat_num), but smaller than the
> current seat from t1 + 4
> (t2.seat_num < t1.seat_num + 4 ), because we want to
> find 4 seats.
> 
> The counter is one off, because we don't count the
> first seat from t1, that
> is why you need to add 1 to the COUNT().
> 
> Then we use GROUP BY to get one result row per seat,
> and finally HAVING to
> select only the free seats with 3 free seats next to
> it.
> 
> HTH,
> 
> --
> Roger
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Fw: oracle y mysql

2003-09-12 Thread Iñaki


I have a connection problem about MySql vs Oracle, I put an enter in TnsNames of BBDD 
Mysql, using the object Oracle HS,  and I get this error TNS
Packet checksum   transport, Can you help me?


Re: Comparing spaces with LIKE

2003-09-12 Thread Keith C. Ivey
On 12 Sep 2003 at 8:39, Nelson Azambuja Jr. wrote:

> I tried the following:
> 
> SELECT * FROM table WHERE name LIKE '% John %';
> 
> But it didn't work.

Please explain what didn't work.  What were you expecting to happen,
and what actually happened?

> To explain: I don't want the string 'Johnson' to be shown when
> running the query above.

It shouldn't be (unless you've found a bug, which is unlikely).  Post 
the exact query you're using and the results you get.

You might also want to look into FULLTEXT indexes:

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

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


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



Re: Selecting consecutive rows

2003-09-12 Thread Roger Baklund
* Robert Kilroy
> I've been trying to work out a query for this project
> and I'm finally at the end of my rope. Basically, I
> have a ticket sales app. There is a table that has
> row_num and seat_num and seat_status. What I need to
> do is retrieve X number of seats that are sequential.
> For example, if someone requests 4 seats, and seats 1
> and 2 are sold, he would get seats 3, 4, 5, 6. Or if
> seats 5, 6 are sold he would get 7, 8, 9, 10.

Try a grouped self join:

SELECT t1.row_num,t1.seat_num,COUNT(t2.seat_num)+1 AS "seats"
  FROM theater t1
  LEFT JOIN theater t2 ON
t2.row_num = t1.row_num AND
t1.seat_num < t2.seat_num AND
t2.seat_num < t1.seat_num + 4 AND
t2.seat_status="free"
  WHERE
t1.seat_status="free"
  GROUP BY
t1.row_num,t1.seat_num
  HAVING
seats = 4;

This example finds 4 seats, both occurences of the digit "4" in the above
query needs to be dynamic, and changed to whatever number of seats you want
to find. You can also find seats "in the back" or "in the front" by adding a
check in the WHERE clause on t1.row_num larger or smaller than whatever is
the middle seat row in the theatre.

Explanation of the query: First we read all free seats
(t1.seat_status="free"), then we join to the same table, finding all free
seats on the same row (t2.row_num = t1.row_num), with a higher seat number
(t1.seat_num < t2.seat_num), but smaller than the current seat from t1 + 4
(t2.seat_num < t1.seat_num + 4 ), because we want to find 4 seats.

The counter is one off, because we don't count the first seat from t1, that
is why you need to add 1 to the COUNT().

Then we use GROUP BY to get one result row per seat, and finally HAVING to
select only the free seats with 3 free seats next to it.

HTH,

--
Roger


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



Running two MySQL Servers (4.0.x & 4.1.x) in Same Machine

2003-09-12 Thread Oscar (TOMCAT)
Title: Mensagem




Hi, 

 
Can I run two MySQL 
Servers in same machine ?? I have Red Hat 8, and MySQL 4.0.x installed and 
running (RPM install).
 
Could I install 
MySQL 4.1.x in same machime with RPM install ??
 
Any conflicts ? How 
to configure MySQL to listen in other port ?
 
Thanks,


  
  
 
===José Oscar de Souza 
  EduardoCoordenador de Projetostel: 3047-4541fax: 
  3047-4550[EMAIL PROTECTED]=== 
  
 
 


Re: Loading a flat file

2003-09-12 Thread Carl Anthony-uzoeto
MyWeeklyLeads.com wrote:

I have a flat file that I am trying to load to a MySQL database
(fixed-length fields).
When I try:

LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable

It is generating a ton of errors, but the end result is that it's populating
only the first field for all records and all subsequent fields are NULL
check the field separator .. perhaps, u are using a 
non-default separator, and have not specified what the field 
separation character should be.

Any suggestions?
You could also try using mysqlimport ...
eg: mysqlimport -u  -p  -r 
--fields-terminated-by='' 

Look up the command syntax .. -r above would replace 
duplicates, and there is a -i to ignore duplicates.  If the 
ordering of the fields within the flatfile does not 
correspond with the fields in the DB, then you will also 
need to specify the columnts to be loaded ..

The only problem is that you may need to run mysqlimport as 
root ... have not yet found a way to run it as a non-root 
user .. yet.

hth

--carl

Tried these too:
LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable lines terminated by
'\n\'
LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable lines terminated by
'\r\n\'
No go

:-(

Thanks!

Rw



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


Poblem with cyrillic language

2003-09-12 Thread Sbandy
Hi all. I am italian and i have to insert into a database a string with
cyrillic character in a field varchar but mysql give me this error:
?
query was empty

anyone can help me?
Thanks in advance?


-
This email was sent using SquirrelMail.
   "Webmail for nuts!"
http://squirrelmail.org/



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



Re: How to set auto_increment start by value 1000?

2003-09-12 Thread Victoria Reznichenko
florence florence <[EMAIL PROTECTED]> wrote:
> 
>  Hope someone can guide me how to set the auto_increment for an integer and the 
> value start with 1000? 
>  I know how to set the value start from 1 but don't know how to start from 1000 
> or 2000 etc. Hope somebody can help me.
>

For MyISAM table you can use AUTO_INCREMENT option in CREATE TABLE or ALTER TABLE 
statement:
http://www.mysql.com/doc/en/CREATE_TABLE.html
http://www.mysql.com/doc/en/ALTER_TABLE.html

If you use InnoDB tables, you should insert a dummy row with value wanted_value-1 (for 
example, 999) and then delete this row.


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





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



Selecting consecutive rows

2003-09-12 Thread Robert Kilroy
Greetings,

I've been trying to work out a query for this project
and I'm finally at the end of my rope. Basically, I
have a ticket sales app. There is a table that has
row_num and seat_num and seat_status. What I need to
do is retrieve X number of seats that are sequential.
For example, if someone requests 4 seats, and seats 1
and 2 are sold, he would get seats 3, 4, 5, 6. Or if
seats 5, 6 are sold he would get 7, 8, 9, 10.

I'm not sure if a query is the right way to do this as
I'm sure it'll increase the server load quite a bit.

If anyone has an idea or could point me in the right
direction, I'd appreciate it.

Thanks!
Kilroy


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Simple Stored Procedure Emulation with PHP/mySQL

2003-09-12 Thread Mikhail Entaltsev
Hi,

IMHO it's nice idea... 

http://www.ashleyit.com/blogs/brentashley/archives/000339.html

Best regards,
Mikhail.

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



Loading a flat file

2003-09-12 Thread MyWeeklyLeads.com
I have a flat file that I am trying to load to a MySQL database
(fixed-length fields).

When I try:

LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable

It is generating a ton of errors, but the end result is that it's populating
only the first field for all records and all subsequent fields are NULL

Any suggestions?

Tried these too:
LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable lines terminated by
'\n\'
LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable lines terminated by
'\r\n\'

No go

:-(

Thanks!

Rw


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



RE: UNION

2003-09-12 Thread Dan Greene
It's actually mentioned in the user comments in the online manual (was there after the 
other reply looking for MINUS support), 

that in a union, in any column that is a literal, the top most query defines the 
datatype (non-literals obviously use the column type) for the column.  

I agree it's not expected behavior, but it is documented (classical 'works as 
designed, but you may not like the design' scenerio)



> -Original Message-
> From: Andy Jefferson [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 12, 2003 6:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: UNION
> 
> 
> >> If I do
> >> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Product" AS
> >> JPOXMETADATA,THIS.ID FROM PRODUCT THIS LEFT OUTER JOIN 
> BOOK SUBCLASS0 ON
> >> THIS.PRODUCT_ID = SUBCLASS0.BOOK_ID WHERE 
> SUBCLASS0.BOOK_ID IS NULL AND
> >> THIS.PRICE < .15E3
> >> i get
> >> ++--+---+
> >> | PRODUCT_ID | JPOXMETADATA | ID|
> >> ++--+---+
> >> |  3 | net.ajsoft.WebShop.Inventory.Product | P_005 |
> >> ++--+---+
> >> 
> >> If I also do
> >> SELECT 
> THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Products.Book" AS
> >> JPOXMETADATA,THIS.ID FROM PRODUCT THIS INNER JOIN BOOK SUBCLASS ON
> >> THIS.PRODUCT_ID= SUBCLASS.BOOK_ID WHERE THIS.PRICE < .15E3;
> >> i get
> >> +++---+
> >> | PRODUCT_ID | JPOXMETADATA   | ID|
> >> +++---+
> >> |  1 | net.ajsoft.WebShop.Inventory.Products.Book | P_003 |
> >> |  2 | net.ajsoft.WebShop.Inventory.Products.Book | P_004 |
> >> +++---+
> >> 
> >> Yet when I do
> >> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Product" AS
> >> JPOXMETADATA,THIS.ID FROM PRODUCT THIS LEFT OUTER JOIN 
> BOOK SUBCLASS0 ON
> >> THIS.PRODUCT_ID = SUBCLASS0.BOOK_ID WHERE 
> SUBCLASS0.BOOK_ID IS NULL AND
> >> THIS.PRICE < .15E3
> >> UNION
> >> SELECT 
> THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Products.Book" AS
> >> JPOXMETADATA,THIS.ID FROM PRODUCT THIS INNER JOIN BOOK SUBCLASS ON
> >> THIS.PRODUCT_ID= SUBCLASS.BOOK_ID WHERE THIS.PRICE < .15E3;
> >> i get
> >> ++--+---+
> >> | PRODUCT_ID | JPOXMETADATA | ID|
> >> ++--+---+
> >> |  3 | net.ajsoft.WebShop.Inventory.Product | P_005 |
> >> |  1 | net.ajsoft.WebShop.Inventory.Product | P_003 |
> >> |  2 | net.ajsoft.WebShop.Inventory.Product | P_004 |
> >> ++--+---+
> >> 
> >> Notice that the JPOXMETADATA column is incorrect for 
> PRODUCT_ID=1 and 2.
> > 
> > JPOXMETADATA in the first SELECT is shorter than in the 
> second SELECT. So,
> > MySQL just truncate 
> "net.ajsoft.WebShop.Inventory.Products.Book", because
> > type of JPOXMETADATA is defined from the first query in the 
> UNION. Swap
> > the queries for correct result.
> 
> Thanks, thats a workaround and I can move on but certainly is 
> NOT accepted
> behaviour in RDBMS. 
> 
> Is there a plan for fixing this ? i.e Is there a list of 
> known bugs with
> MySQL that I can see somewhere so I can report it or monitor it ?
> 
> 
> -- 
> Andy
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 

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



Loading a flat file

2003-09-12 Thread MyWeeklyLeads.com
I have a flat file that I am trying to load to a MySQL database
(fixed-length fields).

When I try:

LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable

It is generating a ton of errors, but the end result is that it's populating
only the first field for all records and all subsequent fields are NULL

Any suggestions?

Tried these too:
LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable lines terminated by
'\n\'
LOAD DATA '/mypath/flatfile.txt' INTO TABLE mytable lines terminated by
'\r\n\'

No go

:-(

Thanks!

Rw


Re: joining 4 tables

2003-09-12 Thread Brent Baisley
SELECT table4.cod, table1.cod, table2.cod, table3.cod
(BFROM table4
(BLEFT JOIN table1 ON table4.cod=table1.cod
(BLEFT JOIN table1 ON table4.cod=table2.cod
(BLEFT JOIN table1 ON table4.cod=table3.cod
(BWHERE table1.cod IS NULL
(BAND table2.cod IS NULL
(BAND table3.cod IS NULL
(B
(BI think that should do it, I didn't test it. What you are doing is a 
(Bleft join for all the tables on table4. The left join will retain all 
(Bthe records of table4, and then you filter out any records that have no 
(Bvalue in the fields for the other tables.
(B
(BOn Friday, September 12, 2003, at 04:37 AM, $B&-&)&*&/&2(B $B&#&!&3&2&'&2(B wrote:
(B
(B> Hello list
(B>
(B> I have a problem. I have 4 tables (in Mysql 3.23). All of them have a 
(B> filed
(B> named cod.
(B>
(B> I want a query to find which cod of table1, table2, table3 is/are not 
(B> in
(B> table4.
(B> cod values in table1, table2, table3 are diferent.
(B>
(B> Thank you
(B> Nikos
(B>
(B>
(B> -- 
(B> MySQL General Mailing List
(B> For list archives: http://lists.mysql.com/mysql
(B> To unsubscribe:
(B> http://lists.mysql.com/[EMAIL PROTECTED]
(B>
(B>
(B-- 
(BBrent Baisley
(BSystems Architect
(BLandover Associates, Inc.
(BSearch & Advisory Services for Advanced Technology Environments
(Bp: 212.759.6400/800.759.0577
(B
(B
(B-- 
(BMySQL General Mailing List
(BFor list archives: http://lists.mysql.com/mysql
(BTo unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Comparing spaces with LIKE

2003-09-12 Thread Nelson Azambuja Jr.
How do I compare blank spaces in a string using LIKE ?
I tried the following:

SELECT * FROM table WHERE name LIKE '% John %';

But it didn't work.
To explain: I don't want the string 'Johnson' to be shown when running the query 
above.

Thanks.

 Nelson Azambuja Jr.
 Analista de Sistemas 



Re: UNION

2003-09-12 Thread Andy Jefferson
>> If I do
>> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Product" AS
>> JPOXMETADATA,THIS.ID FROM PRODUCT THIS LEFT OUTER JOIN BOOK SUBCLASS0 ON
>> THIS.PRODUCT_ID = SUBCLASS0.BOOK_ID WHERE SUBCLASS0.BOOK_ID IS NULL AND
>> THIS.PRICE < .15E3
>> i get
>> ++--+---+
>> | PRODUCT_ID | JPOXMETADATA | ID|
>> ++--+---+
>> |  3 | net.ajsoft.WebShop.Inventory.Product | P_005 |
>> ++--+---+
>> 
>> If I also do
>> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Products.Book" AS
>> JPOXMETADATA,THIS.ID FROM PRODUCT THIS INNER JOIN BOOK SUBCLASS ON
>> THIS.PRODUCT_ID= SUBCLASS.BOOK_ID WHERE THIS.PRICE < .15E3;
>> i get
>> +++---+
>> | PRODUCT_ID | JPOXMETADATA   | ID|
>> +++---+
>> |  1 | net.ajsoft.WebShop.Inventory.Products.Book | P_003 |
>> |  2 | net.ajsoft.WebShop.Inventory.Products.Book | P_004 |
>> +++---+
>> 
>> Yet when I do
>> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Product" AS
>> JPOXMETADATA,THIS.ID FROM PRODUCT THIS LEFT OUTER JOIN BOOK SUBCLASS0 ON
>> THIS.PRODUCT_ID = SUBCLASS0.BOOK_ID WHERE SUBCLASS0.BOOK_ID IS NULL AND
>> THIS.PRICE < .15E3
>> UNION
>> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Products.Book" AS
>> JPOXMETADATA,THIS.ID FROM PRODUCT THIS INNER JOIN BOOK SUBCLASS ON
>> THIS.PRODUCT_ID= SUBCLASS.BOOK_ID WHERE THIS.PRICE < .15E3;
>> i get
>> ++--+---+
>> | PRODUCT_ID | JPOXMETADATA | ID|
>> ++--+---+
>> |  3 | net.ajsoft.WebShop.Inventory.Product | P_005 |
>> |  1 | net.ajsoft.WebShop.Inventory.Product | P_003 |
>> |  2 | net.ajsoft.WebShop.Inventory.Product | P_004 |
>> ++--+---+
>> 
>> Notice that the JPOXMETADATA column is incorrect for PRODUCT_ID=1 and 2.
> 
> JPOXMETADATA in the first SELECT is shorter than in the second SELECT. So,
> MySQL just truncate "net.ajsoft.WebShop.Inventory.Products.Book", because
> type of JPOXMETADATA is defined from the first query in the UNION. Swap
> the queries for correct result.

Thanks, thats a workaround and I can move on but certainly is NOT accepted
behaviour in RDBMS. 

Is there a plan for fixing this ? i.e Is there a list of known bugs with
MySQL that I can see somewhere so I can report it or monitor it ?


-- 
Andy


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



press inquiry - french users : i need your testimonial

2003-09-12 Thread frédéric bordage
Hello,

I'm a french journalist writting an article for Décision Micro & Réseaux
(#2 french IT mag) about open source RDBMS.

The goal of this article is to understand :
- if french SMB (PME) are using MySQL, PostgreSQL, etc.
- what they do with it
- etc.

If you are a french company which have less than 500 employee and don't
work as an SSII or a software editor, your feed back will be appreciate.

Please send me an e-mail that describe your MySQL use. I'm searching non
web use : C/S, industrial applications, etc.

Thanks for your help,
Fred Bordage


_
MSN Messenger, nouvelle version ! Personnalisez vos messages, jouez en
ligne et communiquez en temps réel par vidéo! http://ifrance.com/_reloc/m



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



non-root users cannot run mysqlimport

2003-09-12 Thread Carl Anthony-uzoeto
Hi,

I need to periodically load a dumpfile from another DB into
mysql.  Now, since this is a cronjob, and for which I would
need to avoid interactivity, I DO NEED to run this as a
non-root user.
I have setup such a user, and have granted the user all on
the destination database.  The user also has the important 
'file' privilege.  But it seems only the user root can load 
these files.

Any ideas on whats going on here and what I may be
missing/overlooking ...
All posts appreciated ...

--carl



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


Re: mysql 4.0.15: configure fails

2003-09-12 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Fri, 12 Sep 2003, Michael Stassen wrote:

> I have Mac OS X 10.2.6 with December 2002 Dev Tools and the Dec 2002 gcc
> updater, which means I'm using gcc 3.3.

[...]

I assume you mean the August 2003 updater? This is the one that included
the gcc-3.3 update.

> I deleted -traditional-cpp from the FLAGS in configure, then reran it as
> before.  Configure completed successfully, after which I was able to
> build with make.  Running `make test` resulted in "all tests passed."
> I've installed it, and it seems to be working.
>
> Unless someone tells me otherwise, I'm going to conclude that this was a
> configure bug and that removing -traditional-cpp was the correct fix.
> In that case, configure ought to be fixed for everyone.

Thanks for the hint - we did not test the Mac OS X build with gcc-3.3 yet.
You fix looks correct - we will update our configure script accordingly.
Not sure if "-traditional-cpp" is required for Mac OS X at all - maybe I
can simply remove it for darwin6 in general.

Bye,
LenZ
- -- 
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YY2dSVDhKrJykfIRAkkYAJ9vc955+7IV2aO706l5wuAd2o5UKwCeLlTF
6MqS2GbtX/5NFtRm+PXgFSI=
=D+Ga
-END PGP SIGNATURE-

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



joining 4 tables

2003-09-12 Thread ΝΙΚΟΣ ΓΑΤΣΗΣ
Hello list

I have a problem. I have 4 tables (in Mysql 3.23). All of them have a filed
named cod.

I want a query to find which cod of table1, table2, table3 is/are not in
table4.
cod values in table1, table2, table3 are diferent.

Thank you
Nikos


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



How to set auto_increment start by value 1000?

2003-09-12 Thread florence florence
Hi,
 
  Hope someone can guide me how to set the auto_increment for an integer and the 
value start with 1000? 
  I know how to set the value start from 1 but don't know how to start from 1000 
or 2000 etc. Hope somebody can help me.

Thanks.
 
regards,
florence


Yahoo! Games
- Who Wants to Be A Millionaire? Play now!

RE: How to generate sql scripts in Mysql?

2003-09-12 Thread Andy Eastham
Florence,

Section 3.6 of the manual explains...

3.6 Using mysql in Batch Mode

In the previous sections, you used mysql interactively to enter queries and
view the results. You can also run mysql in batch mode. To do this, put the
commands you want to run in a file, then tell mysql to read its input from
the file:

shell> mysql < batch-file

If you are running mysql under windows and have some special characters in
the file that causes problems, you can do:

dos> mysql -e "source batch-file"

If you need to specify connection parameters on the command-line, the
command might look like this:

shell> mysql -h host -u user -p < batch-file
Enter password: 

When you use mysql this way, you are creating a script file, then executing
the script.

If you want the script to continue even if you have errors, you should use
the
--force command-line option.

Why use a script? Here are a few reasons:

If you run a query repeatedly (say, every day or every week), making it a
script allows you to avoid retyping it each time you execute it.
You can generate new queries from existing ones that are similar by copying
and editing script files.
Batch mode can also be useful while you're developing a query, particularly
for multiple-line commands or multiple-statement sequences of commands. If
you make a mistake, you don't have to retype everything. Just edit your
script to correct the error, then tell mysql to execute it again.
If you have a query that produces a lot of output, you can run the output
through a pager rather than watching it scroll off the top of your screen:
shell> mysql < batch-file | more

You can catch the output in a file for further processing:
shell> mysql < batch-file > mysql.out

You can distribute your script to other people so they can run the commands,
too.
Some situations do not allow for interactive use, for example, when you run
a query from a cron job. In this case, you must use batch mode.
The default output format is different (more concise) when you run mysql in
batch mode than when you use it interactively. For example, the output of
SELECT DISTINCT species FROM pet looks like this when run interactively:

+-+
| species |
+-+
| bird|
| cat |
| dog |
| hamster |
| snake   |
+-+

But like this when run in batch mode:

species
bird
cat
dog
hamster
snake

If you want to get the interactive output format in batch mode, use
mysql -t. To echo to the output the commands that are executed, use
mysql -vvv.

You can also use scripts in the mysql command-line prompt by using the
source command:

mysql> source filename;

Andy

> -Original Message-
> From: florence florence [mailto:[EMAIL PROTECTED]
> Sent: 12 September 2003 09:17
> To: [EMAIL PROTECTED]
> Subject: How to generate sql scripts in Mysql?
>
>
> Hi,
>
>   Hope someone can guide me how to generate sql scripts in
> Mysql?Thanks.
>
> regards,
> florence
>
> Yahoo! Games
> - Who Wants to Be A Millionaire? Play now!



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



Re: FreeBSD 4.8 runaway MySQL 4.0.14

2003-09-12 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Fri, 12 Sep 2003, Jeremy Zawodny wrote:

> I think the best way to do this would be to provide the standard FreeBSD
> build just like you do now and to also provide a LinuxThreads-enabled
> build for people who really want it.  I don't think you'd want to force
> the LT requirement on everyone.
>
> But hopefully you were already thinking that too...

Yes, that was my intention - we will continue to provide the default
builds and add new packages with the suffix "-linuxthreads".

Bye,
LenZ
- -- 
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YYR/SVDhKrJykfIRAsCaAJ9GQF6ln/ourJ9ApUejujcr4uZIQQCdEGyC
Web63sWJ6dzexG+kEeCHlYM=
=7rLZ
-END PGP SIGNATURE-

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



Re: FreeBSD 4.8 runaway MySQL 4.0.14

2003-09-12 Thread Jeremy Zawodny
On Fri, Sep 12, 2003 at 09:58:03AM +0200, Lenz Grimmer wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi,
> 
> (please Cc: me directly, if you want to catch my attention - I don't
> always follow this list very closely)

Oops.  Good point.

> > It's always felt like FreeBSD became a second-class platform at MySQL AB
> > when Tim left a few years back.  At the time, he was the only MySQL
> > developer using FreeBSD.  But I don't know what the current state is
> > there.
> 
> We do have a few guys that use FreeBSD as their main development platform.
> 
> Sorry if you got the impression that FreeBSD is considered "second-class"
> - - this is definately not the case.

Good to hear!

> I'm more of a Linux Guy, but that does not really matter. :)

I am too. :-)

> > Or maybe we can strong arm the MySQL build folks (Hi, Lenz) into doing
> > it?
> 
> I'd be more than happy, if I knew how exactly this is done. I'll work with
> Serg to get this configured for the next release.

Excellent.

I think the best way to do this would be to provide the standard FreeBSD
build just like you do now and to also provide a LinuxThreads-enabled build
for people who really want it.  I don't think you'd want to force the LT
requirement on everyone.

But hopefully you were already thinking that too...

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

MySQL 4.0.15-Yahoo-SMP: up 4 days, processed 179,586,914 queries (447/sec. avg)

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



question

2003-09-12 Thread Nick



Dear ALL
 
I am Nick, I come from Taiwan company - EC-SERVER~~I have two WEB 
SERVER to make load balance. Both of the WEB SERVER was installed mysql~~
 
I used the mount NFS instruction the storage spaces in linux.At the 
same time,WEB's Data and mysql's data both in NFS paration~modify 
mysql.server ==> datadir=/usr/local/mysql/var to 
datadir=/apache/mysql/varTwo Mysql access the same database at the same 
time~~but when I proceed the OLTP ~~ database display error message~~Can 
you tell me??? Why two Mysql can't access the same database ???Do you have 
any solution about above situation?Thanks very much ~~
 
Nick



 
System Engineer Nick 
EC-Server.com.,Inc.  

Tel: 886+2+27006611#607
Fax: 886+2+27006612mail:[EMAIL PROTECTED] 

9F-1 , No.380 , Sec.1 , Fu-Shin  
S. Rd.,1.6, Taipei  ,Taiwan. 
 


Re: weird transaction issues

2003-09-12 Thread Jeremy Zawodny
On Fri, Sep 12, 2003 at 03:16:41PM +1000, Daniel Rossi wrote:
>
> hi there, i am trying to use transactions on some innodb tables although a few 
> things i am experiencing, on one query the value appears, i refresh the page and the 
> value dissapears again, i am using persistant connections in php, the value is 
> actually there in the console, what could be the prob ?

Are you running with AUTOCOMMIT=0 and forgetting to COMMIT?

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

MySQL 4.0.15-Yahoo-SMP: up 4 days, processed 179,565,412 queries (447/sec. avg)

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



Re: Access denied error

2003-09-12 Thread Victoria Reznichenko
Jeff Roberts <[EMAIL PROTECTED]> wrote:
> I have a fresh install of mysql 4.0.11 on a linux box. When I try to
> open mysql as a [EMAIL PROTECTED], I get the following error:
> 
>>mysql -u [EMAIL PROTECTED] -p db_name
>Enter password:
>ERROR 1045: Access denied for user: '[EMAIL PROTECTED]@localhost' (Using
>password: YES)

In this case you try to connect as user with user name '[EMAIL PROTECTED]'. If you 
want to specify hostname (localhost) you should use -h option:

shell> mysql -h localhost -u user -p db_name 

> 
> However if just do this, everything is fine:
> 
>>mysql -u user -p db_name
>Enter password:
>Reading table information for completion of table and column names
>You can turn off this feature to get a quicker startup with -A
> 
>Welcome to the MySQL monitor.  Commands end with ; or \g.
>Your MySQL connection id is 3 to server version: 4.0.11a-gamma
> 
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> 
>mysql> exit
> 




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





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



How to generate sql scripts in Mysql?

2003-09-12 Thread florence florence
Hi,
 
  Hope someone can guide me how to generate sql scripts in Mysql?Thanks.
 
regards,
florence

Yahoo! Games
- Who Wants to Be A Millionaire? Play now!

RE: Compling on RedHat 9

2003-09-12 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Thu, 11 Sep 2003, Peter Koutsoulias wrote:

> OK, here are the last few lines from make.  I configured using the
> following:
>
> ./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql
>
> errors:
>
> libmysql.c: In function `mysql_real_connect':
> libmysql.c:1790: warning: passing arg 5 of `gethostbyname_r' from
> incompatible pointer type
> libmysql.c:1790: too few arguments to function `gethostbyname_r'
> libmysql.c:1790: warning: assignment makes pointer from integer without a
> cast
> make[2]: *** [libmysql.lo] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> I tried ./configure without the --with-mysqld-user flag.  still the same
> errors.


Quoting http://www.mysql.com/doc/en/Compilation_problems.html:

If you get a compilation error on Linux (e.g. SuSE Linux 8.1 or Red
Hat Linux 7.3) similar to the following one:

libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from incompatible pointer 
type
libmysql.c:1329: too few arguments to function `gethostbyname_r'
libmysql.c:1329: warning: assignment makes pointer from integer without a cast
make[2]: *** [libmysql.lo] Error 1

By default, the configure script attempts to determine the correct
number of arguments by using g++ the GNU C++ compiler. This test yields
wrong results, if g++ is not installed. There are two ways to work around
this problem:

 o Make sure that the GNU C++ g++ is installed. On some Linux
   distributions, the required package is called gpp, on others it is
   named gcc-c++.
 o Use gcc as your C++ compiler by setting the CXX environment variable
   to gcc:

 export CXX="gcc"

   Please note that you need to run configure again afterwards.

Bye,
LenZ
- -- 
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YX25SVDhKrJykfIRAlasAKCA0dWrWOkxdG2bOsz7dyM5PASJpwCfSTiv
EVrsxrZaEyCeaREEYyfpVoA=
=ZEEP
-END PGP SIGNATURE-

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



Re: check table type

2003-09-12 Thread Egor Egorov
Daniel Rossi <[EMAIL PROTECTED]> wrote:
> hi i was wondering if there is a way to check for a table type ?

SHOW CREATE TABLE, SHOW TABLE STATUS.

> 
> ie i have an authentication class, in some situations it uses innodb and sometimes 
> its myisam and currently its not autocomitting
> 
> 



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




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



Re: CocoaMySQL

2003-09-12 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Fri, 12 Sep 2003 [EMAIL PROTECTED] wrote:

> is there such a gui tool for linux ? i like sqlyog alot so anything similar
> would be excellent.

Have you looked at MySQLCC?

http://www.mysql.com/products/mysqlcc/index.html

Bye,
LenZ
- -- 
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YX0TSVDhKrJykfIRAqPuAJsG8pmj6icCAX4moHOJo5vOITlHWgCcCdz5
6M/p1R6pksNtxmjrTSUPQok=
=Qct1
-END PGP SIGNATURE-

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



Re: FreeBSD 4.8 runaway MySQL 4.0.14

2003-09-12 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

(please Cc: me directly, if you want to catch my attention - I don't
always follow this list very closely)

On Thu, 11 Sep 2003, Jeremy Zawodny wrote:

> On Thu, Aug 28, 2003 at 04:20:50PM -0400, Nick Gaugler wrote:
>
> > Thanks for the response.  I really wish MySQL AB would compile FreeBSD
> > binaries with LinuxThreads.  It's really a pain when you find a bug,
> > the first thing they ask is "have you compiled this yourself" when in
> > this case you have no choice but to compile it yourself.
>
> Good point.  That does suck, doesn't it?
>
> It's always felt like FreeBSD became a second-class platform at MySQL AB
> when Tim left a few years back.  At the time, he was the only MySQL
> developer using FreeBSD.  But I don't know what the current state is
> there.

We do have a few guys that use FreeBSD as their main development platform.

Sorry if you got the impression that FreeBSD is considered "second-class"
- - this is definately not the case.

I'm more of a Linux Guy, but that does not really matter. :)

> > Maybe Jeremy could compile "unofficial but recommended" binaries that
> > MySQL AB would support more like official binaries? :)  If he's got
> > nothing better to do of course, he already puts in so much time to the
> > MySQL community as is.
>
> I'll need to first confirm that our "Yahoo FreeBSD" is close enough to
> "normal" FreeBSD that the binaries would work.  I suspect it wouldn't be
> a problem...
>
> But, yeah, it's not a bad idea come think of it.
>
> Or maybe we can strong arm the MySQL build folks (Hi, Lenz) into doing
> it?

I'd be more than happy, if I knew how exactly this is done. I'll work with
Serg to get this configured for the next release.

> I'm not sure if they're thinking that FreeBSD users already use ports,
> so it's no big deal.

Well, true. I must admit that this thought crossed my mind :)

> But if so, that's not really compatible with their standard "are you
> using our binaries" response...

Agreed. We'll try to get this fixed for the next release. I assume it's
not rocket science - I am simply not very familiar with the whole FreeBSD
concept...

Bye,
LenZ
- -- 
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YXyMSVDhKrJykfIRAqZXAJwJUaUghUSSX017nzmNmHb0MeAF6gCfRbvh
a+yCq7K7Yd6S0FKnTRJ0bVk=
=Qot0
-END PGP SIGNATURE-

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



Re: The Compilation Error

2003-09-12 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 11 Sep 2003, Dyego Souza do Carmo wrote:

> I try to compile MySQL/InnoDB 4.1.1 ( loaded from BK )
>
> My Configure Line is:
>
> export CFLAGS="-O6 -mpentiumpro"
> export CXX=gcc
> export CXXFLAGS="-O6 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti"
> ./configure --with-innodb  --without-isam --without-docs --without-bench 
> --with-charset=latin1 --without-bdb --without-debug --enable-assembler 
> --enable-local-infile --with-mysqld-user=mysql --with-gnu-ld 
> --prefix=/usr/local/mysql4
>
>
> The error is:
>
> make[2]: Entering directory `/temp/mysql-development/mysql-4.1-win/sql'
> bison -y  -d sql_yacc.yy && mv y.tab.c sql_yacc.cc
> conflicts:  365 shift/reduce
> sql_yacc.yy:5357: fatal error: maximum table size (32767) exceeded
> make[2]: *** [sql_yacc.cc] Error 1
> make[2]: Leaving directory `/temp/mysql-development/mysql-4.1-win/sql'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/temp/mysql-development/mysql-4.1-win'
> make: *** [all] Error 2
> scribthree:/temp/mysql-development/mysql-4.1-win#

>From http://www.mysql.com/doc/en/Installing_source_tree.html:

"If you are trying to configure MySQL 4.1, you will also need GNU bison
1.75. Older versions of bison may report this error: sql_yacc.yy:#:
fatal error: maximum table size (32767) exceeded. Note: the maximum table
size is not actually exceeded, the error is caused by bugs in these
earlier bison versions. Versions of MySQL before version 4.1 may also
compile with other yacc implementations (e.g. BSD yacc 91.7.30). For later
versions, GNU bison is a requirement."

Bye,
LenZ
- -- 
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YXrnSVDhKrJykfIRAkyQAJ9Hf7sG6es6IrmdbIn/FaOlmoC9WACeJ1FC
erSiBf+bgDl952KP/3OGUnQ=
=QNgp
-END PGP SIGNATURE-

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



Re: More problems during make of mysql

2003-09-12 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 10 Sep 2003, Andy Kannberg wrote:

> here I am, again...
>
> I run into the next problem during the make. It runs for quite some time, when 
> suddenly these messages appear:
>
> ld: fatal: library -lrt: not found
> ld: fatal: library -ldl: not found
> ld: fatal: library -lpthread: not found
> ld: fatal: library -lthread: not found
> ld: fatal: library -lz: not found
> ld: fatal: library -lposix4: not found
> ld: fatal: library -lpthread: not found
> ld: fatal: library -lthread: not found
> ld: fatal: File processing errors. No output written to mysqld
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `mysqld'
> Current working directory /usr/local/src/mysql-4.0.14/sql
> *** Error code 1
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory /usr/local/src/mysql-4.0.14/sql
> *** Error code 1
> make: Fatal error: Command failed for target `all'
> Current working directory /usr/local/src/mysql-4.0.14/sql
> *** Error code 1
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory /usr/local/src/mysql-4.0.14
> *** Error code 1
> make: Fatal error: Command failed for target `all'
>
> Again, checked the docs, but nothing was in it pointing to these kind of
> errors.  Any hints our tips would be really appreciated.

The above looks like a whole slew of development libraries (e.g. pthreads,
zlib) are missing. They are either not installed at all or are placed in a
location that the compiler does not look into by default. Make sure they
are installed and that the compiler/linker finds them.

Bye,
LenZ
- -- 
 Lenz Grimmer <[EMAIL PROTECTED]>
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YXpkSVDhKrJykfIRAkYqAJ0WH3loI9cFT9n8WPLu+BoFvDmi5wCaA+bd
DRiG198rFBOKWW0qYIgTcVg=
=1eeV
-END PGP SIGNATURE-

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



Re: UNION

2003-09-12 Thread Egor Egorov
Andy Jefferson <[EMAIL PROTECTED]> wrote:
> 
> I'm trying to do a simple UNION in MySQL (4.0.11a on Linux). I am trying the
> following ...
> 
> If I do
> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Product" AS
> JPOXMETADATA,THIS.ID FROM PRODUCT THIS LEFT OUTER JOIN BOOK SUBCLASS0 ON
> THIS.PRODUCT_ID = SUBCLASS0.BOOK_ID WHERE SUBCLASS0.BOOK_ID IS NULL AND
> THIS.PRICE < .15E3
> i get
> ++--+---+
> | PRODUCT_ID | JPOXMETADATA | ID|
> ++--+---+
> |  3 | net.ajsoft.WebShop.Inventory.Product | P_005 |
> ++--+---+
> 
> If I also do
> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Products.Book" AS
> JPOXMETADATA,THIS.ID FROM PRODUCT THIS INNER JOIN BOOK SUBCLASS ON
> THIS.PRODUCT_ID= SUBCLASS.BOOK_ID WHERE THIS.PRICE < .15E3;
> i get
> +++---+
> | PRODUCT_ID | JPOXMETADATA   | ID|
> +++---+
> |  1 | net.ajsoft.WebShop.Inventory.Products.Book | P_003 |
> |  2 | net.ajsoft.WebShop.Inventory.Products.Book | P_004 |
> +++---+
> 
> Yet when I do
> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Product" AS
> JPOXMETADATA,THIS.ID FROM PRODUCT THIS LEFT OUTER JOIN BOOK SUBCLASS0 ON
> THIS.PRODUCT_ID = SUBCLASS0.BOOK_ID WHERE SUBCLASS0.BOOK_ID IS NULL AND
> THIS.PRICE < .15E3
> UNION
> SELECT THIS.PRODUCT_ID,"net.ajsoft.WebShop.Inventory.Products.Book" AS
> JPOXMETADATA,THIS.ID FROM PRODUCT THIS INNER JOIN BOOK SUBCLASS ON
> THIS.PRODUCT_ID= SUBCLASS.BOOK_ID WHERE THIS.PRICE < .15E3;
> i get
> ++--+---+
> | PRODUCT_ID | JPOXMETADATA | ID|
> ++--+---+
> |  3 | net.ajsoft.WebShop.Inventory.Product | P_005 |
> |  1 | net.ajsoft.WebShop.Inventory.Product | P_003 |
> |  2 | net.ajsoft.WebShop.Inventory.Product | P_004 |
> ++--+---+
> 
> Notice that the JPOXMETADATA column is incorrect for PRODUCT_ID=1 and 2.

JPOXMETADATA in the first SELECT is shorter than in the second SELECT. So, MySQL just 
truncate "net.ajsoft.WebShop.Inventory.Products.Book", because type of JPOXMETADATA is 
defined from the first query in the UNION. Swap the queries for correct result.



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




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



Re: MySQL 4.0.x LOAD DATA FROM MASTER wiping out tables...

2003-09-12 Thread Victoria Reznichenko
Gabriel Ricard <[EMAIL PROTECTED]> wrote:
> I'm running MySQL 4.0.14 on Mac OS X 10.2.6 on a development server. We 
> have around 60 tables on the development server and the production 
> servers. 18 tables that exist on the production server are replicated 
> to our development server. We use the replicate-wild-do-table config 
> option to tell it which tables to replicate from the master (production 
> server) to the slave (dev server).
> 
> Somehow a REPAIR statement on one of the replicated tables failed on 
> the slave recently. It left the .TMD temporary table file, and the .MYD 
> data file disappeared altogether. I did STOP SLAVE; RESET SLAVE; LOAD 
> DATA FROM MASTER; and it reloaded the 18 replicated tables from the 
> production server. However, it also wiped out the other 44 tables that 
> existed on the dev server.
> 
> I looked at the manual page for the LOAD DATA FROM MASTER command 
> (http://www.mysql.com/doc/en/LOAD_DATA_FROM_MASTER.html), and in the 
> first paragraph it states: "Will honor table and database exclusion 
> rules specified with replicate-* options." So, why would it not honor 
> my replicate-wild-do-table configuration and ONLY load those tables? 
> Why would it wipe out everything in the database before doing reloading 
> the replicated tables?
> 

Thanks for the report. It was entered to the bug database as bug #1248:
http://bugs.mysql.com/bug.php?id=1248


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





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