i agree with the logic that mysql treats things as sets. my problem
can easily be solved by treating one row at a time. thanks again!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hey everyone,
I am starting to prepare for the second issue of MySQL Magazine. I am planning
on putting it out on September 1. Thanks for the fabulous response to the first
issue!! There was over a 1,000 downloads of the magazine. That is just
fabulous!!! Special thanks to those who contribute
Baron Schwartz <[EMAIL PROTECTED]> wrote:
> Ofer Inbar wrote:
> > host a is the master
> > host b is a replication slave
> > host c is to become a second replication slave
> > there's no full dump from host a
> >One possibility I can think of:
> > - stop slave on host b
> > - run the dump on h
Hi
Ofer Inbar wrote:
Scenario:
host a is the master
host b is a replication slave
host c is to become a second replication slave
there's no full dump from host a
[snip]
One possibility I can think of:
- stop slave on host b
- run the dump on host b
- note its position in host a's bi
Scenario:
host a is the master
host b is a replication slave
host c is to become a second replication slave
there's no full dump from host a
Normally, to start a new slave, I'd restore a dump from host a, and
start slaving using the master data in that dump. In this situation,
however, ru
Olav Mørkrid wrote:
wait, let's make it even more interesting :)
what if you want to update more than one row, and each row should have
a successive new id. is that possible in one statement?
i tried just removing the where statement in barons suggestion, which
fails as i guess the select is co
On Wednesday 11 July 2007 00:34, Anders Karlsson wrote:
> UNION will only return distinct rows. This is according to spec and to
> the SQL Standard.
And of course, to no one's surprise, this also matches the mathematical
definition of union:
j
--
Joshua Kugler
Lead
wait, let's make it even more interesting :)
what if you want to update more than one row, and each row should have
a successive new id. is that possible in one statement?
i tried just removing the where statement in barons suggestion, which
fails as i guess the select is computed only once prio
baron
your suggestion does the trick indeed. i take a deep bow!
thanks also for mentioning the related issues.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi,
Olav Mørkrid wrote:
mysql> update test set id = (select max(id) + 1 from test) where id =
'$myid';
ERROR 1093 (HY000): You can't specify target table 'test' for update
in FROM clause
You will need to place the subquery in another subquery in the FROM clause so it is
materialized to a tem
what i want to do is to take an old row from maybe three weeks ago,
and make its id appear as if it was the newest inserted row in the
table. therefore last_insert_id() cannot be used.
i could introduce a timestamp column to achieve my goals, but for
certain reasons i would like to update the id
2007/7/11, Olav Mørkrid <[EMAIL PROTECTED]>:
thanks olexandr
my posting had a misprint. the select should be on "mytable" not
"user", so when i use your suggestion, i get an error:
mysql> update test set id = (select max(id) + 1 from test) where id =
'$myid';
ERROR 1093 (HY000): You can't spec
thanks olexandr
my posting had a misprint. the select should be on "mytable" not
"user", so when i use your suggestion, i get an error:
mysql> update test set id = (select max(id) + 1 from test) where id = '$myid';
ERROR 1093 (HY000): You can't specify target table 'test' for update
in FROM clau
Thanks to all who have replied. Since this thread has evolved into
discussing the dump, I would like to ask the group what are their practices
for backup and recovery on Windows platform.
Waldo Tumanut
Database Analyst
Err..
you can do this:
update table mytable set id = (select max(id) + 1 from user) where id =
$oldid
but I would recommend to use a transaction
2007/7/11, Olexandr Melnyk <[EMAIL PROTECTED]>:
update table mytable set id =last_insert_id() + 1 where id = $oldid
2007/7/11, Olav Mørkrid <[EMAI
update table mytable set id =last_insert_id() + 1 where id = $oldid
2007/7/11, Olav Mørkrid <[EMAIL PROTECTED]>:
using one single sql statement, how do i update the auto_increment id
column of a row to have the new highest id in the table?
in other words: how do i make a row seem like it was j
using one single sql statement, how do i update the auto_increment id
column of a row to have the new highest id in the table?
in other words: how do i make a row seem like it was just inserted?
i know how to do it with two statements, but i want to do it with one
to ensure nothing goes wrong:
Use START SLAVE UNTIL. There are two syntaxes -- check the manual.
Ofer Inbar wrote:
When you start a replication slave you can tell it where in the binary
logs to start (which log file, what position) ... but can you tell it
to automatically *stop* when it reaches a certain point (also identif
Hi Campbell,
I tried this
LOAD DATA LOCAL INFILE 'abc.txt' INTO TABLE abc FIELDS TERMINATED BY ','
LINES TERMINATED BY '^V\n' (date_format(doj,'%d-%M-%Y %H:%i:%S');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the ri
Can you not change your proceedure and format your dates first using
DAT_FORMAT()?
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function
_date-format
You could put a trigger on the table that would format the dates before
insert (although I'd go for the above)
-Original
UNION is mean to removed duplicate rows. Use "UNION ALL" if you don't want
this to happen.
http://dev.mysql.com/doc/refman/5.0/en/union.html
-Original Message-
From: list account [mailto:[EMAIL PROTECTED]
Sent: 11 July 2007 09:19
To: mysql@lists.mysql.com
Subject: BUG in UNION implementat
UNION will only return distinct rows. This is according to spec and to
the SQL Standard. To avoid this, use UNION ALL instead of UNION. Try
that with your queries and you'll see that this will do the trick. This
is, as I said, in accordance with the standard and the way all SQL based
databases
Hi all,
I believe to have found a bug in MySQL's union implementation. Can someone
confirm this, please or convince me that this is not a buggy behaviour of
mysql :
UNION seems to behave like DISTINCT by default:
mysql> select 2 c1
-> union
-> select 1 c1
-> union
-> select 2 c1
-
When you start a replication slave you can tell it where in the binary
logs to start (which log file, what position) ... but can you tell it
to automatically *stop* when it reaches a certain point (also identified
by log file name and position) ?
-- Cos
--
MySQL General Mailing List
For list ar
Dear mysql-ers,
It seems that the Mac OS X PowerPC 64 bit version of the MySQL
Community server is no longer available.
Now I'm wondering which version I should use on a G5 PowerMac. PowerPC
32 bit or Universal?
Thanks for any insights.
Jan Pieter Kunst
--
MySQL General Mailing List
For list
25 matches
Mail list logo