Re: Result row count *without* buffering all results?

2005-09-17 Thread Scott Gifford
Ken Gieselman <[EMAIL PROTECTED]> writes: [...] > So, here's my question: How can I find out how many rows are being > returned by a query, without using mysql_stmt_store_result() to > buffer all the rows back to the client? One straightforward way is to replace the SELECT clause with just SELEC

Re: Select ALL rows with WHERE statement

2005-09-17 Thread Jasper Bryant-Greene
Alvaro Cobo wrote: Thanks Pooly and Peter: The problem is that in the same php page I would like to choose either the calculation from an especific year or the calculation from the whole table using URL. The same page can easily handle both. If year is passed as a GET variable then it will

Re: Select ALL rows with WHERE statement

2005-09-17 Thread Alvaro Cobo
Thanks Pooly and Peter: The problem is that in the same php page I would like to choose either the calculation from an especific year or the calculation from the whole table using URL. An example: I have a table which shows how much money somebody has spent each year and there is the choice to k

Result row count *without* buffering all results?

2005-09-17 Thread Ken Gieselman
Hi Folks -- I'm working on a scientific data warehousing setup using MySQL (currently running 4.1.13 on SPARC/Solaris 9), and using the C prepared statements API for pulling numeric data in and out. So, here's my question: How can I find out how many rows are being returned by a query, witho

mysql_free_result() --- PART II

2005-09-17 Thread Miguel Cardenas
Hello again Sorry, this is the third mail but found something strange... In the past mail commented about the following error: *** glibc detected *** double free or corruption (!prev): 0x08051d58 *** Aborted but found that mysql_free_result() produces this error only when ALL data has been ret

Re: Connection Failure

2005-09-17 Thread Darrell Cormier
On Saturday 17 September 2005 16:12, Michael Stassen wrote: > You are trying to connect to a 4.1 server with a 4.0 client. This is > explained in the manual > . > > Michael Thanks for the information. I guess the perl-DBD and perl-DBI are old.

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-17 Thread Miguel Cardenas
> In the last episode (Sep 17), Miguel Cardenas said: > > I have a technical doubt, very simple but not mentioned in the manual... > > > > What happens if I call mysql_free_result() after performing a query > > but without doing mysql_fetch_row() ??? > > > > It may sound strange, but just need to k

Re: Select ALL rows with WHERE statement

2005-09-17 Thread Peter Brawley
Alvaro, >I have a select query where I need to filter the data using the WHERE >statement. But also need to have an option to show all the data in the >table. You cannot send the query engine an "option". When the program determines that all rows are to be retrieved, you could set the WHER

mysql_free_result() & 2 different connections

2005-09-17 Thread Miguel Cardenas
Hello list There is another doubt... I have programmed a C++ object that connects to MySQL, it has encapsulated its own MYSQL *mysql MYSQL_RES *result ... etc etc data, so it it possible to have several simultaneous connections to MySQL performing different jobs, but I have experienced a stran

Re: Connection Failure

2005-09-17 Thread Michael Stassen
You are trying to connect to a 4.1 server with a 4.0 client. This is explained in the manual . Michael Darrell Cormier wrote: I am confused as to why I am unable to connect to my MySQL DB 4.1.13 via DBI:DBD in PERL. This is on SuSE Pro 9.1,

Re: Select ALL rows with WHERE statement

2005-09-17 Thread Pooly
2005/9/17, Alvaro Cobo <[EMAIL PROTECTED]>: > Hi all: > > I've searched into the MySQL manual but I can't find the solution to this > very silly question. > > I have a select query where I need to filter the data using the WHERE > statement. But also need to have an option to show all the data

Select ALL rows with WHERE statement

2005-09-17 Thread Alvaro Cobo
Hi all: I've searched into the MySQL manual but I can't find the solution to this very silly question. I have a select query where I need to filter the data using the WHERE statement. But also need to have an option to show all the data in the table. For example (something like...): SELEC

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-17 Thread Dan Nelson
In the last episode (Sep 17), Miguel Cardenas said: > I have a technical doubt, very simple but not mentioned in the manual... > > What happens if I call mysql_free_result() after performing a query > but without doing mysql_fetch_row() ??? > > It may sound strange, but just need to know if a dat

mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-17 Thread Miguel Cardenas
Hello list I have a technical doubt, very simple but not mentioned in the manual... What happens if I call mysql_free_result() after performing a query but without doing mysql_fetch_row() ??? It may sound strange, but just need to know if a data row exists more than the data itself... The rig

Re: UUIDs - first usage for me

2005-09-17 Thread Dan Nelson
In the last episode (Sep 17), Christian Parpart said: > On Saturday 17 September 2005 08:34, Gleb Paharenko wrote: > > mysql> show create table ui\G; > > > > Table: ui > > Create Table: CREATE TABLE `ui` ( > > `uuid()` varchar(36) NOT NULL default '' > > I've been testing your example as I feel re

Re: UUIDs - first usage for me

2005-09-17 Thread Gleb Paharenko
Hello. The data type should be VARCHAR(36) as it was in my example. There is a bug in some versions. See: http://bugs.mysql.com/bug.php?id=13290 Christian Parpart <[EMAIL PROTECTED]> wrote: > > I've been testing your example as I feel really much safer with UUIDs instead > of aut

Does MySQL open the .frm file when opening a table?

2005-09-17 Thread Martijn van den Burg
Hi list, If MySQL opens a table, does it also need open the corresponding table format file? If it does, does it increment open_files? In other words: does opening a MyISAM table take three file handles, and opening a InnoDB table two (assuming the tablespace file isn't opened yet)? Kind rega

Connection Failure

2005-09-17 Thread Darrell Cormier
I am confused as to why I am unable to connect to my MySQL DB 4.1.13 via DBI:DBD in PERL. This is on SuSE Pro 9.1, perl-5.8.3-32, perl-DBI-1.41-28, perl-DBD-mysql-2.9003-22. I am getting the following error: DBI connect('host=localhost;database=lts','dbmgr',...) failed: Client does not suppor

Re: UUIDs - first usage for me

2005-09-17 Thread Christian Parpart
On Saturday 17 September 2005 08:34, Gleb Paharenko wrote: > mysql> show create table ui\G; > > *** 1. row *** > > Table: ui > > Create Table: CREATE TABLE `ui` ( > > `uuid()` varchar(36) NOT NULL default '' I've been testing your example as I feel r

Re: Incorrect latin1_danish_ci collation

2005-09-17 Thread Gleb Paharenko
Hello. In my opinion, this is not really a bug (however, I might be wrong - I don't speak danish :) O umlaut is an old writing of o with / through. See: http://users.cybercity.dk/~nmb3879/tree.html Probably latin1_danish_ci was designed to serve fields which contain only Dani

Re: UUIDs - first usage for me

2005-09-17 Thread Gleb Paharenko
Hello. I'm not sure, but in most cases we should trust MySQL. Use this trick :) mysql> create table ui select uuid(); Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> show create table ui\G; *** 1. row ***

Re: mysqldump and import

2005-09-17 Thread Gleb Paharenko
Hello. Oh, no. MySQL which is shipped with FC3 is much older than 4.1.8 (check it's version). If you can upgrade - use the latest release (4.1.14 now). Search how to perform a proper upgrade in the archives at: http://lists.mysql.com/mysql Dwayne Hottinger <[EMAIL PROTECTED]> wrote:

Re: EXISTS subquery optimization

2005-09-17 Thread Pooly
Hi, > Now as expected it's an dependent subquery and makes use of the index on > document_id. BUT: If we change the "SELECT id" in the subquery to > "SELECT document_id" or "SELECT 1", we get: > > *** 1. row *** > [...] > **