Death of MySQL popularity?

2010-11-04 Thread Christoph Boget
http://www.mysql.com/products/

So the free version is going to include only MyISAM?  And you won't be
able to connect using MySQL Workbench (and presumably apps like MySQL
Query Browser)?  Otherwise you have to shell out $2k?  Wow.  I think
it might be time to start seriously looking at Postgres...

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Even or Odds numbers

2010-08-31 Thread Christoph Boget
 is there a function, using MySQL 5.0v, that can detect if a numerical value
 is either an Even or Odd number

MOD()

http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_mod

SELECT MOD( X, 2 )

where X is your number (or column name).  If 0, it's even if 1 it's odd.

thnx,
Christoph

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: FW: Even or Odds numbers

2010-08-31 Thread Christoph Boget
 where X is your number (or column name).  If 0, it's even if
 1 it's odd.
 I think you mean, if it is non-zero, then it is odd.

If you're MODding using 2 as the second argument, it's always going to
be 0 or 1.  2 either divides in to the number evenly, having a
remainder of 0, or it'll have a remainder of 1.  The former indicates
the number is even, the latter odd.

thnx,
Christoph

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: grabbing even addresses?

2009-02-02 Thread Christoph Boget
 I was wondering if something was possible, I have an excel file right now of
 US mailing addresses, and what I need to do is select all the odd numbered
 addresses on one road, is there an easy way I can do that from MySQL? the
 addresses could contain 3, 4 or 5 numbers per addresses such as:
 123 Main
 1232 Main
 1233 Main
 1234 Main
 12345 Main
 and what I want out of those would be:
 1232 Main
 1234 Main
 Any ideas? Thanks for looking! :)

Well, if this is something you will be doing a lot, the most efficient
way to store the addresses would be to have separate columns for the
house number and the street name.  Doing that will allow you to run a
query as simple as:

SELECT * FROM Addresses WHERE (house_number % 2) == 0;

If you can't (or don't want to) have separate columns, you can use a
regular expression to pull out the house number then operating on it
as above.You can read more about mysql and regular expressions
here:

http://dev.mysql.com/doc/refman/5.0/en/regexp.html

thnx,
Christoph

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



UPDATE jujitsu?

2009-01-08 Thread Christoph Boget
Consider the folowing dataset:

+++-+-+---+
| id| Name | Location| OnOffFlag |  Description |
+++-+-+---+
|  1 | Paper| Cabinet |  0 | Blah|
|  2 | Plastic   | Cabinet |  0 | Blah|
|  3 | China| Cabinet |  1 | Blah|
|  4 | Glass| Cabinet |  0 | Blah|
|  5 | China| Table |  0 | Blah|
|  6 | China| Cabinet |  1 | Blah|
+++-+-+---+

Is there a way to, using a single query, set the OnOffFlag to 1 for
the record that matches [Name=China AND Location=Table] at the same
time setting the OnOffFlag to 0 for records that match [Name=China AND
Location!=Table]?  I know I can do it in 2 queries but I am curious to
know if it can actually be done in 1.

thnx,
Chris

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Conditional Joins

2008-12-23 Thread Christoph Boget
Let's say I have the following tables:

Plates table
+++-+
| id | Name   | Description |
+++-+
|  1 | Paper  | Blah|
|  2 | Plastic| Blah|
|  3 | China  | Blah|
|  4 | Glass  | Blah|
+++-+

Cups table
+++-+
| id | Type   | Description |
+++-+
|  1 | Paper  | Blah|
|  2 | Mug| Blah|
|  3 | Coffee | Blah|
|  4 | Glass  | Blah|
+++-+

Flatware table
+++-+
| id | Form   | Description |
+++-+
|  1 | Spork  | Blah|
|  2 | Plastic| Blah|
|  3 | Antique| Blah|
|  4 | Tin| Blah|
+++-+

Inventory table

++++---+
| id | ItemType   | ItemId | Owned |
++++---+
|  1 | PLATES |  2 | 17|
|  2 | CUPS   |  4 | 3 |
|  3 | FLATWARE   |  3 | 6 |
|  4 | CUPS   |  3 | 9 |
|  5 | CUPS   |  1 | 7 |
|  6 | FLATWARE   |  4 | 12|
|  7 | PLATES |  1 | 1 |
++++---+

Is there a way to construct a query so that only the appropriate
tables are included as a join?  I'm trying to do a conditional (and
more elegant) version of the following query:

SELECT
  Inventory.id,
  CASE Inventory.ItemType
WHEN 'PLATES' THEN Plates.Name
WHEN 'CUPS' THEN Cups.Type
WHEN 'FLATWARE' THEN Flatware.Form
  END as ItemName
  Inventory.ItemType,
  Inventory.ItemId,
  Inventory.Owned
FROM Inventory
LEFT OUTER JOIN Plates ON Inventory.ItemType = 'Plates' AND Plates.Id
= Inventory.ItemId
LEFT OUTER JOIN Cups ON Inventory.ItemType = 'Cups' AND Cups.Id =
Inventory.ItemId
LEFT OUTER JOIN Flatware ON Inventory.ItemType = 'Flatware' AND
Flatware.Id = Inventory.ItemId
WHERE Inventory.id IN (2, 4, 5)

In  the query above, the joins on both the Plates and Flatware table
are superfluous because those rows are never selected. I'm not sure I
can get out of specifying each possible case in column list part of
the query but it seems to me like it should be possible to only join
those tables that are relevant based on the conditions set in the
WHERE clause.

Is something like this even possible?

thnx,
Christoph

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: select records to send to another table in another database

2008-04-10 Thread Christoph Boget
 I have a slew of records that went to the wrong database.  The tables
  have the same names and now I want to copy those records over to the
  correct database.  Is there such a mechanism using the cli mysql
  application in Linux?

If the tables have the same schema, you should be able to just do a
mysql dump and pipe that back into itself.  Something along the lines
of:

mysqldump old_table | mysql new_table

But that will only work if the tables have the same structure.  If
they don't, you can work with variations of the above.

thnx,
Chris

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



Re: select records to send to another table in another database

2008-04-10 Thread Christoph Boget
  I have a slew of records that went to the wrong database.  The tables
  have the same names and now I want to copy those records over to the
  correct database.  Is there such a mechanism using the cli mysql
  application in Linux?
  For each corresponding table:
  INSERT INTO db1.mytable SELECT * FROM db2.mytable;

And you can do that using the cli mysql app?

thnx,
Chris

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



What am I misunderstanding here?

2007-11-14 Thread Christoph Boget
I'm running MySQL version 5.0.33.

I have the 2 following queries:

SELECT
  Resource.Id,
  Resource.Name,
  Resource.Description,
  Resource.IsVisible,
  Resource.UpdatedDate,
  Resource.CreatedDate
FROM
  Resource
INNER JOIN
  ObjectTarget ON
Resource.Id = ObjectTarget.TargetId AND ObjectTarget.TargetType = 'JOE'
WHERE
  ObjectTarget.ObjectType = 'BOB'
AND
  ObjectTarget.ObjectId = 1
AND
  Resource.IsVisible = 'Y'
ORDER BY Resource.Name asc

and

SELECT
  OT1.TargetType,
  OT1.TargetId,
  Resource.Id,
  Resource.Name,
  Resource.Description,
  Resource.IsVisible,
  Resource.UpdatedDate,
  Resource.CreatedDate
FROM
  Resource
INNER JOIN
  ObjectTarget ON
Resource.Id = ObjectTarget.TargetId AND ObjectTarget.TargetType = 'JOE'
LEFT OUTER JOIN
  ObjectTarget AS OT1 ON
OT1.ObjectType = 'JOE' AND OT1.ObjectId = ObjectTarget.TargetId
WHERE
  ObjectTarget.ObjectType = 'BOB'
AND
  ObjectTarget.ObjectId = 1
AND
  Resource.IsVisible = 'Y'
ORDER BY Resource.Name asc

The only difference between them is that the second query includes 2
additional fields (from the OUTER JOINed table) and also the LEFT OUTER
JOIN.  When run, the first query returns 77 rows of distinct resources.
When run, the second query returns 180 rows but within that data set there
are only 32 distinct resources.

Now, my understanding of OUTER JOINs says that all of the rows from the
original query would be returned (77) along with any (if any) related data
from the OUTER JOINed table.  So if there was no related data in the OUTER
JOINed table for the current row, OT1.TargetType and OT1.TargetId would
simply be NULL.  But if there was related data, there would be an additional
row in the resultant data set for each related data row.

My expectation is that the second query should have returned the same 77
distinct resources from the first query along with any additional rows
correlating to the relating data from the OUTER JOINed table.  But that's
not what's happening.

Where am I going wrong here?

thnx,
Christoph


Result set flipped on it's axis

2007-11-13 Thread Christoph Boget
Let's say I have the following table:

CREATE TABLE `Users` (
`id` blahblah,
`firstName` blahblah,
`lastName` blahblah,
`phone` blahblah,
`fax` blahblah,
`email` blahblah
);

If I do SELECT id, firstName, lastName, email FROM Users, my result set is
returned as follows:

++---++-+
| Id | Firstname | LastName   | EmailAddress|
++---++-+
|  1 | John  | Doe| [EMAIL PROTECTED]  |
|  2 | Joe   | Bob| [EMAIL PROTECTED]  |
++---++-+

as expected.  But I'm wondering if I could somehow form the query such that
the result set is turned on it's axis like so:

++--++
|  1 | Firstname| John   |
|  1 | LastName | Doe|
|  1 | EmailAddress | [EMAIL PROTECTED] |
|  2 | Firstname| Joe|
|  2 | LastName | Bob|
|  2 | EmailAddress | [EMAIL PROTECTED] |
++--++

or some approximation thereof?

thnx,
Chris


Is this kind of ORDER BY possible?

2007-11-05 Thread Christoph Boget
Let's say that I have the following dataset after an INNER JOIN query:

UserName  | InventoryItem  | InventoryAmount
  | -  | ---
Joe   | Hammer | 2
Joe   | Nails  | 7
Joe   | Screws | 9
Bob   | Hammer | 1
Bob   | Hand Saw   | 2
Bob   | Power Saw  | 1
Briggs| Hammer | 4
Briggs| Screwdriver| 1
Briggs| Wrench | 3


Is it possible to order by InventoryAmount but only when InventoryItem has a
particular value?  Say, Hammer?  So that after the sort, the dataset looks
like this:

UserName  | InventoryItem  | InventoryAmount
  | -  | ---
Bob   | Hammer | 1
Bob   | Hand Saw   | 2
Bob   | Power Saw  | 1
Joe   | Hammer | 2
Joe   | Nails  | 7
Joe   | Screws | 9
Briggs| Hammer | 4
Briggs| Screwdriver| 1
Briggs| Wrench | 3

I know I can do this programatically after the fact while I'm processing the
dataset but I'm hoping this can be achieved at the database level.

Any information and/or advice would be appreciated!

thnx,
Christoph


Does this MySQL client exist?

2007-09-13 Thread Christoph Boget
I did a search and couldn't find anything like what I'm looking for and
though I doubt something like this does exist, I figured I'd ask anyway.  Is
there a client (not phpMyAdmin) that can connect to a server (that is
running MySQL) using SSH and connect to the database that way?  Right now,
the only way we are allowed to access the actual server is by using either
SSH or SFTP.  The only way we can access the MySQL database on that server
is either use phpMyAdmin (which I don't particularly care for; not to
disparage the hard work of the developers, it's just a matter of personal
preference) or use the command line.

I'm hoping that there is client software out there that can do what I'm
looking for.  Does it exist?

thnx,
Christoph


Re: Does this MySQL client exist?

2007-09-13 Thread Christoph Boget

   SSH or SFTP.  The only way we can access the MySQL database on that
 server
   is either use phpMyAdmin (which I don't particularly care for; not to
   disparage the hard work of the developers, it's just a matter of
 personal
   preference) or use the command line.
  Use the mysql client, like so:
  # ssh [EMAIL PROTECTED]
  [EMAIL PROTECTED] ~ mysql --user=dbuser --password somedatabasename
  Enter password: XXX
  mysql SELECT blah blah...



Right.  That's the command line to which I referred above.

thnx,
Christoph


Re: Does this MySQL client exist?

2007-09-13 Thread Christoph Boget

 There are lots of GUIs for connecting to MySQL databases. MySQL provide
 some (MySQL Query Browser and MySQL Administrator) but I prefer Toad:
 http://www.quest.com/toad-for-mysql/


I tried MySQL Administrator but couldn't get it to connect over SSH/SFTP.
I'll take a look at toad-for-mysql and NaviCat.

thnx,
Christoph


Re: Does this MySQL client exist?

2007-09-13 Thread Christoph Boget

 Again, you can get absolutely ANY client to connect over an SSH tunnel.
 You create the tunnel with your SSH client, then use the tunnel to
 carry your traffic.  So you don't need to use an unfamiliar or non-free
 program to do this.  (Any program that offers a connect-over-SSH option
 is very likely just creating the tunnel for you).


How do you go about creating the tunnel?

thnx,
Christoph


Re: Does this MySQL client exist?

2007-09-13 Thread Christoph Boget

  How do you go about creating the tunnel?
 There are lots of good tutorials online:
 http://www.google.com/search?q=create+ssh+tunnel


Excellent.  My thanks to you and to everyone who participated in this
thread!

thnx,
Christoph


Re: Selecting just 'N' first rows

2007-09-09 Thread Christoph

How can I send a query that retrieves only the first 'N' rows that match a
condition? As far as I know you must call mysql_fetch_row() until the last
row has been processed or the resources allocated won't be free.
Am creating a program in PHP that should retrieve only 'N' records each 
time a

query is sent, so I I'm thinking on using mysql_free_result(), but, is it
safe to free the results even if there are more records remaining that 
match

the query conditions?
I need to know how secure could be to read only the first records and free 
the

resources, or if there is another way to do the same thing.


Why dont' you just use the LIMIT statement?

thnx,
Chris 



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



Re: Broken Tables, was:Memory Problems

2007-05-24 Thread Christoph Klünter
Just for the logs:
Finally I found the failure. It was the Raid-Controller (3ware). 
It seems that the 64-bit Kernel has troubles with this Device.
I tried different mainboards with different controllers and the failure 
was reproducable with a 3ware-8000. I tried two of them.

Cheers,
  Christoph

On Monday 21 May 2007 09:11:43 Christoph Klünter wrote:
 Mike,

 I had the same failures without network.
 And it is a onboard-controller :-)

   Christoph

  Christoph,
  Have you tried replacing the network card with the one from the
  working machine? Network cards can cause problems under high load but
  will appear fine otherwise. Cheers.
 
  Mike

 --
 NMMN - New Media Markets  Networks GmbH
 Geschäftsführung: Kfm. Michael Schütt
 Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
 HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

 http://www.nmmn.com   Tel.: +49 40 284 118 -0
 Langbehnstrasse 6 Technische Hotline   -700
 22761 Hamburg Fax: -999

 Rufen Sie uns kostenlos an: http://www.nmmn.com/call/technik



-- 
NMMN - New Media Markets  Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com   Tel.: +49 40 284 118 -0
Langbehnstrasse 6 Technische Hotline   -700
22761 Hamburg Fax: -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/technik

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



Re: Broken Tables, was:Memory Problems

2007-05-21 Thread Christoph Klünter
Mike,

I had the same failures without network.
And it is a onboard-controller :-)

Christoph

 Christoph,
 Have you tried replacing the network card with the one from the
 working machine? Network cards can cause problems under high load but will
 appear fine otherwise. Cheers.

 Mike

-- 
NMMN - New Media Markets  Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com   Tel.: +49 40 284 118 -0
Langbehnstrasse 6 Technische Hotline   -700
22761 Hamburg Fax: -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/technik

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



Broken Tables, was:Memory Problems

2007-05-18 Thread Christoph Klünter
On Tuesday 15 May 2007 14:36:45 Mathieu Bruneau wrote:
 Hi, yeah, apparenlty you're running into the 32 bits memory liimt. Note
 thta some memory is allocated for the OS so you don't even have the full
 4GB of ram you can technically adressesed.

 The 64 bits os would increase this limit to 64gb++ (on 64 bits hardware)

 Good luck!
Ok, changed OS to 64bit. But didn't have any luck at all :-(
Upgrade was fine, used a dump to import all the data, and when everything was 
running, I got following error:

May 16 22:47:09 sql mysqld[15259]: 070516 22:47:09 [ERROR] /usr/sbin/mysqld: 
Got error 134 from storage engine
May 16 22:47:09 sql mysqld[15259]: 070516 22:47:09 [ERROR] /usr/sbin/mysqld: 
Sort aborted

So I stopped the database, did a myisamchk and everythind was fine again. For 
about two minutes. Then these
errors occured again. First error 134 (Record was already deleted (or record 
file crashed)) and after a while
the tables could not be accessed anymore:
May 16 23:12:03 sql mysqld[15259]: 070516 23:12:03 [ERROR] /usr/sbin/mysqld: 
Got error 127 from storage engine
May 16 23:12:03 sql mysqld[15259]: 070516 23:12:03 [ERROR] /usr/sbin/mysqld: 
Sort aborted

Repairing the tables worked. But it would take just some minutes until the 
tables got corrupted again.

I tried mysql-5.0 from debian etch (5.0.32) ,4.1 from debian sarge (4.1.11) 
and 5.0 from debian-testing (5.0.38).
All the same.  Any hints anybody ?

Cheers,
 Christoph

mysql show variables;
+-+-+
| Variable_name   | Value   |
+-+-+
| back_log| 50  |
| basedir | /usr/   |
| binlog_cache_size   | 32768   |
| bulk_insert_buffer_size | 8388608 |
| character_set_client| latin1  |
| character_set_connection| latin1  |
| character_set_database  | latin1  |
| character_set_results   | latin1  |
| character_set_server| latin1  |
| character_set_system| utf8|
| character_sets_dir  | /usr/share/mysql/charsets/  |
| collation_connection| latin1_swedish_ci   |
| collation_database  | latin1_swedish_ci   |
| collation_server| latin1_swedish_ci   |
| concurrent_insert   | ON  |
| connect_timeout | 5   |
| datadir | /var/lib/mysql/ |
| date_format | %Y-%m-%d|
| datetime_format | %Y-%m-%d %H:%i:%s   |
| default_week_format | 0   |
| delay_key_write | ON  |
| delayed_insert_limit| 100 |
| delayed_insert_timeout  | 300 |
| delayed_queue_size  | 1000|
| expire_logs_days| 0   |
| flush   | OFF |
| flush_time  | 0   |
| ft_boolean_syntax   | + -()~*:|  |
| ft_max_word_len | 84  |
| ft_min_word_len | 4   |
| ft_query_expansion_limit| 20  |
| ft_stopword_file| (built-in)  |
| group_concat_max_len| 1024|
| have_archive| YES |
| have_bdb| NO  |
| have_blackhole_engine   | NO  |
| have_compress   | YES |
| have_crypt  | YES |
| have_csv| YES |
| have_example_engine | NO  |
| have_geometry   | YES |
| have_innodb | YES |
| have_isam   | YES |
| have_ndbcluster | DISABLED|
| have_openssl| NO  |
| have_query_cache| YES |
| have_raid   | YES |
| have_rtree_keys | YES |
| have_symlink| YES |
| init_connect| |
| init_file

Corrupted Tables, was:Memory Problems

2007-05-18 Thread Christoph Klünter
On Tuesday 15 May 2007 14:36:45 Mathieu Bruneau wrote:
 Hi, yeah, apparenlty you're running into the 32 bits memory liimt. Note
 thta some memory is allocated for the OS so you don't even have the full
 4GB of ram you can technically adressesed.

 The 64 bits os would increase this limit to 64gb++ (on 64 bits hardware)

 Good luck!
Ok, changed OS to 64bit. But didn't have any luck at all :-(
Upgrade was fine, used a dump to import all the data, and when everything was 
running, I got following error:

May 16 22:47:09 sql mysqld[15259]: 070516 22:47:09 [ERROR] /usr/sbin/mysqld: 
Got error 134 from storage engine
May 16 22:47:09 sql mysqld[15259]: 070516 22:47:09 [ERROR] /usr/sbin/mysqld: 
Sort aborted

So I stopped the database, did a myisamchk and everythind was fine again. For 
about two minutes. Then these
errors occured again. First error 134 (Record was already deleted (or record 
file crashed)) and after a while
the tables could not be accessed anymore:
May 16 23:12:03 sql mysqld[15259]: 070516 23:12:03 [ERROR] /usr/sbin/mysqld: 
Got error 127 from storage engine
May 16 23:12:03 sql mysqld[15259]: 070516 23:12:03 [ERROR] /usr/sbin/mysqld: 
Sort aborted

Repairing the tables worked. But it would take just some minutes until the 
tables got corrupted again.

I tried mysql-5.0 from debian etch (5.0.32) ,4.1 from debian sarge (4.1.11) and 
5.0 from debian-testing (5.0.38).
All the same.  Any hints anybody ?

Cheers,
 Christoph

mysql show variables;
+-+-+
| Variable_name   | Value   |
+-+-+
| back_log| 50  |
| basedir | /usr/   |
| binlog_cache_size   | 32768   |
| bulk_insert_buffer_size | 8388608 |
| character_set_client| latin1  |
| character_set_connection| latin1  |
| character_set_database  | latin1  |
| character_set_results   | latin1  |
| character_set_server| latin1  |
| character_set_system| utf8|
| character_sets_dir  | /usr/share/mysql/charsets/  |
| collation_connection| latin1_swedish_ci   |
| collation_database  | latin1_swedish_ci   |
| collation_server| latin1_swedish_ci   |
| concurrent_insert   | ON  |
| connect_timeout | 5   |
| datadir | /var/lib/mysql/ |
| date_format | %Y-%m-%d|
| datetime_format | %Y-%m-%d %H:%i:%s   |
| default_week_format | 0   |
| delay_key_write | ON  |
| delayed_insert_limit| 100 |
| delayed_insert_timeout  | 300 |
| delayed_queue_size  | 1000|
| expire_logs_days| 0   |
| flush   | OFF |
| flush_time  | 0   |
| ft_boolean_syntax   | + -()~*:|  |
| ft_max_word_len | 84  |
| ft_min_word_len | 4   |
| ft_query_expansion_limit| 20  |
| ft_stopword_file| (built-in)  |
| group_concat_max_len| 1024|
| have_archive| YES |
| have_bdb| NO  |
| have_blackhole_engine   | NO  |
| have_compress   | YES |
| have_crypt  | YES |
| have_csv| YES |
| have_example_engine | NO  |
| have_geometry   | YES |
| have_innodb | YES |
| have_isam   | YES |
| have_ndbcluster | DISABLED|
| have_openssl| NO  |
| have_query_cache| YES |
| have_raid   | YES |
| have_rtree_keys | YES |
| have_symlink| YES |
| init_connect| |
| init_file

Re: Broken Tables, was:Memory Problems

2007-05-18 Thread Christoph Klünter
Hi everybody,

On Friday 18 May 2007 14:50:55 Brent Baisley wrote:
 You may be running into file system file size limits. You would need to
 make sure the file system you are using is set to handle files larger than
 4GB, in addition, you need to check that the account mysqld us running
 under is allowed to create files larger than 4GB. Just because the OS and
 file system can handle and access large memory/file configurations, it
 doesn't mean the user accounts are permitted to.

There are no big databases:
sql:~# du -hs /var/lib/mysql
1,4G/var/lib/mysql

I am using ext3 as Filesystem and don't get any errors from mysql which say 
that there might be problems with filesize.

Some is more info: 

After doing 1000 inserts , I get the following:

mysql check table community_msgin;
+-+---+--+--+
| Table  | Op| Msg_type | Msg_text  
  |
+-+---+--+--+
| g.community_msgin | check | warning  | Table is marked as crashed 
 |
| g.community_msgin | check | error| Wrong bytesec: 0-0-0 at linkstart: 
416860428 |
| g.community_msgin | check | error| Corrupt
  |
+-+---+--+--+
3 rows in set (5.80 sec)


Then I do a repair:

mysql repair table community_msgin;
+-++--+--+
| Table                  | Op    | Msg_type | Msg_text                          
              |
+-++--+--+
| g.community_msgin | repair | info    | Wrong bytesec:  0-  0-  0 at 
416860428; Skipped |
| g.community_msgin | repair | info    | Wrong bytesec:  0-  0-  0 at 
416960348; Skipped |
| g.community_msgin | repair | warning  | Number of rows changed from 1143479 
to 1143474  |
| goolive.community_msgin | repair | status  | OK                               
               |
+-++--+--+
4 rows in set (19.36 sec)

Then the table is OK until I insert again.

Cheers,
   Christoph


 I'm guessing you are doing a sort on a large dataset and the OS is stopping
 you once the sort file reaching the file size limit for the user account.



-- 
NMMN - New Media Markets  Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com   Tel.: +49 40 284 118 -0
Langbehnstrasse 6 Technische Hotline   -700
22761 Hamburg Fax: -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/technik

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



Re: Broken Tables, was:Memory Problems

2007-05-18 Thread Christoph Klünter
Hi,

It seems to be the Hardware somehow. I tested on another Machine with same OS, 
and everything seems to run now. I am using the same Memory so this is not the 
problem. Both Machines have hardware raid.  The only thing left is the 
mainboard. Vey ugly. 

Cheers,
   Christoph

On Friday 18 May 2007 16:48:36 mos wrote:
 Christoph,
  I don't know if this helps or not, but I had a similar problem
 a few years back on a Windows machine. Memory kept getting corrupted and I
 traced the problem to Intel Accelerator that I had running. Intel only
 admitted to the problem with their software months later. My advice is to
 remove every unnecessary service that is running on your client machine and
 server. Also run analysis on your drive to make sure the sectors are ok. It
 is also possible to have bad memory so if you could swap out the memory or
 get it hardware tested, that would help too. If it still fails, put the
 server on a different machine and run the client on the same machine in
 order to eliminate the hardware.

 Mike

 At 07:33 AM 5/18/2007, you wrote:
 Hi everybody,
 
 On Friday 18 May 2007 14:50:55 Brent Baisley wrote:
   You may be running into file system file size limits. You would need
   to make sure the file system you are using is set to handle files
   larger than 4GB, in addition, you need to check that the account mysqld
   us running under is allowed to create files larger than 4GB. Just
   because the OS and file system can handle and access large memory/file
   configurations, it doesn't mean the user accounts are permitted to.
 
 There are no big databases:
 sql:~# du -hs /var/lib/mysql
 1,4G/var/lib/mysql
 
 I am using ext3 as Filesystem and don't get any errors from mysql which
 say that there might be problems with filesize.
 
 Some is more info:
 
 After doing 1000 inserts , I get the following:
 
 mysql check table community_msgin;
 +-+---+--+
 --+
 
 | Table  | Op| Msg_type |
 
 Msg_text|
 +-+---+--+
 --+
 
 | g.community_msgin | check | warning  | Table is marked as
 
 crashed  |
 
 | g.community_msgin | check | error| Wrong bytesec: 0-0-0 at
 
 linkstart: 416860428 |
 
 | g.community_msgin | check | error|
 
 Corrupt  |
 +-+---+--+
 --+ 3 rows in set (5.80 sec)
 
 
 Then I do a repair:
 
 mysql repair table community_msgin;
 +-++--+---
 ---+
 
 | Table  | Op| Msg_type |
 
 Msg_text|
 +-++--+---
 ---+
 
 | g.community_msgin | repair | info| Wrong bytesec:  0-  0-  0 at
 
 416860428; Skipped |
 
 | g.community_msgin | repair | info| Wrong bytesec:  0-  0-  0 at
 
 416960348; Skipped |
 
 | g.community_msgin | repair | warning  | Number of rows changed from
 
 1143479 to 1143474  |
 
 | goolive.community_msgin | repair | status  |
 
 OK  |
 +-++--+---
 ---+ 4 rows in set (19.36 sec)
 
 Then the table is OK until I insert again.
 
 Cheers,
 Christoph
 
   I'm guessing you are doing a sort on a large dataset and the OS is
   stopping you once the sort file reaching the file size limit for the
   user account.
 
 --
 NMMN - New Media Markets  Networks GmbH
 Geschäftsführung: Kfm. Michael Schütt
 Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
 HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82
 
 http://www.nmmn.com   Tel.: +49 40 284 118 -0
 Langbehnstrasse 6 Technische Hotline   -700
 22761 Hamburg Fax: -999
 
 Rufen Sie uns kostenlos an: http://www.nmmn.com/call/technik
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
NMMN - New Media Markets  Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com   Tel.: +49 40 284 118 -0
Langbehnstrasse 6 Technische Hotline   -700
22761 Hamburg Fax: -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/technik

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



Memory Problems

2007-05-15 Thread Christoph Klünter
Hi List,

We have a mysql-Server with 8G of Ram. But mysql doesn't use this ram.
 But we get following error:

May 14 22:56:11 sql mysqld[5875]: 070514 22:56:10 [ERROR] /usr/sbin/mysqld: Got 
error 12 from storage engine
May 14 22:56:11 sql mysqld[5875]: 070514 22:56:10 [ERROR] /usr/sbin/mysqld: 
Sort aborted

I have set the sort_buffer_size to 1G but even this doesn't help.
Any hints ? Should we try a 64Bit-OS ?

Regards
 Christoph


Kernel is a 2.6.18-3-686-bigmem from debian-etch.

mysql show status;
+++
| Variable_name  | Value  |
+++
| Aborted_clients| 103352 |
| Aborted_connects   | 3  |
| Binlog_cache_disk_use  | 0  |
| Binlog_cache_use   | 0  |
| Bytes_received | 2985193088 |
| Bytes_sent | 3725769917 |
| Com_admin_commands | 5377515|
| Com_alter_db   | 0  |
| Com_alter_table| 8  |
| Com_analyze| 0  |
| Com_backup_table   | 0  |
| Com_begin  | 0  |
| Com_change_db  | 5434526|
| Com_change_master  | 0  |
| Com_check  | 0  |
| Com_checksum   | 0  |
| Com_commit | 0  |
| Com_create_db  | 0  |
| Com_create_function| 0  |
| Com_create_index   | 0  |
| Com_create_table   | 0  |
| Com_dealloc_sql| 0  |
| Com_delete | 154176 |
| Com_delete_multi   | 0  |
| Com_do | 0  |
| Com_drop_db| 0  |
| Com_drop_function  | 0  |
| Com_drop_index | 0  |
| Com_drop_table | 0  |
| Com_drop_user  | 0  |
| Com_execute_sql| 0  |
| Com_flush  | 2  |
| Com_grant  | 0  |
| Com_ha_close   | 0  |
| Com_ha_open| 0  |
| Com_ha_read| 0  |
| Com_help   | 0  |
| Com_insert | 473672 |
| Com_insert_select  | 0  |
| Com_kill   | 0  |
| Com_load   | 0  |
| Com_load_master_data   | 0  |
| Com_load_master_table  | 0  |
| Com_lock_tables| 0  |
| Com_optimize   | 0  |
| Com_preload_keys   | 0  |
| Com_prepare_sql| 0  |
| Com_purge  | 2  |
| Com_purge_before_date  | 0  |
| Com_rename_table   | 0  |
| Com_repair | 0  |
| Com_replace| 0  |
| Com_replace_select | 0  |
| Com_reset  | 0  |
| Com_restore_table  | 0  |
| Com_revoke | 0  |
| Com_revoke_all | 0  |
| Com_rollback   | 0  |
| Com_savepoint  | 0  |
| Com_select | 14627137   |
| Com_set_option | 450|
| Com_show_binlog_events | 0  |
| Com_show_binlogs   | 13 |
| Com_show_charsets  | 112|
| Com_show_collations| 112|
| Com_show_column_types  | 0  |
| Com_show_create_db | 0  |
| Com_show_create_table  | 42 |
| Com_show_databases | 10 |
| Com_show_errors| 0  |
| Com_show_fields| 111|
| Com_show_grants| 46 |
| Com_show_innodb_status | 0  |
| Com_show_keys  | 56 |
| Com_show_logs  | 0  |
| Com_show_master_status | 0  |
| Com_show_new_master| 0  |
| Com_show_open_tables   | 0  |
| Com_show_privileges| 0  |
| Com_show_processlist   | 0  |
| Com_show_slave_hosts   | 0  |
| Com_show_slave_status  | 0  |
| Com_show_status| 4930   |
| Com_show_storage_engines   | 7  |
| Com_show_tables| 250|
| Com_show_variables | 4708   |
| Com_show_warnings  | 0  |
| Com_slave_start| 0  |
| Com_slave_stop | 0  |
| Com_truncate   | 1  |
| Com_unlock_tables  | 0  |
| Com_update | 1088621|
| Com_update_multi   | 0  |
| Connections| 61722  |
| Created_tmp_disk_tables| 6036   |
| Created_tmp_files  | 8  |
| Created_tmp_tables | 287594 |
| Delayed_errors | 0  |
| Delayed_insert_threads | 0

newbie: select from a table, conditioned on the entry in another table

2005-10-29 Thread Christoph Lehmann

Hi
I have 2 tables, say A and B. One field in table A, say A_link, points 
to a field B_link in table B. I need to select entries in A, which 
fulfill two conditions: A_cond1 = XX and B_cond2 = YY.


E.g
tabel A table B

A_cond1 A_link  B_link  B_cond2
1   aa  aa  A
1   aa  ac  B
1   ac  dd  A
2   dd  ef  C
2   ef  
3   aa
3   dd
3   dd
4   ac
4   ac
4   ef

How can I now define a select statement such as:

SELECT* from A WHERE A_cond1 BETWEEN 1 AND 3 and corresponding field 
B_cond2 = A


this would return

A_cond1 A_link
1   aa
1   aa
2   dd
3   dd
3   dd

many thanks for your kind help

best regards
Christoph

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



newbie: how to sort a database without extracting the data

2005-05-03 Thread Christoph Lehmann
Hi
I am really new to mysql. I need my database to be sorted according to 
one field. But since the database with 1200 records is huge, I don't 
want to do it using SELECT.
What I need is just the stored database being sorted on hard-disk. Is 
there any way doing this like creating a new database and importing the 
old one but being sorted?

many thanks for your kind help
cheers
christoph
(p.s. I need this for later chunk-wise data-fetch with one chunk being 
homogenous in regard to one (the sorted) field)

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


Re: newbie: how to sort a database without extracting the data

2005-05-03 Thread Christoph Lehmann
thanks Damian
but I don't understand this: My field according to which I want the
database to be sorted IS an unique number.
eg I have
1 ab 33
1 cd 21
1 ac 32
2 aa 22
2 cd 25
3 kw 03
3 ie 02
2 ei 05
2 wk 00
I need it in the form:
1 ab 33
1 cd 21
1 ac 32
2 aa 22
2 cd 25
2 ei 05
2 wk 00
3 kw 03
3 ie 02
what do you mean by adding an index
thanks for your help
cheers
christoph
Damian McMenamin wrote:
add an index on the field. would be quickerthan any  exporting
importing.
--- Christoph Lehmann [EMAIL PROTECTED] wrote:
Hi
I am really new to mysql. I need my database to be sorted according
to 
one field. But since the database with 1200 records is huge, I
don't 
want to do it using SELECT.
What I need is just the stored database being sorted on hard-disk. Is

there any way doing this like creating a new database and importing
the 
old one but being sorted?

many thanks for your kind help
cheers
christoph
(p.s. I need this for later chunk-wise data-fetch with one chunk
being 
homogenous in regard to one (the sorted) field)

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


Yours Sincerely,
Damian McMenamin
Analyst Programmer
Melbourne 
Australia
Cell: (61)040-0064107
Email: [EMAIL PROTECTED]



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


newbie: delete row xy

2005-05-02 Thread Christoph Lehmann
Hi
I now how to use delete together with a WHERE statement. But e.g. after 
some warnings revealed me certain rows being inconsisent, and I want to 
delete them- how can I do this? I just know that I want to delete e.g 
row 1433 (I have no special id)

thanks for a hint
cheers
christoph
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


connect with 'localhost' to a '%' host entry fails with mysql 4.0.13

2003-07-10 Thread Interway Christoph
I have several users in my mysql table, with a % entry as host value. With
MySQL 3.x it worked liked a charm when connection from remote (any IP)
and/or localhost.
But now with MySQL 4.0.13 every connection from localhost gets refused
when using '%' or ' '
Is this a feature or a bug in this MySQL Version?

Thanks for help
Christoph

p.s. I tried it on two different servers, both times the same result, while
with all the old 3.x servers around there is no problem with that.



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



Re: Connecting to MySQL using OLEDB

2002-08-01 Thread Christoph Lütjen

Tell me what you do

ADODB - OLEDB driver for ODBC - MyODBC - MySQL
ADODB - MyOLEDB - MySQL

or anything else?

first case: check don't promt on connect

Did you create a data source? (First thing you don't need to do...)

But whatever you do with VB, MS ADODB and MySQL - you will need time. (Many
time ;-) )
Chris



- Original Message -
From: Darrell A. Sullivan, II [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 31, 2002 9:04 PM
Subject: Connecting to MySQL using OLEDB


 Can anyone tell me if it is possible to connect to a MySQL server running
on
 Linux from a Windows Visual Basic application without setting up a DSN on
 the Windows computer?

 I know this can be done with MS SQL Server and I have heard it can be done
 with Oracle so I am wondering if there is a connection string that will
work
 with MySQL. Currently everything I try brings up a DSN setup screen and
this
 is something that I definitely do not want.

 Thanks for any help.

 Darrell


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

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



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

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




MyOLEDB-Provider - Some fixes by me

2002-07-18 Thread Christoph Weber

Hi!

I read a message from venu to somebody called Woods, concerning fixing some
of the bugs in the OLEDB-provider for MySQL trough external people.
(http://www.geocrawler.com/archives/3/108/2002/4/0/8496671)

Are you still interested in some fixes? I would be happy to give them to you
for free.

I've spent nearly 30 hours up to now and have improved in the following
areas:

- Support for text-columns (DBFIELDTYPE_IUNKNOWN - ISimpleStream)
- Fix of a nasty bug which caused sporadic error messages (No conversion
available) because of a uninitialized field (dwType of rgdbcolumninfo)
- Kernel-Memorycheck-error in conjunction with text-columns (pobject was
just copied and ado tried to free the pointer)
- Tables collection was not available the first time (a second access to the
tables-property worked) because of a error I can't remember at the moment
- Commands with string parameters caused errors if they contained meta
characters like \ or '
- UPDATE-Command failed if the new value matched the old one (Flag
CLIENT_FOUND_ROWS was missing when opening)
- Bumped up the maximum table name to 64 instead of 32 characters because
one of our test tables had exactly 32 characters and there was no reason for
this.
- increased the (precompiled) maximum number of memory slots to 100 MByte
because 10 MByte was way too small for our needs.

There are still some of errors, but I think it's a big progress forward.

I made most of the changes to the oledb-implementation only. The only other
thing I modified was in the myodbc-subdirectory: I extended the default
flags
with CLIENT_FOUND_ROWS because ADO would otherwise think the row update
failed because of a concurrency failure when using pessimistic locking with
recordsets.

If you are interested in the changes, please tell my how to provide them.
The easiest for me would of course be to send all files zipped together like
they were distributed originally.
I could also send only the modified files or even a diff-output between the
original OLEDB3.0.zip-contents and my version (in this case pls. provide
short instructions on how to do this).

best regards,
  christoph weber


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

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




Re: Join or smth.

2002-05-28 Thread Christoph Lütjen

select * from table_name where product like 'p1' order by price limit 1;


- Original Message -
From: Ciprian Trofin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 11:20 AM
Subject: Join or smth.


 I have a table that looks smth. like this:

 id  product  price  store
 --
 1   p1100s1
 2   p1120s2
 3   p1100s3
 4   p2120s1
 5   p2 95s2
 6   p2300s3
 7   p3100s1
 8   p3120s2
 9   p3125s3
 10  p3130s1

 CREATE TABLE `products` (
 `id` tinyint(3) unsigned NOT NULL auto_increment,
 `product` varchar(4) NOT NULL default '0',
 `price` smallint(3) unsigned NOT NULL default '0',
 `store` varchar(4) NOT NULL default '0',
 PRIMARY KEY (`id`)
 ) TYPE=MyISAM;

 #
 # Dumping data for table 'products'
 #

 INSERT INTO products VALUES(1,p1,100,s1);
 INSERT INTO products VALUES(2,p1,120,s2);
 INSERT INTO products VALUES(3,p1,110,s3);
 INSERT INTO products VALUES(4,p2,120,s1);
 INSERT INTO products VALUES(5,p2,95,s2);
 INSERT INTO products VALUES(6,p2,300,s3);
 INSERT INTO products VALUES(7,p3,100,s1);
 INSERT INTO products VALUES(8,p3,120,s2);
 INSERT INTO products VALUES(9,p3,125,s3);
 INSERT INTO products VALUES(10,p3,130,s1);


 I want to build a query to find out where I can find the least expensive
 product.

 I know how to solve the problem using a script language (PHP) but I'd like
 to do it SQL-style :). I guess it can be done using some sort of JOIN.


 --
  Ciprian

  Always smile. It makes people wonder what you're up to.


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

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



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

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




Re: Re[2]: Join or smth.

2002-05-28 Thread Christoph Lütjen

select id, product, min(price), store from tablename group by product

Better?

Regards
Chris


- Original Message -
From: Ciprian Trofin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 1:24 PM
Subject: Re[2]: Join or smth.


 Doesn't work the way I want to: I want the result to be like:
 id | product | price | store
 
 1  | p1  | 100   | s1
 3  | p1  | 100   | s3
 5  | p2  |  95   | s2
 7  | p3  | 100   | s1


 CL select * from table_name where product like 'p1' order by price limit
1;

  I have a table that looks smth. like this:
 
  id  product  price  store
  --
  1   p1100s1
  2   p1120s2
  3   p1100s3
  4   p2120s1
  5   p2 95s2
  6   p2300s3
  7   p3100s1
  8   p3120s2
  9   p3125s3
  10  p3130s1
 
  CREATE TABLE `products` (
  `id` tinyint(3) unsigned NOT NULL auto_increment,
  `product` varchar(4) NOT NULL default '0',
  `price` smallint(3) unsigned NOT NULL default '0',
  `store` varchar(4) NOT NULL default '0',
  PRIMARY KEY (`id`)
  ) TYPE=MyISAM;
 
  #
  # Dumping data for table 'products'
  #
 
  INSERT INTO products VALUES(1,p1,100,s1);
  INSERT INTO products VALUES(2,p1,120,s2);
  INSERT INTO products VALUES(3,p1,110,s3);
  INSERT INTO products VALUES(4,p2,120,s1);
  INSERT INTO products VALUES(5,p2,95,s2);
  INSERT INTO products VALUES(6,p2,300,s3);
  INSERT INTO products VALUES(7,p3,100,s1);
  INSERT INTO products VALUES(8,p3,120,s2);
  INSERT INTO products VALUES(9,p3,125,s3);
  INSERT INTO products VALUES(10,p3,130,s1);
 
 
  I want to build a query to find out where I can find the least
expensive
  product.
 
  I know how to solve the problem using a script language (PHP) but I'd
like
  to do it SQL-style :). I guess it can be done using some sort of JOIN.
 

 --
  Ciprian

  Un cuvant de sfarsit:
  Useless fact: Odds of being killed in a car crash are 1 in 5000.


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

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



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

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




Fw: ODBC Connection to Linux MySQL

2002-05-27 Thread Christoph Lütjen


take a look in the user table (database mysql). There should be a row like
this...

HostUserPassword 
localhost  root ...

means that the user root can connect from localhost (the mysql server) only.

replace localhost by % or (better) insert a new row

%newuserpassword...

-

Hi,
I tried to connect to a mysql database running on a
linux server using an odbc connection in windows 98. I
get the following message:

[TCX][MyODBC]Host x.x.x.x is not allowed to connect to
this MySQL server
(#1130)[Microsoft][ODBC Driver Manager] Connection not
open (#0)

The username specified in the data source name is root
and I can ping the server where MySQLis running.

What did I do wrong or did not do at all on client or
server side?
Plase help me.


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

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




MS ADO (VB6.0) Problem with Updates

2002-05-14 Thread Christoph Lütjen

Hi all, I use MS VB6 and ADO to access my MySQL-Server.

dim rs as new adodb.recordset
rs.activeconnection = ConnectionObject
rs.curserlocation = aduseclient
rs.cursertype = adopenkeyset
rs.source = select * from TABLE where ID =   id
rs.open
rs!FIELD1 = VALUE
...
rs.update
...

ERROR: Row cannot be located for updating. Some values may have been changed
since it was last read.

Any suggestions? Or does anyone know where I can find more information about
MySQL and ADO?

Thanks,
Christoph Lütjen


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

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




mit-pthreads needs select(2) prototype on NetBSD

2002-01-05 Thread Christoph Badura

Hi!

Another patch for mit-pthreads under NetBSD.  The newer gcc that is now used
on NetBSD-current needs a prototype for select(2) to compile mysqld.cc
otherwise it aborts with:

mysqld.cc: In function `void * handle_connections_sockets(void *)':
mysqld.cc:2314: implicit declaration of function `int select(...)'

The following patch from our pkgsrc collection should be incorporated:

$NetBSD: patch-ah,v 1.7 2001/10/08 17:28:13 veego Exp $

--- mit-pthreads/include/unistd.h-orig  Wed Oct  3 18:08:36 2001
+++ mit-pthreads/include/unistd.h   Mon Oct  8 08:15:37 2001
@@ -177,6 +177,12 @@
 voidusleep __P_((unsigned));
 int vfork __P_((void));
 
+/* FIXME: this should go to sys/time.h! */
+#if __STDC__
+struct timeval;/* select(2) XXX */
+#endif
+int select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
+
 #endif /* !_POSIX_SOURCE */
 __END_DECLS
 

Thanks,
--chris

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

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




Caching Bug with AUTO_INCREMENT columns

2001-02-13 Thread christoph . schemainda

From: [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Subject: Caching Bug with AUTO_INCREMENT columns

Description:
When i use a table with an AUTO_INCREMENT column and
insert Data in the Table with a NULL Value for the
AUTO_INCREMENT column, AUTO_INCREMENT sets an new value
for this column as designed (SELECT * FROM... shows
this value).
But a SELECT statement with an 'WHERE column IS NULL'
returns the last inserted dataset.

If i execute the same SELECT statement again, i get
the correct output (Empty set).

Does anyone know a workaround for this Problem?
Executing the SELECT twice is not practicable for me!

Thanks
Christoph Schemainda



How-To-Repeat:

CREATE TABLE IF NOT EXISTS BugTest  (
  TestID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  Name   VARCHAR(100) NOT NULL)
;
INSERT INTO BugTest (TestID, Name) VALUES (NULL, 'Test');

SELECT * FROM BugTest WHERE TestID IS NULL;
SELECT * FROM BugTest WHERE TestID IS NULL;


The firsr SELECT creates the output:

 ++--+
 | TestID | Name |
 ++--+
 |  1 | Test |
 ++--+
 1 row in set (0.00 sec)



Fix:


Synopsis:   Caching Bug with AUTO_INCREMENT columns
Submitter-Id:   ???
Originator: Christoph Schemainda
Organization:   TWT Gmbh
MySQL support:  none
Severity:   serious
Priority:   high
Category:   mysqld, mysql client
Class:  sw-bug
Release:mysql-3.23.32

Exectutable:   mysqld-nt
Environment:   I used all the default settings
System:Win200
Compiler:  ??? (Binary distribution used)
Architecture:  i686


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

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