Re: why in procedure truncate table do not reset auto_increment?

2008-01-09 Thread x

thanks

may you point out which chapter says?
From manual I get the following answer agaist to my result(my server 
version 5.0.45), 

For |InnoDB| before version 5.0.3, |TRUNCATE TABLE| is mapped to 
|DELETE|, so there is no difference. Starting with MySQL 5.0.3, fast 
|TRUNCATE TABLE| is available. However, the operation is still mapped to 
|DELETE| if there are foreign key constraints that reference the table. 
(When fast truncate is used, it resets any |AUTO_INCREMENT| counter. 
From MySQL 5.0.13 on, the |AUTO_INCREMENT| counter is reset by 
|TRUNCATE TABLE|, regardless of whether there is a foreign key constraint.)


The table handler does not remember the last used |AUTO_INCREMENT| 
value, but starts counting from the beginning. This is true even for 
|MyISAM| and |InnoDB|, which normally do not reuse sequence values.


See:
http://dev.mysql.com/doc/refman/5.0/en/truncate.html 
http://dev.mysql.com/doc/refman/5.1/en/truncate.html


Sebastian Mendel 写道:

过客 schrieb:
  

[...] why in procedure TRUNCATE table
demo do not reset auto_increment?



is clearly written in the documentation, just read ...

in short:

auto_increment is used for primary key, primary keys could be referenced
from another table, setting auto_increment back to 0 could lead to using a
primary key formerly used by another datarow and still referenced by another
table - could lead to data inconsistency.

  




Re: SOLVED: Problem with *very* slow replication, FreeBSD 6.2

2007-11-05 Thread Bob Bankay X-AST : 7731^29u18e3
Running on our systems, we have had the replica load data  and then 
started.  The longest delta was about 28 hours behind the master.  The 
slave status faithfully reported how far behind the master it was, when 
the slave was started,  even as it was loading its relay-logs from the 
master which if I remember correctly took a couple of hours that first 
time.  During that first part when the relay logs were loading, the 
seconds behind would increase and when the relay log caught up the delta 
started decreasing rapidly to zero.


We are running x86-64bit hardware with RH Linux and a 1Gbit ethernet 
link between master and slave (nothing exotic).  The load on the link 
never seems to an issue, so we have never monitored it closely.


So, if you are happy with the situation then it is solved.

Cheers,
Bob Bankay



Baron Schwartz wrote:

Christopher E. Brown wrote:

On Sat, 3 Nov 2007, bob b wrote:
So, a slave is down for 8hrs.  It comes online and pulls the binlog 
in 120 seconds.  The "seconds behind master" does not reflect 8hrs, 
but how many seconds (at current processing rate) before the slave 
finishes the relay logs.



The "seconds behind master" value is really "seconds until currency 
with the relay logs" and should prolly be documented as such.


This is incorrect.  In most circumstances, it's basically the 
difference between the timestamp of the binlog event the SQL thread is 
currently processing, and the master's current timestamp (as fetched 
by the I/O thread).  So it really is what it sounds like: the seconds 
behind the master.  If it says 100, it means the slave is processing 
an event that took place 100 seconds ago on the master.


You can read the source code in show_master_info() in sql/slave.cc.

Baron




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



adding an index to a very large table (hours and hours??)

2007-08-10 Thread x x
I'm attempting to add an index to a table with 70
million rows.

DB server running on a reasonably fast Intel Mac on a
relatively slow drive.

Should this take hours to complete ?

So far it's taken 5 hours and counting.  I'm afraid
it's going to destroy my drive !


   

Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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



Cannot start mysql due to possibly a bug

2005-05-29 Thread Mouse Doctor X
Nice time of the day.
I apologize I am writing on this address because didn't find START NEW THREAD 
on mailing lists page.

The problem is this: I have the freshest version of Gentoo Linux, and mysql 
within it. Just didn't modify /etc/mysql/my.cnf, commenting only one line: 
skip-innodb.

Have read about first mysql startup, and launched mysql_install_db as root. All 
went ok. Then, /etc/init.d/mysql start, started ok. 
When giving first command:  /usr/bin/mysqladmin -u root -h my_host password 
'new-password', it sends me somewhere saying: 
/usr/bin/mysqladmin: connect to server at 'my_host' failed
error: 'Lost connection to MySQL server during query'

When inspecting /var/log/mysql/mysqld.err log file, find there that 
/var/mysql.frm is not found. 
... out of comment. Also, when stopping mysql, it refuses to be stopped.

Help! Thanks in advance

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



Re: access-trouble using root

2005-04-05 Thread X y
I wrote; mysql> UPDATE mysql.user SET
Password=OLD_PASSWORD('the_new_password') WHERE User='root';

mysql> FLUSH PRIVILEGES;

mysql> \quit


Then; shell> mysql -u root -p

Enter password: the_new_password
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)



Is this 'cause I didn't kill mysqld_safe before trying to login again?




 N.P

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



Re: access-trouble using root

2005-04-05 Thread X y
On Apr 5, 2005 10:49 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> 
> X y <[EMAIL PROTECTED]> wrote on 04/05/2005 03:51:02 PM:
> 
> 
> > On Apr 5, 2005 9:06 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > 
> > > Could it be that you are using a pre-4.1 client with a post-4.1 server?
> Do
> > > exactly what you did before except try this: 
> > > 
> > > UPDATE mysql.user SET
> > > Password=OLD_PASSWORD('my_new_password') WHERE
> User='root' 
> > 
> > Did the above, put in my old password in OLD_PASSWORD and my new
> > password within the 'my_new_password' field (so to speak)
> > 
> >  
> > > You will need to FLUSH PRIVILEGES again. If this doesn't work at least
> we
> > > have eliminated another possibility. 
> > 
> > 
> > Now I got this error message after doing mysql> FLUSH PRIVILEGES; 
> > 
> > ERROR 1064: You have an error in your SQL syntax.  Check the manual
> > that corresponds to your MySQL server version for the right syntax to
> > use near 'FLUSH PRIVILEGES' at line 2
> > 
> > 
> > I'm using 4.0.20 (Your MySQL connection id is 1 to server version: 4.0.20)
> > 
> > 
> > Thank you for your feedback, 'tis appreciated!!!
> > 
> > 
> > 
> >  N.P
> I think you misunderstood 

Looks like it


> OLD_PASSWORD() is a function (not something I wanted to you retype) added to
> versions 4.1 and later that will hash whatever plain text is in it into a
> pre-4.1 password just as the PASSWORD() function hashes plain text into a
> more robust post-4.1 password. I also left off the ending semicolon from the
> update statement (sorry that was my error) the actual statement should read
> (it will be re-wrapped by the list server but it started as one long
> statement): 
> 
> UPDATE user SET Password =
> OLD_PASSWORD('put_your_new_password_here') WHERE
> User='root'; 

When I write the above as one long statement, I get the following message;

"ERROR 1046: No Database Selected"




   N.P

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



Re: access-trouble using root

2005-04-05 Thread X y
On Apr 5, 2005 9:06 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> Could it be that you are using a pre-4.1 client with a post-4.1 server? Do
> exactly what you did before except try this: 
> 
> UPDATE mysql.user SET
> Password=OLD_PASSWORD('my_new_password') WHERE User='root' 

Did the above, put in my old password in OLD_PASSWORD and my new
password within the 'my_new_password' field (so to speak)

 
> You will need to FLUSH PRIVILEGES again. If this doesn't work at least we
> have eliminated another possibility. 


Now I got this error message after doing mysql> FLUSH PRIVILEGES; 

ERROR 1064: You have an error in your SQL syntax.  Check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'FLUSH PRIVILEGES' at line 2


I'm using 4.0.20 (Your MySQL connection id is 1 to server version: 4.0.20)


Thank you for your feedback, 'tis appreciated!!!



 N.P

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



Re: access-trouble using root

2005-04-05 Thread X y
I may add that I also tried;



1. I kill the mysqld-process on the server.

2. I start mysqld_safe by typing; "mysqld_safe --skip-grant-tables &"

3. Connect to the mysqld-server by doing; "shell> mysql -u root"


4. Inside, I write; UPDATE mysql.user SET
Password=PASSWORD('my_new_password') WHERE User='root';

and get the following reply from mysql; 

Query OK, 5 rows affected (0.00 sec)
Rows matched: 5  Changed: 5  Warnings: 0


5.Still inside mysql, I write; FLUSH PRIVILEGES;

and get the following reply; 

Query OK, 0 rows affected (0.00 sec)




According to http://dev.mysql.com/doc/mysql/en/resetting-permissions.html
I should now be able to login using "my_new_password*, but this
doesn't happen.

What is the next step?



Thank you.



  N.P.


On Apr 5, 2005 6:11 PM, X y <[EMAIL PROTECTED]> wrote:
> I do the following;
> 
> 1. I kill the mysqld-process on the server.
> 
> 2. I start mysqld_safe by typing; "mysqld_safe --skip-grant-tables &"
> 
> 3. Logged in as root, I type this shell> mysqladmin -u root
> flush-privileges password "my_wanted_password"
> 
> 4. I try to login as root to the MySQL-server, by typing: shell> mysql
> -u root -p (then entering my password in the dialogue) - and I get the
> following error-message; "ERROR 1045: Access denied for user:
> '[EMAIL PROTECTED]' (Using password: YES"
> 
> Any remedy for this?
> 
> Thanks.
> 
> 
> On Mar 29, 2005 10:48 AM, Gleb Paharenko <[EMAIL PROTECTED]> wrote:
> > Hello.
> >
> > Add '[EMAIL PROTECTED]' account.
> >
> >
> > >I did this;
> >
> > >
> >
> > >050328 16:20:57   7 Query   GRANT ALL PRIVILEGES ON *.* TO
> >
> > >root@'%'
> >
> > >GRANT ALL PRIVILEGES ON *.* TO root@'%'
> >
> > >
> >
> > >Yet still I get 050328 16:21:08   8 Connect Access denied for
> >
> > >user: '[EMAIL PROTECTED]' (Using password: YES)
> >
> > >
> >
> > >050328 16:13:33   4 Connect Access denied for user:
> >
> > >'[EMAIL PROTECTED]' (Using password: YES)
> >
>

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



Re: access-trouble using root

2005-04-05 Thread X y
I do the following;



1. I kill the mysqld-process on the server.


2. I start mysqld_safe by typing; "mysqld_safe --skip-grant-tables &"


3. Logged in as root, I type this shell> mysqladmin -u root
flush-privileges password "my_wanted_password"


4. I try to login as root to the MySQL-server, by typing: shell> mysql
-u root -p (then entering my password in the dialogue) - and I get the
following error-message; "ERROR 1045: Access denied for user:
'[EMAIL PROTECTED]' (Using password: YES"


Any remedy for this?



Thanks.





On Mar 29, 2005 10:48 AM, Gleb Paharenko <[EMAIL PROTECTED]> wrote:
> Hello.
> 
> Add '[EMAIL PROTECTED]' account.
> 
> 
> >I did this;
> 
> >
> 
> >050328 16:20:57   7 Query   GRANT ALL PRIVILEGES ON *.* TO
> 
> >root@'%'
> 
> >GRANT ALL PRIVILEGES ON *.* TO root@'%'
> 
> >
> 
> >Yet still I get 050328 16:21:08   8 Connect Access denied for
> 
> >user: '[EMAIL PROTECTED]' (Using password: YES)
> 
> >
> 
> >050328 16:13:33   4 Connect Access denied for user:
> 
> >'[EMAIL PROTECTED]' (Using password: YES)
>

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



and some more on the root-access issue;

2005-03-28 Thread X y
I tried the flush-privileges command and got the following; 




mysqladmin flush-privileges
mysqladmin: reload failed; error: 'Access denied. You need the RELOAD
privilege for this operation'

-


So, how can I set full access-rights to root the easiest way?


(thank you)



N.P

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



access-trouble using root

2005-03-27 Thread X y
Over on http://forums.mysql.com/read.php?10,20058,20058#msg-20058 I
posted a msg connected to me having trouble to login to my MySQL
database handler.

I might save some space here in your email by asking you to go to the
above forum-thread, and my last post in the thread goes;

Ok, so I did the following;

1. Stop mysqld and restart it with the --skip-grant-tables option as
described earlier.

2. Connect to the mysqld server with this command: shell> mysql -u root

3. Issue the following statements in the mysql client: mysql> UPDATE
mysql.user SET Password=PASSWORD('newpwd')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;

Replace ``newpwd'' with the actual root password that you want to use.

4. You should be able to connect using the new password.

I got the following result;

mysql> UPDATE mysql.user SET Password=PASSWORD('my_password') WHERE User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 5 Changed: 0 Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

The thing is that this doesn't work, and I suspect that somehow,
webmin and my browser happened to remove some privileges of thr root
user while changing password through mentioned webmin.

I can't login to mysql neither via the shell as root using "mysql -u
root -p" (without the -p it works, but then I don't seem to be able to
do anything), neither can I login via webmin's interface using "root"
as my password and my assigned password.

My follow-up question is; where are these settings stored, and how can
I change back so that root has full access-rights again???

Thanks in advance!!!

N.P

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



Re: Data Standards on Database Export->Import

2005-03-24 Thread Z X C V
Stephen,
That is interesting... The DBA and Oracle programmers are really raising 
an issue on the difficulties of this extraction. We can use a ~ delimited 
file but were told to give "our" standards. To which now they are saying 
is out of time scope.

Thank you for this information since it gives us some help understanding 
their side of the issue.

A view would be the best but that is a REALLY bad idea... At least in 
their opinion.

R.
On Wed, 23 Mar 2005, Stephen Andert wrote:
Actually, exporting data from an Oracle database is one of the weak
spots of Oracle.  Oracle makes it easy to get data in, but hard to get
it back out.  There are ways to do it, but nothing easy that an Oracle
DBA will have if they only read the Oracle docs.  Spooling an output
file can get tedius if there are a lot of columns in the table or many
tables.
There are a number of freeware and open source solutions as well as
third party solutions, but in most cases, a good DBA should be able to
develop some dynamic scripts to get the data out in the format you
need.  Features like the use of LONG datatypes may throw a monkey
wrench in the works.
Good luck.
Stephen
(Sr Oracle DBA by day - Jr MySQL DBA by night)
On Tue, 22 Mar 2005 10:48:53 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Z X C V <[EMAIL PROTECTED]> wrote on 03/21/2005 08:32:24 PM:
Hello,
Are there any good rfcs or other documents that would assist in the
discussion I'm having with our organization's Oracle programmers in
regards the following:
Oracle DB -> MySQL
They recommend:
~ col~col ~col~ col'",~col
NOTE::I placed the '" in for a reason.
I am looking for:
"col","col","col","col\'\",","col"
Of course the "non-Oracle" system is being tasked as the problem in this

case for the "abnormal" data request.
Any help on this would be appreciated.
Rob.
Unfortunately I am not sure any document like you seek actually exists (at
least not in any modern literature). There are many ways to move data from
memory to media and the format of the data on the media is usually
determined by a number of factors (type of data, type of media, is the
data intended for human or machine use, etc.). So I am not sure there ARE
any standards for database export formatting (I did a quick Google and
didn't find any in the top 50 responses for the search: data export
standard format CSV (see notes below))...
To be honest, the mysqlimport and LOAD DATA INFILE facilities should be
flexible enough to read the tilde-delimited format that your Oracle guys
want to give you. If not, you should be able to ask them to either create
a tab-delimited or comma-delimited dump (both formats are so "ancient" as
to be /de facto/ standards and should be something that Oracle can create
without any difficulty). What you were asking for is a comma-delimited
format but you need some extra escaping to make it more MySQL compatible.
I think that the extra escaping is what's throwing a monkey-wrench into
the export process.
One viable option is for you to write a quick converter that re-parses
their tilde-delimited format into something properly escaped for MySQL. IF
you write it correctly, your format converter should be able to process
several megabytes of dumped data per second. Yes, it's a pain in the neck
to take the extra conversion step but sometimes we DBA's have to assemble
our own lemons before we get to make the lemonade.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Notes:
a non-normative description of the CSV format:
http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
An example data export screen, a "custom delimiter" of a tilde would
reproduce the format you are being offered:
http://www.jinfonet.com/manualpro/userguide/expt_txt.htm
Some export/import formats of various ecological data. Notice how many
there are: http://gce-lter.marsci.uga.edu/lter/data/formats.htm
A proposed format for "Thoughts" exchange:
http://www.ms.lt/importexport.html

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

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


Data Standards on Database Export->Import

2005-03-21 Thread Z X C V
Hello,
Are there any good rfcs or other documents that would assist in the 
discussion I'm having with our organization's Oracle programmers in 
regards the following:

Oracle DB -> MySQL
They recommend:
~ col~col ~col~ col'",~col
NOTE::I placed the '" in for a reason.
I am looking for:
"col","col","col","col\'\",","col"
Of course the "non-Oracle" system is being tasked as the problem in this 
case for the "abnormal" data request.

Any help on this would be appreciated.
Rob.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Uninstall mysql

2004-04-22 Thread vasanthsena x
that solution doesnt work.if you are working on Xpyou
could a system restore.thats what I did.and then I
installed mysql again.

S.
--- "Tam, Michael" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I forgot to reply to the list instead.
> 
> This is a recap of what I sent to Vasanthsena x.  
> 
>   These are the steps I do when I have to uninstall
> it.
>   1. Stop mysqld (through service or manually using
> mysqladmin)
>   2. Remove mysqld service if you have setup the
> service.
>   3. Go to add/remove program in control panel to
> remove the
> application.
> 
> In addition to the above, since the uninstallation
> took place already,
> terminate mysqld through your task manager
> (ctrl+alt+delete).  If mysql
> service is still there, use your CMD prompt, go to
> mysql bin directory and
> run 'mysqld --remove' to remove it.
> 
> Cheers,
> Michael
> 
> -Original Message-
> From: vasanthsena x [mailto:[EMAIL PROTECTED]
> Sent: 21 April 2004 15:50
> To: [EMAIL PROTECTED]
> Subject: Uninstall mysql
> 
> 
> Hi,
> 
> I tried to uninstall mysql from win Xp.however it
> did
> not remove everything completely.I tried to remove
> the
> files manually but specifically it does not let me
> delete mysqld.exe.it says access denied.
> 
> Can anyone help me?I would to reinstall mysql.
> 
> S.
> 
> 
> 
>   
>   
> __
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25¢
> http://photos.yahoo.com/ph/print_splash
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



Uninstall mysql

2004-04-21 Thread vasanthsena x
Hi,

I tried to uninstall mysql from win Xp.however it did
not remove everything completely.I tried to remove the
files manually but specifically it does not let me
delete mysqld.exe.it says access denied.

Can anyone help me?I would to reinstall mysql.

S.





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



Re: Query Help 2

2003-12-18 Thread ¿n©_ ¡E¢X ¡¸
yes, it should work, but should not be 1,1 ?

or simply:

UPDATE RemoteStation SET company=LEFT(ID, 4);  ?


"gerald_clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How about:
> update RemoteStation set company=substring(ID,1,1);
>
> Jeff McKeon wrote:
>
> >Damn fat fingers and MS Outlook.  I sent the "Query Help" message before
> >I was finishes typing.  Sorry...
> >
> >I have two tables, customer table and a company table
> >
> >The customer table has an ID field that is 8 characters long.  The first
> >4 characters are the company code.
> >
> >We just added a company table that has an id field that contains that
> >companies id code.  We also added a field to the customer table that
> >will hold the company ID that the customer belongs to.  So.
> >
> >Customer table
> >
> >ID name company
> >12347771 joe null
> >12347772 mary null
> >43210001 bob null
> >
> >Company Table
> >
> >ID name
> >1234 Acme
> >4321 Acme_Europe
> >
> >What I now need to do is create an update statement that will match the
> >customer to the company by substring(Customer.ID,1,4) to Company.ID
> >
> >I tried:
> >
> >update RemoteStation set Company_ID=Company.ID where
> >substring(Company_ID,1,4) like Company.ID;
> >
> >But it didn't work.  Any suggestions?
> >
> >Thanks for the help,
> >
> >Jeff
> >
> >
> >
>
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>




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



date_format and DECODE Problem

2003-12-15 Thread Raimond X
Hi, i have a problem with getting the right return values from field purrdato.
 All records exept a few are set with date and the rest is NULL. The field allows Null 
values. when using: DATE_FORMAT(purrdato, '%d.%m.%Y') AS purrdato ...it even 
returns '00.00.' on null values.
Is there a way of solving this with DECODE??? I vould like it to return '' instead of 
'00.00.000' for null values. This is the sql:
 
SQL = "SELECT OrgNr, Firmanavn, Kontakt, Sted, Telefon, Ansatte, eier, Slettet, aktiv, 
DATE_FORMAT(purrdato, '%d.%m.%Y') AS purrdato, TIME_FORMAT(purrtid, '%H:%i') AS 
purrtid FROM Kunder WHERE eier LIKE '" & Node.Key & "' ORDER BY Slettet, purrdato, 
purrtid, aktiv, Postnr, FirmaNavn"

Ny versjon av Yahoo! Messenger 
Nye ikoner og bakgrunner, webkamera med superkvalitet og dobbelt så morsom

newbie question, link tables

2003-07-07 Thread Pedro X Gomes-Fabre
Hi all,

Can I link two fields in two tables, in the way that if I add a new value 
into a table in the other table the value is added automatically, or Do 
I need to add the values one time for every table?

Thanks for helping me.
Pedro


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



new to databases, multiple relations

2003-07-07 Thread Pedro X Gomes-Fabre
Hi all,

I have to create a database where the elements of a table are related to 
elements on the same table. What is the best (optimised) way to do that?

I came with the model:

CREATE TABLE locations(
  location_id   int(11) auto_increment,
  location_name varchar(50) NOT NULL default '',
  UNIQUE KEY idx1 (id)
) type MyISAM;

CREATE TABLE relations(
  relation_id   int(11) auto_increment,
  location_id1  int(11) NOT NULL,
  location_id2  int(12) NOT NULL,
  distance  float   NOT NULL default '0',
  UNIQUE KEY idx1 (location_id1, location_id2)
  UNIQUE KEY idx2 (relation_id)
) type MyISAM;



And the query will be like:

SELECT location_name, location_name, distance
FROM   locations AS l, relations AS r
WHERE  l.location_id=r.location_id1
ANDl.location_id=r.location_id2;


Thanks for your help
Pedro


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



Uploading scripts in MySQLGUI

2003-06-26 Thread Tang, Sean X
Hi there,

 

Is there a way to upload a saved script file into the GUI window to
execute? On the GUI interface, there are SAVE, EXECUTE buttons. But I
cannot find anything for uploading, even copying functions.

 

Thanks  for the help.

 

Regards,

 

Sean Tang



MySQL newbie

2003-03-20 Thread Terry X
Hi, I just got involved into a project that uses MySQL. My team leader told 
me that most likely we have to change the file inside the source code of 
MySQL in order to use GSS API.

However, I am totally new to this area. I am wondering if there is any 
resource that I can find on the internet or any book that will talk about 
the C code of the MySQL(not the query language). In other word, are there 
any resourse that I can find that give me an overview of the files in MySQL?

Thank you so much

Sincerely
Terry




_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


RE: query only returns one row

2003-01-07 Thread X
Hmmm, this genereated the error message, "Parse error: parse error in
/directory/connect.php on line 12" - Line twelve is the first "printf..."
line.
Any suggestions?

Chris

-Original Message-
From: Ferhat Can [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 7:04 AM
To: [EMAIL PROTECTED]
Subject: Re: query only returns one row


Hi Chris,
You need to use a while loop to fetch all of the records returned in the
SELECT statement in PHP, as follows:
 \n", $row["DBID"];
  printf("First Name: %s\n",$row["FIRST_NAME"];
 printf("Last Name: %s\n", $row["LAST_NAME"];
 }
 ?>

- Original Message -
From: "Admin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 16:47
Subject: query only returns one row


>
>
> Hi,
>
> I finally established a connection to my db after I realized that it was
> located in a different directory than that which I kept placing my php
> files.  As some would say, "D'OH!"
>
> The code below is intended to select and display all 1300 names from the
> NAMES_TBL but is only returning the first row.  I'm still a bit new to php
> so this is probably something simple - a shove in the right direction
would
> be quite helpful.
>
> thanks!
>
> chris
>
>$db = mysql_connect("host", "user", "pwd");
>   mysql_select_db("dbname",$db);
>   $result = mysql_query("SELECT * FROM NAMES_TBL",$db);
>   printf("DBID: %s\n", mysql_result($result,0,"DBID"));
>   printf("First Name: %s\n", mysql_result
>   ($result,0,"FIRST_NAME"));
>   printf("Last Name: %s\n", mysql_result($result,0,"LAST_NAME"));
> ?>
>
> --
-
>
>
> -
> 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




timestamp bug increments by one day

2002-10-20 Thread Jay X
Hi There,

Just reciently (after no changes) my MySQL database is automatically
incrementing timestamps by one day.

Timestamp format is timestamp(14).

An example date would be 20021021143513

when I use command such as:
   INSERT INTO MyTable SET timestamp = 200210211143513;

and then:
   SELECT * FROM MyTable;

I get :


timestamp

200201221143513


This is happening on Redhat 7.1, MySQL Ver 11.15 Distrib 3.23.38, for
pc-linux-gnu (i686)

when I type:
   SELECT NOW();

I get the correct date, and when I type:
   INSERT INTO MyTable SET timestamp = NOW();

that also increments the timestamp by one day just like it does when I set 
the
timestamp manually.

Thanks,

Stuart


_
Surf the Web without missing calls! Get MSN Broadband. 
http://resourcecenter.msn.com/access/plans/freeactivation.asp


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

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



Server crash upon remote access

2002-10-16 Thread x-gylee+mysql

>Description:
MySQL server crashes when a remote client connects.
A local client connecting thru unix socket file does not have the problem.
>How-To-Repeat:
Connect via a remote host.
>Fix:
No solution yet.

>Submitter-Id:  
>Originator:Aldrian Gintingsuka
>Organization:
 
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:  Server crash upon remote access
>Severity:  critical
>Priority:  high
>Category:  mysql
>Class: sw-bug
>Release:   mysql-3.23.52 (Source distribution)

>Environment:

System: Linux www.indo.com 2.4.9-34 #1 Sat Jun 1 06:10:23 EDT 2002 i686 unknown
Architecture: i686

Some paths:  /usr/local/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.2 2.96-108.7.2)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Oct  7 07:43 /lib/libc.so.6 -> libc-2.2.4.so
-rwxr-xr-x1 root root  1285884 Sep  9 12:10 /lib/libc-2.2.4.so
-rw-r--r--1 root root 27336078 Sep  9 11:48 /usr/lib/libc.a
-rw-r--r--1 root root  178 Sep  9 11:48 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr/local/depot/mysql-new/mysql 
--localstatedir=/var/lib/mysql-new --enable-thread-safe-client --enable-assembler 
--with-unix-socket-path=/var/lib/mysql-new/mysql.sock --with-mysqld-user=mysql 
--without-debug --with-low-memory --without-docs --without-bench --with-berkeley-db


-
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




mysqldump not dumps MERGEd tables structure

2001-09-17 Thread Pedro X. Gomez

Hello people,

mysqldump not dumps MERGEd tables structure
it writes TYPE=MERGE and then UNION() with empty parenthesis
so this """dump""" can not be used.

-- 
Best regards,
 Pedro  mailto:[EMAIL PROTECTED]



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

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




Novice Data Import Question

2001-09-04 Thread X

I am just getting my feet wet in PHP and MySQL.

I'm using PHPMyAdmin to administer my databases online, and I'm having 
trouble importing data from a textfile over the Internet.  It imports 
one record perfectly and then stops.  It gives me no errors.

I have checked access privileges, and indeed I have full privileges.

I would appreciate any help I can get.

Thanks,
Rookie
Jay Witherspoon

-
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 libmysqlclient.so.10.0

2001-08-12 Thread X Lsi Maillard

> # httpd
> /usr/libexec/ld.so: httpd: libmysqlclient.so.10.0: No such file or
directory
>
> but I can locate the file at these tree places at the server, so where do
i
> have to place the file before the server can see it does exist. ?
>
> /usr/local/lib/mysql/libmysqlclient.so.10.0
>
/usr/ports/databases/mysql/work/fake-i386/usr/local/lib/mysql/libmysqlclient
> .so.10.0
>
/usr/ports/databases/mysql/work/mysql-3.23.37/libmysql/.libs/libmysqlclient.
> so.10.0

try editing your /etc/ld.so.conf file and see if one of the paths you
mentionned are listed into.

If not you can try to add one, else you can make a link to the lib into
/usr/lib or into a dir that is into your LD_LIBRARY_PATH variable.

There are other ways to do that but these are the simplest.

Regards.


-
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




floor/ceiling with myodbc

2001-08-03 Thread Kevin X Lin

Hi there,

I'm running into problems with functions "floor/ceiling" when I use
Visual Basic to talk to mySQL through myODBC.

My code looks like this:
sSQL = "select floor(3.2)"
Set rs = MySQL_conn.Execute(sSQL)

I got rs.eof = true after execution of the query. However the following
codes works fine.
sSQL = "select round(3.2)"
Set rs = MySQL_conn.Execute(sSQL)
rs.fields(0)=3

Can anyone tell if this is a bug of myODBC or VB's problem?



-
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: Re: distinct / limit optimization

2001-07-02 Thread X Gogo

Hi,

I've been using 3.23.37 source tarball compiled for Linux 2.2.19. Now I 
upgraded to 3.23.39 but still the same result... Anyway, it's not that 
important - I was just wondering why SELECT DISTINCT ... LIMIT is slower than 
the
one without LIMIT. It's not crucial for my application and
does not prevent MySQL from being my favourite cup of database tea :)

Thanx!
George


- èçõîäíî ñúîáùåíèå -
Îò:  Sinisa Milivojevic <[EMAIL PROTECTED]>
Òåìà:  Re: Re: distinct / limit optimization

>X Gogo writes:
>> Well, the order in which the queries are made doesn't matter. The query 
>with 
>> LIMIT is always slower than the one
>> without it. When I used EXPLAIN SELECT... I actually
>> found that MySQL uses temporary table for the query with
>> the DISTINCT / LIMIT combination. I presume this slows it down.
>> 
>> Be well :)
>> 
>> George
>> 
>
>What version of MySQL are you using ??
>
>If not the last available, give it a try.
>
>-- 
>Regards,
>   __  ___ ___   __
>  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
> / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
>/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
>   <___/   www.mysql.com

Áåçïëàòíà ïîùåíñêà ñëóæáà http://mail.Rambler.bg/

-
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: distinct / limit optimization

2001-06-29 Thread X Gogo

Well, the order in which the queries are made doesn't matter. The query with 
LIMIT is always slower than the one
without it. When I used EXPLAIN SELECT... I actually
found that MySQL uses temporary table for the query with
the DISTINCT / LIMIT combination. I presume this slows it down.

Be well :)

George

- èçõîäíî ñúîáùåíèå -
Îò:  Gerald Clark <[EMAIL PROTECTED]>
Òåìà:  Re: distinct / limit optimization

>Because it wasn't in system cache yet?
>
>X Gogo wrote:
>
>> Hi,
>> 
>> I've tried the folowing query:
>> SELECT DISTINCT column1 FROM table1 LIMIT 10;
>> and got the result for 0.23 sec.
>> Then I've tried the same query without limit:
>> SELECT DISTINCT column1 FROM table1;
>> and got the result for 0.01 sec. which is some 23 times
>> faster. There are about 1 rows in table1 and column1
>> has an index. I've read in the manual that MySQL uses optimization when 
>you 
>> combine DISTINCT with LIMIT n that would make it stop as soon as it finds 
>n 
>> unique rows.
>> Why then the first query that uses LIMIT is considerably slower?
>> 
>> George
>> 
>> Áåçïëàòíà ïîùåíñêà ñëóæáà http://mail.Rambler.bg/
>> 
>> -
>> 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
>
>
>-- 
>Gerald L. Clark
>[EMAIL PROTECTED]
>

Áåçïëàòíà ïîùåíñêà ñëóæáà http://mail.Rambler.bg/

-
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




distinct / limit optimization

2001-06-29 Thread X Gogo

Hi,

I've tried the folowing query:
SELECT DISTINCT column1 FROM table1 LIMIT 10;
and got the result for 0.23 sec.
Then I've tried the same query without limit:
SELECT DISTINCT column1 FROM table1;
and got the result for 0.01 sec. which is some 23 times
faster. There are about 1 rows in table1 and column1
has an index. I've read in the manual that MySQL uses optimization when you 
combine DISTINCT with LIMIT n that would make it stop as soon as it finds n 
unique rows.
Why then the first query that uses LIMIT is considerably slower?

George

Áåçïëàòíà ïîùåíñêà ñëóæáà http://mail.Rambler.bg/

-
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: UPDATE and ORDER BY troubles

2001-06-05 Thread X Gogo

Well, Jeff you are right! I've just taken the
wrong line from .mysql_history file. It was one
of my thousands of tries to make the ORDER BY work
with UPDATE. What I really try to do is ORDER BY
the 'received' column, which is a timestamp.
The point is if I have plenty of alarm messages
which are not parsed I would like to take and parse
the one that has come first in time. And because
this is done from concurent clients it is crucial
to parse it with just one update query and
not with ordered select and then update.
So here is the real query:

mysql> UPDATE alarms SET is_parsed=1 WHERE is_parsed=0
   ORDER BY received LIMIT 1;

ERROR 1064: You have an error in your SQL syntax near 
'ORDER BY received LIMIT 1' at line 1

What I found is that UPDATE  SET  WHERE  ORDER BY 
never works in MySQL no matter what your table looks like.
And according to MySQL manual the UPDATE synthax is:

 UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
 SET col_name1=expr1, [col_name2=expr2, ...]
 [WHERE where_definition]
 [ORDER BY ...]
 [LIMIT #]


Is this a bug in MySQL or the manual is not correct?!?
Has anyone managed to use ORDER BY with an UPDATE statement?
Thank you in advance!

George


Jeff wrote:
>Why do you need the ORDER BY clause?  Can you take it out? 
>For example:
>
>UPDATE alarms SET is_parsed=1 WHERE is_parsed=0 LIMIT 1;
>
>I just don't think the ORDER BY clause could serve any 
>useful purpose there
>and appears to actually cause problems.
>
>Good luck,
>Jeff

>>-Original Message-
>>Hi!
>>
>>The MySQL manual states that you can use ORDER BY in 
>>combination with the UPDATE statement.
>>So I tried to use it, but it didn't work. 
>>Here is the sql query that's causing the trouble:
>>
>>mysql> UPDATE alarms SET is_parsed=1 WHERE is_parsed=0
>>   ORDER BY is_parsed LIMIT 1;
>>
>>ERROR 1064: You have an error in your SQL syntax near
>>'order by is_parsed limit 1' at line 1
>>
>>The same error happens when I don't use LIMIT:
>>
>>mysql> UPDATE alarms SET is_parsed=1 WHERE is_parsed=0
>>   ORDER BY is_parsed;
>>
>>ERROR 1064: You have an error in your SQL syntax near
>>'order by is_parsed' at line 1
>>
>>Here is the table's structure:
>>
>>CREATE TABLE alarms (  
>>  serial int(10) unsigned NOT NULL auto_increment,
>>  sys_num tinyint(2) unsigned NOT NULL default '1',
>>  rtu_num smallint(4) unsigned NOT NULL default '0',
>>  status char(2) NOT NULL default 'XX',
>>  received datetime default NULL,
>>  device tinyint(2) unsigned NOT NULL default '0',
>>  is_parsed tinyint(1) unsigned NOT NULL default '0',
>>  PRIMARY KEY  (serial),
>>  KEY is_parsed (is_parsed),
>>  KEY rtu_num (rtu_num)
>>) TYPE=MyISAM;

Áåçïëàòíà ïîùåíñêà ñëóæáà http://mail.Rambler.bg/

-
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




UPDATE and ORDER BY troubles

2001-06-04 Thread X Gogo

Hi!

The MySQL manual states that you can use ORDER BY in combination with the 
UPDATE statement.
So I tried to use it, but it didn't work. Here is the sql query that's causing
the trouble:

mysql> UPDATE alarms SET is_parsed=1 WHERE is_parsed=0 ORDER BY is_parsed LIMIT 
1;

ERROR 1064: You have an error in your SQL syntax near 'order by is_parsed limit 
1' at line 1

The same error happens when I don't use LIMIT:

mysql> UPDATE alarms SET is_parsed=1 WHERE is_parsed=0 ORDER BY is_parsed;

ERROR 1064: You have an error in your SQL syntax near 'order by is_parsed' at 
line 1


Here is the table's structure:


CREATE TABLE alarms (
  serial int(10) unsigned NOT NULL auto_increment,
  sys_num tinyint(2) unsigned NOT NULL default '1',
  rtu_num smallint(4) unsigned NOT NULL default '0',
  status char(2) NOT NULL default 'XX',
  received datetime default NULL,
  device tinyint(2) unsigned NOT NULL default '0',
  is_parsed tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (serial),
  KEY is_parsed (is_parsed),
  KEY rtu_num (rtu_num)
) TYPE=MyISAM;



When I first noticed the problem, I was running mysql 3.23.34a source 
distribution
on a Slackware Linux 7.1. Then I upgraded to 3.23.37 but the problem remains.
Could you plese help me! What am I doing wrong here?
Thank you in advance!

George

Áåçïëàòíà ïîùåíñêà ñëóæáà http://mail.Rambler.bg/

-
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




unsignes short columns translation - ???

2001-04-19 Thread Pedro X. Gomez

Hello people,

Anyone know how can I _useful_ (without data loss) link
database with tables contains unsigned short columns
thru MyODBC for ugly systems like M$ Access ???

I send this message to MyODBS list, but have no answer...


  

-- 
Best regards,
 Pedro  mailto:[EMAIL PROTECTED]



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

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




RE: Connection_from_Java

2001-03-31 Thread M a x i m i l i a n o L u c i u s

Fernando,

Te sugiero que veas la página http://mmmysql.sourceforge.net/ por un JDBC y
en su docs vas a encontrar ejemplos de como resolver tu problema.
Si necesitas mayo ayuda, no tengo problema en enviarte porciones de código
donde se resulve este problema.

Maximiliano.
- Original Message -
From: F P <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 31, 2001 9:09 AM
Subject: Connection_from_Java


> Dear MySQL Team
> first of all, excuse my English.  I'm from Argentina,
> I'm a java developer and use MySQL database.
> I connect to MySQL to Type4 Driver JDBC fron Java.
> I have one machine with Mysql server in port 3306 and
> another machine with an application in Java.
> I want to know how to start a client, and also how to
> write a URL to call a database?
> Could you send me please an example to connect and use
> databases with SSH.
> I look forward to hearing from you soon.
> Yours faithfully.
> e-mail:[EMAIL PROTECTED]
> Name:Fernando A Perez
> Address:12 de Abril 277
> CP:3280
> Provincia:Entre Rios
> Pais:Argentina
> Tel:054 03447 424385
>
>
> _
> ¿Lo probaste?
> Correo gratis y para toda la vida en http://correo.yahoo.com.ar
>
> -
> 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




configure fails on aix 3.4.0

2001-03-15 Thread Jack Summanen x

>Description:

Compiling Mysql for aix.  I receive an error saying char size is 0, I noticed 
that another file is looked up and it is not present. "conftestval"
>How-To-Repeat:

I have set my c compiler and c++ compiler to gcc, then entered the following, 
you should set your directories to the aprpriate values:
./configure --prefix=/ss5/mysql/ --localstatedir=/ss5/mysql/data 
--with-unix-socket-path=/ss5/mysql/mysql.sock
>Fix:

None known yet...

>Submitter-Id:  [EMAIL PROTECTED]
>Originator:Jack Summanen x
>Organization:
 
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:   configure fails on aix 3.4.0
>Severity:   critical
>Priority:   medium
>Category:  mysql
>Class:  sw-bug
>Release:   mysql-3.23.29a-gamma (Source distribution)

>Environment:

System: AIX cypress 3 4 00049115A000


Some paths:  /usr/local/bin/perl /bin/make /usr/local/bin/gcc /bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix4.1/2.7.0/specs
gcc version 2.7.0
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx   1 bin  bin   19 Oct  3 1999  /lib/libc.a -> 
/usr/ccs/lib/libc.a
lrwxrwxrwx   1 bin  bin   19 Oct  3 1999  /usr/lib/libc.a -> 
/usr/ccs/lib/libc.a
Configure command: ./configure  --prefix=/ss5/java/jack/mysql_platforms/sol/mysql 
--localstatedir=/ss5/java/jack/mysql_platforms/sol/mysql/data 
--with-unix-socket-path=/ss5/java/jack/mysql_platforms/sol/mysql/mysql.sock
Perl: This is perl, version 5.002

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

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




MySQL crashes permanently on FreeBSD thru signal 11 or 10

2001-03-11 Thread Pedro X. Gomez
edule
process_alarm: info: sig: 14 active alarms: 1
?func: general: Capabilities: 8333  packet_length: 0  Host: 'localhost'  User: 
'fish_reader'  Using password: yes  Access: 0  db: '*none*'
mysql_change_db: general: Use database: fishery
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
thr_alarm: info: reschedule
process_alarm: info: sig: 14 active alarms: 1
do_command: general: Command on socket (9) = 3 (Query)
do_command: query: 
CREATE TEMPORARY TABLE IF NOT EXISTS temp.ves_name_tmp
(
id_ves SMALLINT UNSIGNED NOT NULL,
ves CHAR(30) NOT NULL,
PRIMARY KEY( id_ves )
)

my_chsize: info: old_size: 4096
my_chsize: info: old_size: 347
do_command: info: query ready
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
thr_alarm: info: reschedule
do_command: general: Command on socket (9) = 3 (Query)
do_command: query: 
SELECT
*
FROM
ves
WHERE
id_ves = 15017
AND date_expiration_ves IS NULL
ORDER BY
date_registration_ves DESC
LIMIT
1

mi_get_status: info: key_file: 287744  data_file: 3384858

WHERE:(original) ((ves.id_ves = 15017) and isnull(ves.date_expiration_ves))

WHERE:(after const change) ((ves.id_ves = 15017) and isnull(ves.date_expiration_ves))

WHERE:(after remove) ((ves.id_ves = 15017) and isnull(ves.date_expiration_ves))
test_quick_select: info: Time to scan table: 2213
_mi_search_pos: info: keynr: 31  offset: 1  max_keynr: 112  nod: 0  flag: 0
_mi_search_pos: info: keynr: 41  offset: 0.283186  max_keynr: 61  nod: 3  flag: 1
_mi_search_pos: info: keynr: 32  offset: 1  max_keynr: 112  nod: 0  flag: 1
_mi_search_pos: info: keynr: 41  offset: 0.292035  max_keynr: 61  nod: 3  flag: 1
mi_records_in_range: info: records: 1
_mi_search_pos: info: keynr: 74  offset: 1  max_keynr: 169  nod: 0  flag: 0
_mi_search_pos: info: keynr: 27  offset: 0.441176  max_keynr: 40  nod: 3  flag: 1
_mi_search_pos: info: keynr: 75  offset: 1  max_keynr: 169  nod: 0  flag: 1
_mi_search_pos: info: keynr: 27  offset: 0.447059  max_keynr: 40  nod: 3  flag: 1
mi_records_in_range: info: records: 1
Used quick_range on key: 0 (other_keys: 0):
15017 <= X <= 15017

WHERE:(ves) isnull(ves.date_expiration_ves)

Info about JOIN
ves   type: ref  q_keys:3  refs: 1  key: 0  len: 2
  select used
  refs: 15017  
mysql_select: info: Sorting for send_fields

Info about FILESORT
Sortorder: -ves.date_registration_ves
filesort: info: sort_length: 3
find_all_keys: info: using: ranges
do_select: info: 1 records output
do_command: info: query ready
close_thread_tables: info: thd->open_tables=0x181e4000
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
thr_alarm: info: reschedule
process_alarm: info: sig: 14 active alarms: 1
process_alarm: info: sig: 14 active alarms: 1
do_command: general: Command on socket (9) = 3 (Query)
do_command: query: 
INSERT IGNORE INTO temp.ves_name_tmp
VALUES( 15017, 'áíáòåìø' )

do_command: info: query ready
(skipping)
---

some records GREPping out of trace for word "err"

mi_rnext: error: Got error: -1,  errno: 137
vio_read: error: Got error 35 during read
?func: info: vio_read returned -1,  errno: 35
vio_read: error: Got error 35 during read
?func: info: vio_read returned -1,  errno: 35
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
vio_read: error: Got error 35 during read
do_command: info: vio_read returned -1,  errno: 35
vio_read: error: Got error 35 during read

(and so on... server remains live for a while)

---
(as U see, error 35 is the norm of our life...)


Unfortunately, we often have problems with MySQL instability when
serving "large" databases (>500 Meg), on different hardware and with 
different versions of FreeBSD and MySQL. May it be so that this 
problem is FreeBSD-specific? Analysi