Re: mysqld-nt vs. mysql-max-nt

2003-10-25 Thread Victoria Reznichenko
"Allen Weeks" <[EMAIL PROTECTED]> wrote:
> 
> I can't seem to find any documentation or opinions that would help me decide
> if it is better to run mysqld-max-nt over the non-max server.
> 
> Opinions and pointers to supporting docs would be very welcome (especially
> pointer to docs).
> 

All MySQL servers with description are listed at:
http://www.mysql.com/doc/en/Windows_prepare_environment.html


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





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



Re: Update from other table

2003-10-25 Thread Victoria Reznichenko
"William IT" <[EMAIL PROTECTED]> wrote:
> Does MySQL support update from other table?
> 
> I run this query and get error:
> 
>UPDATE TableA SET Division=TableB.Division
>FROM TableB 
>WHERE TableA.Code=TableB.Code
> 

Since version 4.0.4 you can do:

UPDATE TableA, TableB
SET TableA.Division=TableB.Division
WHERE TableA.Code=TableB.Code



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





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



Re: Optimizing table (so-called VACUUM on postgreSQL) and InnoDB

2003-10-25 Thread Kaarel

In InnoDB, the VACUUM is called the purge. In InnoDB purge happens
automatically in the background, the user does not need to explicitly run
VACUUM, like in PostgreSQL. Also in Oracle purge is automatic.
Recent versions of PostgreSQL have the ability to this automagically too.

Kaarel

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


currency precision with decimal row

2003-10-25 Thread Jean-Pierre Schwickerath
Hello!


I'm trying to write some kind of small accounting software and I got
stuck with the problem that doing a SUM() on values of a DECIMAL(7,2)
row did show problems with (relatively) small values (like 173.58). I
found a message explaining that mysql uses doubles internly to compute
the values and this would explain the behaviour. 

Now my question is how should one go around the problem for now? I
decided to use UNSIGNED INT and do a division by 100 after retrieving
a value (or a multiplication by 100 before storing a value) in the
language of the application (php). 
Is there another better way to do it?


Regards, 

Jean-Pierre
-- 
Powered by Linux From Scratch - http://schwicky.net/
PGP Key ID: 0xEE6F49B4 - AIM/Jabber: Schwicky - ICQ: 4690141

Nothing is impossible... Everything is relative!

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



How to use the C API? (_not_ C++)

2003-10-25 Thread Patrik Fimml
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I'm currently writing a Services Daemon for a new IRC Network. We're using
MySQL, because it's fast, and we easy can access it via PHP.
But then the problem is, how to access in C? I saw the C API, tried to include
it many times - it didn't work.

So maybe someone can explain me how to include the C API? I hope so.

Patrik Fimml
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iQEVAwUBP5pgtZFyPD7t0rMPAQJJIQf+J1f9Ee7bAPdtwLvdkSmuMs9OHGaIar8w
Tf9Ba7S7aHhU/bvvfjh/AHXGn0tcu8MdLGqZKhuc+cEEfGuNrgnXJXEjGnV4+RvL
EdR668j28NHPxn32uixZyMnS46aU1jzRV89IlcTMeiVXqc8vdc/YEesjwzCnZ1Un
TXPY3c+hRYfkOvQvd9DduYpCQ87M3B1nWSALFdrYD31cJxU7kCmLJshXm76QJZ3w
fhwnjvxI2/gaiJAsXT6tzoS6TrQYm9UsQF2rxm1n8d2YUwfgGaoLZ9nNsdDan+ls
jWQzRh0vWdjiPY1UIMTfXVttOly9jSuTMQXjYc4SD9EhLtLKGEr+lQ==
=nglP
-END PGP SIGNATURE-


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



Re: currency precision with decimal row

2003-10-25 Thread Roger Baklund
* Jean-Pierre Schwickerath
> I'm trying to write some kind of small accounting software and I got
> stuck with the problem that doing a SUM() on values of a DECIMAL(7,2)
> row did show problems with (relatively) small values (like 173.58). I
> found a message explaining that mysql uses doubles internly to compute
> the values and this would explain the behaviour.
>
> Now my question is how should one go around the problem for now? I
> decided to use UNSIGNED INT and do a division by 100 after retrieving
> a value (or a multiplication by 100 before storing a value) in the
> language of the application (php).
> Is there another better way to do it?

I think your solution is the best. That way you avoid the spooky floating
point values, and you have full control of the precision of your
calculations. Note that even if you use DECIMAL, a so-called exact numeric
type, all calculations are done using approximate types (float/double, i.e.
floating point operations).

http://www.mysql.com/doc/en/Numeric_types.html >
http://www.mysql.com/doc/en/Problems_with_float.html >

--
Roger


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



Re: Enquiry on rhe use of MySQL

2003-10-25 Thread Roger Baklund
* Lay Hoon Tan
> I've just installed MySQL on my PC but do not know which program to access
> in order to use it. Does anyone knows ?

MySQL is first and foremost a database server. To use any server software,
you must run it, and then access it using separate client programs.

The MySQL server process is called "mysqld". On windows it is often run as a
service, on *nix it is normally run as a daemon, often using a utility
called mysqld_safe or safe_mysqld.

http://www.mysql.com/doc/en/NT_start.html >
http://www.mysql.com/doc/en/mysqld_safe.html >

For the client-side you can use a programming language of your choice:

http://www.mysql.com/doc/en/Clients.html >

... or you can use the standard client called "mysql", which will let you
enter DDL and SQL statements:

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

There are also some other usefull client-side tools in the standard
distribution:

http://www.mysql.com/doc/en/Client-Side_Overview.html >

Finally there is a lot of third-party clients and software, some of it can
be found here:

http://www.mysql.com/portal/software/index.html >

--
Roger


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



Re: InnoDB errors

2003-10-25 Thread Heikki Tuuri
Shane,

it is not an InnoDB error message. InnoDB messages are always prefixed with

InnoDB:

The error means that there is an inconsistent row in the db.MYD system table
of MySQL.

Best regards,

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


- Original Message - 
From: "Shane Allen" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Friday, October 24, 2003 9:22 PM
Subject: InnoDB errors


> I've searched the archives and was unable to find anything that seemed
> pertinent.
>
> Earlier today I had to stop and start mysql. When I issued mysqladmin
> shutdown, however, the process did not die cleanly (reason unknown), and I
> ended up having to kill -9 mysqld and mysqld_safe.
>
> When the DB came back up, I now have the following in my log:
>
> 031024 11:06:04  mysqld started
> 031024 11:06:05  InnoDB: Database was not shut down normally.
> InnoDB: Starting recovery from log files...
> InnoDB: Starting log scan based on checkpoint at
> InnoDB: log sequence number 0 697473956
> InnoDB: Doing recovery: scanned up to log sequence number 0 697473956
> 031024 11:06:06  InnoDB: Flushing modified pages from the buffer pool...
> 031024 11:06:06  InnoDB: Started
> 031024 11:06:06  Found an entry in the 'db' table with empty database
name;
> Skipped
> 031024 11:06:06  Found an entry in the 'db' table with empty database
name;
> Skipped
>
> ...
>
> 031024 11:07:53  mysqld started
> 031024 11:07:54  InnoDB: Started
> 031024 11:07:54  Found an entry in the 'db' table with empty database
name;
> Skipped
> 031024 11:07:54  Found an entry in the 'db' table with empty database
name;
> Skipped
>
> as you can see, on the second restart, I did not get warnings about having
> to recover the tables, but I still get the 'empty database name' errors.
> How can I determine what the cause of this error is an get it fixed?
>
> Thanks in advance.
>
>
> -- 
> 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]



Loss of synchronization

2003-10-25 Thread Michael Bacarella
We are replicating our database server in the interests of
having a hot spare with a fully up to date dataset.

Every so often, I'll get a page from a watchdog script[1] telling
me that the slave has fallen out of sync.  Perhaps every 10 days
this occurs.  

I notice there's always a coincidence of the slave disconnecting and
reconnecting to the master a few minutes before this occurs:

031025  6:24:06  Error reading packet from server: Lost connection to MySQL server 
during query (server_errno=2013)
031025  6:24:06  Slave: Failed reading log event, reconnecting to retry, log 
'dbms2-bin.318' position 26879196
031025  6:24:06  Slave: reconnected to master '[EMAIL PROTECTED]:3306',replication 
resumed in log 'dbms2-bin.318' at position 26879196
ERROR: 1062  Duplicate entry '3133173' for key 2
031025  9:32:35  Slave:  error running query [**insert that failed goes here**]
031025  9:32:35  Error running query, slave aborted. Fix the problem, and re-start the 
slave thread with "mysqladmin start-slave". We stopped at log 'dbms2-bin.319' position 
68555844
031025  9:32:35  Slave thread exiting, replication stopped in log 'dbms2-bin.319' at 
position 68555844

Is the error disconnect/reconnect not sync-safe?

[1] The watchdog script checks to make sure the that a frequently
  updated table has a row with timestamp younger than 5 minutes on
  the slave.

-- 
Michael Bacarella24/7 phone: 1-646-641-8662
Netgraft Corporation   http://netgraft.com/

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



Re: How to use the C API? (_not_ C++)

2003-10-25 Thread bluejack
10/25/03 4:38:26 AM, Patrik Fimml <[EMAIL PROTECTED]> wrote:

>I'm currently writing a Services Daemon for a new IRC Network. We're using
>MySQL, because it's fast, and we easy can access it via PHP.
>But then the problem is, how to access in C? I saw the C API, tried to include
>it many times - it didn't work.

If you're using PHP you want the Perl DBI stuff. The C API
is for C apps. If you are compiling a C application and
are having trouble linking, post your specific issues and
I'll be glad to help.

-bluejack





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



Login

2003-10-25 Thread Daniel Kiss
Hi,

Does MySQL use other port(s) for network communicaton than the default 3306, or this 
is the only one.

The reason why I ask it that I set up a firewall and I left this port open. But 
somehow, I cannot login from outside. The firewall is definitely configured well, and 
lets the 3306 port packages go through normally.

Thanks,
niel



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



Re: Login

2003-10-25 Thread Chris Nolan
Hi!

Have you added users that are allowed to log in from hosts other than 
localhost?

Regards,

Chris

Daniel Kiss wrote:

Hi,

Does MySQL use other port(s) for network communicaton than the default 3306, or this is the only one.

The reason why I ask it that I set up a firewall and I left this port open. But somehow, I cannot login from outside. The firewall is definitely configured well, and lets the 3306 port packages go through normally.

Thanks,
niel


--
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]


mysql well suited for bibliographic data...

2003-10-25 Thread Miguel Maloney
Does Mysql support repeatability of fields and subfields?
and would it be well suited for a bibliographic database?

Regards,


Miguel Maloney
Email: [EMAIL PROTECTED]
Website: http://maloneyja.com


Re: Login

2003-10-25 Thread Daniel Kiss


Hi,

Yes, I have configured MySQL users as well.
Anyway, I have a user who is allowed from anywhere.

I have no other idea. The problem must be the firewall somehow, because if I switch it 
off, everything is ok. But when I switch it back on (with port 3306 opened) my MySQL 
server becomes unreachable from outside.
That's why I asked that MySQL used other ports than 3306.

Thanks,
        niel


> Hi!
>
>
> Have you added users that are allowed to log in from hosts other than
> localhost?
>
> Regards,
>
>
> Chris
>
>
> Daniel Kiss wrote:
>
>
>> Hi,
>>
>>
>> Does MySQL use other port(s) for network communicaton than the default
>> 3306, or this is the only one.
>>
>>
>> The reason why I ask it that I set up a firewall and I left this port
>> open. But somehow, I cannot login from outside. The firewall is
>> definitely configured well, and lets the 3306 port packages go through
>> normally.
>>
>>
>> Thanks,
>>niel




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



mysql well suited for bibliographic data...

2003-10-25 Thread Miguel Maloney
Does Mysql support repeatability of fields and subfields?
and would it be well suited for a bibliographic database?

Regards,

Miguel Maloney
Email: [EMAIL PROTECTED]
Website: http://maloneyja.com


Pictures In Table.

2003-10-25 Thread Braulio
What is the best method to use to include pictures in tables?  I am using
PHP.  I have several customers that I maintain their real estate site and
the maintenance is sometimes hectic.  I am thinking that having the photos
in a mysql table will make it easier to maintain these sites.

Thanks in advance, Braulio



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



Re: Login

2003-10-25 Thread Hassan Schroeder
Daniel Kiss wrote:

Anyway, I have a user who is allowed from anywhere.

I have no other idea. The problem must be the firewall somehow, 
> because if I switch it off, everything is ok. But when I switch
> it back on (with port 3306 opened) my MySQL server becomes
> unreachable from outside.
When you're troubleshooting a network-related problem, there's no
substitute for a "sniffer" to view what's actually happening on the
wire.
Ethereal  is easy to install (and GPL'd)...

FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



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


Re: Pictures In Table.

2003-10-25 Thread colbey

http://php.dreamwerx.net/forums/viewtopic.php?t=6
This code has served millions of binary objects (pics, files, etc)
for me with no problems..  good luck.


On Tue, 1 Jan 2002, Braulio wrote:

> What is the best method to use to include pictures in tables?  I am using
> PHP.  I have several customers that I maintain their real estate site and
> the maintenance is sometimes hectic.  I am thinking that having the photos
> in a mysql table will make it easier to maintain these sites.
>
> Thanks in advance, Braulio
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>

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



Re: mysql well suited for bibliographic data...

2003-10-25 Thread Brian Reichert
On Sat, Oct 25, 2003 at 12:47:16PM -0600, Miguel Maloney wrote:
> Does Mysql support repeatability of fields and subfields?
> and would it be well suited for a bibliographic database?

What is a 'subfield'?  And what do you mean by 'repeatability'?

> Regards,
> 
> 
> Miguel Maloney
> Email: [EMAIL PROTECTED]
> Website: http://maloneyja.com

-- 
Brian 'you Bastard' Reichert<[EMAIL PROTECTED]>
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA BSD admin/developer at large

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



Re: mysql well suited for bibliographic data...

2003-10-25 Thread bluejack
On Sat, 25 Oct 2003 15:41:10 -0400, Brian Reichert <[EMAIL PROTECTED]> wrote:

On Sat, Oct 25, 2003 at 12:47:16PM -0600, Miguel Maloney wrote:
Does Mysql support repeatability of fields and subfields?
and would it be well suited for a bibliographic database?
What is a 'subfield'?  And what do you mean by 'repeatability'?
I think he's talking OLCL type stuff, which is a legacy monstrosity
from before relational or object databases.
MySQL is a relational database, and if you want to jam a flatfile
structure into it, you are going to need to define your own
parsing routines for taking apart your fields and subfields.
Alternatively -- and perhaps someone has done this already -- you
could devise a relational schema that expresses the data as
expressed in your proprietary format such that your queries
could *generate* legacy formats, but would not be based on
them.
--bluejack 

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


compile error mysql-4.0.16

2003-10-25 Thread Richard Pijnenburg
dear list,
 
i've got the folowing compile error.
 
/bin/sh ../libtool --mode=compile gcc
-DDEFAULT_CHARSET_HOME="\"/usr/local/mysql\""
-DDATADIR="\"/data/mysql\""
-DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DDONT_USE_RAID  -I. -I.
-I.. -I./../include -I../include -I./.. -I.. -I..
/usr/local/openssl/include-O3 -DDBUG_OFF   -c -o libmysql.lo `test
-f libmysql.c || echo './'`libmysql.c
rm -f .libs/libmysql.lo
gcc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\"
-DDATADIR=\"/data/mysql\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\"
-DDONT_USE_RAID -I. -I. -I.. -I./../include -I../include -I./.. -I..
-I.. /usr/local/openssl/include -O3 -DDBUG_OFF -c libmysql.c -MT
libmysql.lo -MD -MP -MF .deps/libmysql.TPlo  -fPIC -DPIC -o
.libs/libmysql.lo
gcc: cannot specify -o with -c or -S and multiple compilations
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory `/usr/local/src/web/mysql-4.0.16/libmysql_r'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/web/mysql-4.0.16'
make: *** [all] Error 2

i'm trying this with mysql-4.0.16, but i also got this with 4.0.15 and
4.0.15a
with 4.0.14 it's going good.
 
does anyone know how to solve this?
thanks in advance.


Compile error with Mysql-4.0.16

2003-10-25 Thread Richard Pijnenburg
dear list,
 
i've got the folowing compile error.
 
/bin/sh ../libtool --mode=compile gcc
-DDEFAULT_CHARSET_HOME="\"/usr/local/mysql\""
-DDATADIR="\"/data/mysql\""
-DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DDONT_USE_RAID  -I. -I.
-I.. -I./../include -I../include -I./.. -I.. -I..
/usr/local/openssl/include-O3 -DDBUG_OFF   -c -o libmysql.lo `test
-f libmysql.c || echo './'`libmysql.c
rm -f .libs/libmysql.lo
gcc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\"
-DDATADIR=\"/data/mysql\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\"
-DDONT_USE_RAID -I. -I. -I.. -I./../include -I../include -I./.. -I..
-I.. /usr/local/openssl/include -O3 -DDBUG_OFF -c libmysql.c -MT
libmysql.lo -MD -MP -MF .deps/libmysql.TPlo  -fPIC -DPIC -o
.libs/libmysql.lo
gcc: cannot specify -o with -c or -S and multiple compilations
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory `/usr/local/src/web/mysql-4.0.16/libmysql_r'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/web/mysql-4.0.16'
make: *** [all] Error 2

 
i'm trying this with mysql-4.0.16, but i also got this with 4.0.15 and
4.0.15a
with 4.0.14 it's going good.
 
does anyone know how to solve this?
thanks in advance.
 
with kind regards,
 
Richard Pijnenburg


Re: MySQL/InnoDB-4.0.16 is released + sneak peek of 4.1.1

2003-10-25 Thread Heikki Tuuri
Martijn,

- Original Message - 
From: ""Martijn Tonies"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Friday, October 24, 2003 4:08 PM
Subject: Re: MySQL/InnoDB-4.0.16 is released + sneak peek of 4.1.1


> Hi Heikki,
>
> As you know - I'm a transaction zealot :-)
>
> Is there a way to get a signal back to the client when a
> transaction has started?

what do you mean? If you have AUTOCOMMIT=0, then every SELECT, INSERT,
UPDATE, DELETE starts a new active transaction.

BEGIN does not start a transaction inside InnoDB; it is the first statement
inside the BEGIN block which starts a new active transaction. BEGIN is just
an instruction to MySQL to group upcoming statements as a single
transaction.

If you mean 'event alerters', MySQL does not implement them.

>Or perhaps something like
> @@trancount in MSSQL?

What does it count?


> Is there a way to turn ON/OFF auto-commit?

SET AUTOCOMMIT={0 | 1}

> And, are metadata operations under transaction control?

CREATE TABLE, DROP TABLE, etc. form a transaction of their own. You cannot
use ROLLBACK to roll them back.

> With regards,
>
> Martijn Tonies

Best regards,

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


> Database Workbench - developer tool for InterBase, Firebird & MS SQL
Server.
> Upscene Productions
> http://www.upscene.com



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



How to best accomplish selecting string (unless it is null)

2003-10-25 Thread Adam Clauss
I have a select statement that selects two string (text) fields.  In some
cases, the first of them may be NULL.  In this case, I would like the second
field to be selected instead.  It is also possible that in rare cases that
the second string may be NULL, in which case it should just return NULL.

Ex:
I have a table similar to:
Key   |   str1   |   str2
0 |  "str1"  |  "anotherstr"
1 |   NULL   |  "string"
2 |   NULL   |   NULL


I would like the select statement to return:
Key   |   Str
0 |   "str1"
1 |   "string"
2 |   NULL

How possible is this?

Adam Clauss
[EMAIL PROTECTED]


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



User and permissions/grants - HELP!

2003-10-25 Thread C. Reeve
Hi,

I just installed MySQL version 4 and as usual, trying to set up users
and grant permissions is a nightmare.
I followed the instructions in the MySQL manual and granted permissions
to a user, like below:

GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY
'12345678' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO newuser@"%" IDENTIFIED BY '12345678' WITH
GRANT OPTION;

I can log in with this user, but I can't do anything (i.e. create a
database). There is also no mysql database (there is though if I log in
as root).

So what am I doing wrong.?

TIA




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



Re: compile error mysql-4.0.16

2003-10-25 Thread Patrik Fimml
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



> gcc: cannot specify -o with -c or -S and multiple compilations
> make[2]: *** [libmysql.lo] Error 1
> make[2]: Leaving directory `/usr/local/src/web/mysql-4.0.16/libmysql_r'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/src/web/mysql-4.0.16'
> make: *** [all] Error 2

It seems your GNU Compiler Collection does not support options -o, -c and -S, 
as well as multiple connections. You should try to get a new one 
(http://gcc.gnu.org/).

Patrik Fimml
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iQEVAwUBP5t155FyPD7t0rMPAQJROgf+PeUtd3LjFWa2Qd/wOkQfP7MQL2E38bVE
lcBoE6cyP8yweFBlaqsyXDmvlE00AmNg54MszlUT+n3JuB9oxIKEGQxYcEw16HuC
g3LpsG1ruXlJoVTOk83W5Vx90RCM8zSICeEu34ykgrq3fqJsiGLOM0R/MBjARtgv
8tUkYktfu6vnqmZCq9MItCoROptUA3bFQxpCYxNYYBlv1SMe5FKjY//OP613sufO
IdGPADo67HfL+Ju59UGEoLZnm6FECDXe1+s3Nalp31oKo9Ca3kZZ5WJtWJIUQ0EQ
xQNCPQZy+xJE7FEjVE3VpZIaabSVC31/SHNnLiRBIAgbX+3Dj8bCEw==
=wQhH
-END PGP SIGNATURE-


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



Re: How to best accomplish selecting string (unless it is null)

2003-10-25 Thread Patrik Fimml
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


> I have a select statement that selects two string (text) fields.  In some
> cases, the first of them may be NULL.  In this case, I would like the
> second field to be selected instead.  It is also possible that in rare
> cases that the second string may be NULL, in which case it should just
> return NULL.
>
> Ex:
> I have a table similar to:
> Key   |   str1   |   str2
> 0 |  "str1"  |  "anotherstr"
> 1 |   NULL   |  "string"
> 2 |   NULL   |   NULL
>
>
> I would like the select statement to return:
> Key   |   Str
> 0 |   "str1"
> 1 |   "string"
> 2 |   NULL
>
> How possible is this?

You could do a

SELECT key, CASE WHEN str1 = NULL THEN str2 ELSE str1 END as str FROM ...;

or maybe also a

SELECT key, IFNULL(str1, str2) AS str FROM ...;

should work. (both not tested)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iQEVAwUBP5t31ZFyPD7t0rMPAQJZeAgAkwgaDJeqOZr/V8FJUSPG3XuYESZnMvbJ
2vOjtDWMRyRS5ppU0GqtUUDhLBlvRbmYzBnrJwiqreQlXqc7e1o5lCy6kZVK25+H
I+1mSd3ywiqZ3rW2dy9Bqe8QJ+t0rUjLDzUz5+eRbXdRSf/Bn0EJVzphBTVXoGpU
kjnr8JGajjYWrmwwVdPjI/63iBiLpxMDL6iIk6mQpQtnv1To4HPj/qWeO78107GW
gbo9ZdoJ/trHRn49/NsWYXvs5LSMex8B0Rp9TZLhndmfyMnL6im1NtvQAohYwDEi
h28udg/tvE9RIgHc+zxv6CROWS2uBES8RBk0P/HxL68Nk4i3VjYl8Q==
=jxdk
-END PGP SIGNATURE-


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



Re: How to use the C API? (_not_ C++)

2003-10-25 Thread Patrik Fimml
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


> If you're using PHP you want the Perl DBI stuff. The C API
> is for C apps. If you are compiling a C application and
> are having trouble linking, post your specific issues and
> I'll be glad to help.


Well, I tried it many times... here is the last:

gcc -L/usr/local/lib/mysql -lmysqlclient -lnsl -lm -o rpgservices conn.o io.o 
main.o 
main.o(.text+0x80): In function `main':
: undefined reference to `mysql_connect'
collect2: ld returned 1 exit status

(I also tried with an additional -lsocket, but it cannot find it...)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iQEVAwUBP5t5u5FyPD7t0rMPAQILdQf+JyCWMV8RU6eSw21UG/ach9frm2E4nvrf
+cKGplvk8HkgD+r7ewhH5zm0RrA2veuGPPu3woi9dVXTeUWWkPMguGPKjyCx+S+r
sCWo+kvQ30c2xbFMuuiDI1bzoi4HCzN0ssnkjJIR36C3VdJNKomLAPJByfftq1Pw
zoWXPrsbUzHs++WNyOoOlmzeGpII69VtWOyGcdKSwjALPjqxGuTXeFKQMa1QID+J
TBR3X2wragjTprY8A46fAH15SX33V11Qv/ouX4iZ0Z8HK17ymN4295ABVhoSIE+f
78NYQJVMeM6mtWu2ZNhCaN9AQeudHS1GS0Wa72aMDr8eURJ8Nm3eqQ==
=ZvRA
-END PGP SIGNATURE-


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