Re: why too long entries get _cut_ without error

2002-01-17 Thread M. A. Alves

On Thu, 17 Jan 2002, Henning Sprang wrote:
 ... I just realized that Mysql simply cuts  Data i want to insert
 into a field when it is too long, without giving any warning or error
 message. . .

If the field has fixed length that is standard behaviour (together with
right-padding too short values with spaces).

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



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

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




Re: why too long entries get _cut_ without error

2002-01-17 Thread M. A. Alves

On Thu, 17 Jan 2002, Henning Sprang wrote:
 ... I just realized that Mysql simply cuts  Data i want to insert
 into a field when it is too long, without giving any warning or error
 message. . .
  If the field has fixed length that is standard behaviour (together with
  right-padding too short values with spaces).
 Yes, I know, this is standart, dosumented behaviour, but i just cannot
 imagine _why_ and asked therfore...

So your field is of fixed length type (you hadn't told us that yet).

As to the rationale, I don't think SQL has one. I would guess it was
simplicity (of the definition of SQL), not withstanding the fact that SQL
is spuriously complicated in other things.

Cheers,

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



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

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




Re: why too long entries get _cut_ without error

2002-01-17 Thread M. A. Alves

On Thu, 17 Jan 2002, Henning Sprang wrote:
  So your field is of fixed length type (you hadn't told us that yet).
 Aehm, no, it isn't! It's VARCHAR.

Doesn't matter: If you assign a value to a CHAR or VARCHAR column that
exceeds the column's maximum length, the value is truncated to fit.
(MySQL Manual)

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



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

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




Re: why too long entries get _cut_ without error

2002-01-17 Thread M. A. Alves

On Thu, 17 Jan 2002, Henning Sprang wrote:
 ok, so it isn't depending on fixed length as you first said, and the
 reason for it is just the simple design of sql, right?

Right. (Sorry for the previous inacuracy, I was using 'fixed' in a wide
sense viz. including 'bounded'.)

Cheers,

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



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

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




Re: why too long entries get _cut_ without error

2002-01-17 Thread M. A. Alves

On Thu, 17 Jan 2002, Ryan Fox wrote:
 The current action is that this value is truncated to fit the column.  The
 other option would be to automagically expand the column's length so the
 value would fit.  Despite what the original poster may think, they _really_
 don't want that to happen.

Right. That is what the 'text' type is there for.

 I wouldn't be terribly opposed to having an option to be set to allow this,

No need. Just let the 'text' type get into the SQL standard, if it is not
already there.

Cheers,

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



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

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




Re: text mining under mysql

2002-01-10 Thread M. A. Alves

   . . .
  Isn't function MATCH what you want?
  . . .
 The problem is that I don't know the expression for the 'AGAINST' part.
 Given a document I'd like to know what it is about without reading it.
 . . .

So you want a list of _descriptors_ for each document. That is
_precoordination_ which is always computationally expensive.

/* And yes I think you have to (re)implement it as access to the MySQL
full-text indexes is hard or impossible and/or undocumented (correct me if
I am wrong). */

But I wonder if you really do not have the latitude to refocus the problem
from the user side: the user inputs a search expression: that is your
AGAINST part.

Of course it may take a few seconds, and if your document base is huge it
may be impractical, but try it anyway ;-)

Sure this is not 'hard' text mining but it is a good first step in the
incremental development of an information retrieval system. Also, it gives
you more data to mine: the entered search expressions :-)

Afterwords you can---and you should!---improve the system with
precoordination and text mining. The current best models I know for
document description are by the research group GLINT of the CENTRIA. I
used to be among them. Call [EMAIL PROTECTED] and tell him I say
hello :-)

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



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

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




Re: text mining under mysql

2002-01-07 Thread M. A. Alves

On Mon, 7 Jan 2002, Arne Mueller wrote:
 I wonder whether one can use the full text indexes in mysql to find out
 what words in a document are likely to be relevant key words.

 . . .

 I'd be nice to have a command like this:

 select keywords(10.0) from MyDocs where DocId = 666;

 . . .

Isn't function MATCH what you want?  Example from the manual:

mysql SELECT *,MATCH a,b AGAINST ('collections support') as x FROM t;
+--+---++
| a| b | x  |
+--+---++
| MySQL has now support| for full-text search  | 0.3834 |
| Full-text indexes| are called collections| 0.3834 |
| Only MyISAM tables   | support collections   | 0.7668 |
| Function MATCH ... AGAINST() | is used to do a search|  0 |
| Full-text search in MySQL| implements vector space model |  0 |
+--+---++
5 rows in set (0.00 sec)

The function MATCH matches a natural language query AGAINST a text
collection (which is simply the columns that are covered by a FULLTEXT
index). For every row in a table it returns relevance - a similarity
measure between the text in that row (in the columns that are part of the
collection) and the query.  When it is used in a WHERE clause (see example
above) the rows returned are automatically sorted with relevance
decreasing.

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



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

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




Re: Embedded SQL

2001-12-20 Thread M. A. Alves

On Thu, 20 Dec 2001, Raymond Wan wrote:
 . . . I know there's a C API for MySQL, but I was just wondering if
 MySQL has a preprocessor that supports statements such as EXEC SQL ...
 in a host language such as C . . .

The thing (purportedely) exists for Ada (adapower.com).

However Ada is not as C in a number of traits, notably debbuging time
;-)

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



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

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




Re: Binary data with embedded nulls (mysql_real_escape_string problem).

2001-12-14 Thread M. A. Alves

On Fri, 14 Dec 2001, Ian Collins wrote:

 I am having difficulties with entering binary data from a c program.
 I have passed the string through mysql_real_escape_string.

Post the C data then.  However read on.


 . . .

 drop table if exists junk5;

 create table junk5
 (
   id int not null, primary key(id),
   s1 char(10) not null,
   i1 smallint not null
 );

 insert junk5 values(1,'abc\0def\0gh', 2);
 insert junk5 values(2,'abc\\0def\\0gh', 3);
 insert junk5 values(3,'abc\\0def\0gh', 4);

 select * from junk5;

 By running this snippet, you will see that you need to double escape the
 null to get it in the database.

No.  What you are putting in the database is (character by character):

  1 = 'a', 'b', 'c', 0, 'd' ...
  2 = 'a', 'b', 'c', '\', '0', 'd' ...

Proof:

mysql select id, substring(s1, 1, 3) as first3, ascii(substring(s1, 4,
1)) as fourth, substring(s1, 5, 5) as remainder from junk5;
++++---+
| id | first3 | fourth | remainder |
++++---+
|  1 | abc|  0 | def   |
|  2 | abc| 92 | 0def\ |
|  3 | abc| 92 | 0def  |
++++---+

The 'problem' is in the output from the mysql program: it does not have
a literal for null (in text); instead it seems to interpret it as end of
text; this is probably because it is bound to the C zero-terminated
strings model.

Using the API you can get it right.

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



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

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




Re: Problems with function sum() on float values

2001-12-13 Thread M. A. Alves

On Thu, 13 Dec 2001, [iso-8859-2] Wojciech Dr±¿ek wrote:

 I wonder if it is only question of configuration but my MySQL server has
 problems with suming of float values.

 create table ft (id INT AUTO_INCREMENT, val FLOAT, PRIMARY KEY(id));
 insert ft(val) values('3.4');
 insert ft(val) values('0.3');
 insert ft(val) values('1.24');
 . . .

Same problem here viz:

  select sum(val) from ft;  =  4.941168251

while

  select 3.4 + 0.3 + 1.24;  =  4.94

According to a previous message on this forum today, there are known
problems with the float type.  Maybe this is one of them (in the function
sum).

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



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

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




Re: Annoying article about MySql

2001-12-10 Thread M. A. Alves

On Sat, 8 Dec 2001, Admin wrote:

 I was just reading an annoying article from a user who was moving from
 MySql to Postgres because of stability problems and because of
 problems restoring large MySql data-dumps.

 . . .

 I would be grateful to hear your opions and experiences, good or bad.

I have made the move from Postgres to MySQL for speed reasons.  Postgres
has more features but is slow---and not that very stable either.  With
MySQL I am experiencing speed improvements of 10 to 50 times faster over
Postgres, and I am not experiencing any loss in stability.

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



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

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




Re: API documentation issue : inconsistency in mysql_real_connectdocumentation

2001-11-26 Thread M. A. Alves

On Sat, 24 Nov 2001, Sinisa Milivojevic wrote:
 I think that our documentation is quite clear on that issue. . . .

Not quite:

For a successful connection, the return value is the same as the value
of the first parameter, unless you pass NULL for that parameter. (Manual)

That is, if you pass NULL, the result value is _not_ the same as NULL.

So, if you indeed pass NULL, the result is either

  (1) an invalid pointer (pointing to no object that makes sense), or

  (2) a valid one, in which case it must point to a MYSQL structure.

Now, if (1), you can not possibly test the result, can you? You are in a
limbo.

If (2), the MYSQL structure must be a newly created one, since you did not
pass any! And voila, you have created a MYSQL structure without mysql_init
(this is of course is in contradiction with the rest of the
documentation).

Cheers,

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



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

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




RE: API documentation issue : inconsistency in mysql_real_connect documentation

2001-11-26 Thread M. A. Alves

On Mon, 26 Nov 2001, Sinisa Milivojevic wrote:
 Quentin Bennett writes:
  So, if you pass NULL in as the first parameter to mysql_real_connect, a
  possibility opened up by the manual . . .

 There is no indication in our documentation that NULL should be passed
 as a first parameter in mysql_real_connect.

Of course not, and that is very good sense ;-)

But there is a clear indication that it _can_:

For a successful connection, the return value is the same as the value of
the first parameter, unless ***you pass NULL for that parameter***.

See my previous response to Sinisa for the extraordinary consequencies of
passing NULL ;-)

Cheers,

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



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

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




API documentation issue : inconsistency in mysql_real_connectdocumentation

2001-11-24 Thread M. A. Alves

What is the semantics of passing a NULL mysql connection to
mysql_real_connect()? Does it create a new handler? This is the only
possible interpretation of the result value as documented. However it is
also (abundantly) documented that the handle must be created with
mysql_init(). So what stands? (I transcribe below the relevant part of the
manual. The last sentence of the excerpt is the crux of the problem.)

This is not a pressing issue, just one of correctness. I find it a bit
surprising that such an inconsistency, or incompletness, still exists in
the documentation of such a very important part of mysql as the only API
means of making connections.


8.4.3.171 mysql_real_connect()

. . .

The first parameter should be the address of an existing MYSQL structure.
Before calling mysql_real_connect() you must call mysql_init() to
initialize the MYSQL structure.

. . .

8.4.3.173 Return Values

A MYSQL* connection handle if the connection was successful, NULL if the
connection was unsuccessful. For a successful connection, the return value
is the same as the value of the first parameter, unless you pass NULL for
that parameter.

(http://www.mysql.com/documentation/mysql/bychapter/manual_toc.html)

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



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

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




Re: speed of mysql insert through C api

2001-11-16 Thread M. A. Alves

On Thu, 15 Nov 2001, Gabor Penoff wrote:
 can you tell me an estimated speed about filling 100 records with
 mysql insert by using the C api?

Last insert job I ran did c. 400 inserts per second.  This is real
(wall) time and some computations were involved.

(Dont go running fetching a calculator, I did it for you: 1 million
records === 42 minutes.)

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



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

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




Re: Performance problems

2001-11-15 Thread M. A. Alves

On Wed, 14 Nov 2001, Aaron Williams wrote:
 At 3:54 PM + 11/14/01, M. A. Alves wrote:
 On Wed, 14 Nov 2001, Aaron Williams wrote:
   . . .
   I am not expert on innodb, or mysql either. I started playing with
   those values after reading the performance guide on Innodb.com.
 
 What is this site (Innodb.com)?  It seems to show some kind of report on
 some system associated with the HTTP request originator.  Is this all it
 is?  Is this the performance guide you have read?

 Not sure exactly where you got that from,

Your previous message (above), perhaps? ;-)

 but here is the direct link
 to the perfomance tuning section of the InnoDB manual.

 http://www.innodb.com/ibman.html#InnoDB_tuning

That is on www.innodb.com, not innodb.com .  Www.innodb.com looks
good, innodb.com doesn't.  You should stand selfcorrected now ;-)

Cheers,

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



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

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




Re: To insert images in a table - BLOB

2001-11-14 Thread M. A. Alves

On Wed, 14 Nov 2001, Carlos Alberto Afranllie wrote:
 I need to insert files of images in a table, which has a field of
 type BLOB, I have understood that to do this I can use the function
 LOAD_FILE(file.bmp), but that this file must be in the server.  It is not
 possible to insert a file that is in a local machine?

Not with LOAD_FILE, according to the Manual.  You must do it inside your
application i.e. read the file and generate the corresponding SQL
statement using your programmatic means.  Do not forget to escape the
necessary characters (NUL, \, ', , I think).

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



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

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




Re: Performance problems

2001-11-14 Thread M. A. Alves

On Wed, 14 Nov 2001, Aaron Williams wrote:
 . . .
 I am not expert on innodb, or mysql either. I started playing with
 those values after reading the performance guide on Innodb.com.

What is this site (Innodb.com)?  It seems to show some kind of report on
some system associated with the HTTP request originator.  Is this all it
is?  Is this the performance guide you have read?

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



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

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




Re: order by, group by

2001-11-13 Thread M. A. Alves

mysql
On Mon, 12 Nov 2001, Christian Andersson wrote:
 Is it possible in myslq to do an order by before an group by?

For me it is not clear why would you want to do that. Can you give an
example?

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



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

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




Re: order by, group by

2001-11-13 Thread M. A. Alves

On Tue, 13 Nov 2001, Carl Troein wrote:
 As far as I understood the original post, the question was if
 there's a way to get MySQL to perform an ORDER BY prior to
 doing the GROUP BY.

Yes it was but prior to does not make much sense and that is why I asked
the original poster for an example.  But anyway I think Carl has guessed
correctly what was on the poster's mind and yes Carl the rest of your
message makes it quite clear.

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



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

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




Re: C API mysql_query() malfunctioning (long)

2001-11-12 Thread M. A. Alves

 So you mean to replace joining with combined condition?

I think it is simply a terminological/syntactical difference. I simply
never use LEFT JOIN commands. I always use '='. I think they do the same
think, namely what is called a join in relational _theory_. I
*understand* '=' better then JOIN.

  *
*   *

It is good we found your bug now!

There is still the question of your mysql monitor seemingly yelding the
right results for the wrong query, but I'll leave that problem for you now
;-)

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



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

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




Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread M. A. Alves

I know KR (section 4.9, 2nd ed.) says

  char s[] = ...;

is equivalent to

  char s[] = { . . . , '\0'}

but I always explicitely attach the \0 just to be sure i.e.

  char s[] = ...\0;

/* mysql, database (cheating the filter, human reader ignore) */

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



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

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




RE: What are MYSQL_RES limits ? -- update

2001-10-31 Thread M. A. Alves

Some other useful information on this problem:

I have tried the operation in two other ways, both based on a version of
the program with only one connection using the API and emiting the UPDATE
statments on standard output:

  1. output piped onto mysql -- failure :-(

  2. output saved on a file, then input to mysql -- success :-)

This fits my diagnosis that it has to do with concurrent access to the
same table.

Thanks,

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




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

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




What are MYSQL_RES limits ?

2001-10-30 Thread M. A. Alves

I seem to be hitting a ceiling in MYSQL_RES (mysql_use_result).  I select
2 or 3 items but only 2295 are returned.  What might be the cause
of this?

Thanks,

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




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

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




What are MYSQL_RES limits ? -- update

2001-10-30 Thread M. A. Alves

On Tue, 30 Oct 2001, M. A. Alves wrote:
 I seem to be hitting a ceiling in MYSQL_RES (mysql_use_result).  I select
 2 or 3 items but only 2295 are returned.  What might be the cause
 of this?

The probable cause is I was accessing the same table at the same time (but
thru different connections).  However I am surprise MySQL cannot cope with
this kind of concurrent access.  Or can it?  One access was selection and
the other was updating.

Thanks a lot,

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



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

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




Re: Image

2001-10-26 Thread M. A. Alves

 How can i insert image in a database.

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

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

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

  (The MySQL Manual, section 7.1.1)

Cheers,

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



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

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




Link error : where is compress ?

2001-10-25 Thread M. A. Alves

Hello.

I am linking the mysqlclient library (libmysqlclient.a) to my client
program as indicated in the MySQL Manual section 23.1, and I am getting
the following linker error messages:

/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function
`my_compress_alloc':
my_compress.o(.text+0xbb): undefined reference to `compress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function
`my_uncompress':
my_compress.o(.text+0x12a): undefined reference to `uncompress'

What am I missing?

Isn't there a way to find out what library has a given item?

Thanks a lot,

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



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

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




Re: Link error : where is compress ? -- problem solved; ignore

2001-10-25 Thread M. A. Alves

On 25 Oct 2001 [EMAIL PROTECTED] wrote:

 Your message cannot be posted because it appears to be either spam or
 simply off topic to our filter. To bypass the filter you must include
 one of the following words in your message:

 database,sql,query,table

 If you just reply to this message, and include the entire text of it in the
 reply, your reply will go through. However, you should
 first review the text of the message to make sure it has something to do
 with MySQL. Just typing the word MySQL once will be sufficient, for example.

 You have written the following:

 compress was there all along. I was giving the wrong linker options.



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



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

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




Link error : where is compress ?

2001-10-24 Thread M. A. Alves

Hello.

I am linking with libmysqlclient as told by the MySQL Manual. However I am
getting the following linker error messages:

/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function
`my_compress_alloc':
my_compress.o(.text+0xbb): undefined reference to `compress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function
`my_uncompress':
my_compress.o(.text+0x12a): undefined reference to `uncompress'

What am I missing?

Thanks a lot,

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



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

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