catches up.
Have you solved the update problem? Remember that all updates must go to
the Master, and then be
replicates to the slave. Is Europe or Asia the master copy?
Alec Cawley
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
A programmer just asked me about a possible race condition,
and I didn't know what to answer:
If I insert a line using autoincrement, then ask for last_insert_id()
am I guaranteed to get the same ID I just inserted?
Yes
It seems that another program could be inserting at almost the same
If I understand correctly, you are trying to grep the SQL data file. This
is emphatically not a valid thing to do. The data file is *not* a
representation of the table displayed when you SELECT * from it. For a
start, if you have deleted records and not overwritten them, the blank
space will
I have a query that returns a resultset of 70 mb. I'd somehow would like
J/Connector to fetch only small pieces using Statement.setFetchSize but
it
still get the whole ResultSet at once and then I get an OutOfMemoryError.
Is it a bug in setFetchSize? Does J/Connector ignore it? Have I
I am trying to check a table to see if a value doesnt exist, and I
would prefer to use the NOT IN syntax, but that doesnt work for mysql.
I've been trying to construct a similar statement in MySQL, but I'm
coming up cold.
t1
't1id'
'1'
'18'
'19'
t2
't2id','t2gid'
'19','194'
As I read the manual, the REPLACE command will do what you want.
Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT NULL.
Replace dos a delete-if-present, insert. The insert generates a new ID.
See test below, and note two rows affected by second replace.
mysql create table
The primary key (message_id)is a UNSIGNED BIGINT,
Which is supposed to be 64 bit, with autoincrement.
The each row is deleted as soon as it is fetched
By the client, and also after the expiry of a period
(~30 days).
64 bits does provide a large number, but there is a
possibility that it
Or just give MySQL plenty of ram and trust it to keep frequently used data
in ram - which it does. Prime the system by doing some form of search
which forces all the rows into memory (Select * from table where
unindexedfield = somethingimpossible), the do a speed test on this versus a
heap table.
Have you turned log-bin on the master server? The master will not generate
the log files that the slave reads unless this is turned on.
|-+
| | Floyd Wellershaus|
| | [EMAIL PROTECTED]|
| | .com
at
http://www.mysql.com/doc/en/Replication.html
Note that replication works over an intermittent connection.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
Can I just check, does MySql v.3.23.52 do table locking or row locking?
If
it only does table locking, are there any versions of mysql that do row
locking?
Always Read The Fine Manual:
From http://www.mysql.com/doc/en/Locking_methods.html:
Currently MySQL only supports table locking for
It would appear that MySql does table locking. Then I would like to ask
the
following:
From what I've read,
it would seem that SELECTS get a lower priority than INSERTS and UPDATES,
meaning that if all 30 users
insert into that table at the same time (given the way the stress test is
I've recently learned that Oracle has the ability to partition table
data, Oracle9i's list partitioning feature.
http://www.oracle.com/oramag/oracle/02-jan/index.html?o12part.html
I'm trying to find out if MySQL or any open source database has
something equivalent to this.
See the MySQL
I'm thinking of setting up a bulletin board for a system with Windows
2000
OS.
Most of the good, affordable BB software uses MySQL databases.
Is it possible/practical to run MySQL on Windows OS? Does it take a lot
of
techy knowledge, time trouble?
Yes, you can run it on Windows. No, it is
If you have, and always will have, no more that 64 product types, you can
store the product type in a SET field. This is effectively a hybrid between
your list and boolean solutions. MySQL stores this as a bitmap with one bit
per product type and
provides the appropriate query methods. You can
perror 13
returns
Error code 13: Permission denied
You do not have permission to create databases as the default user.
As installed. there is already a test database called 'test' and a test
user called 'test' with no password to do the kind of inital trying out you
probably want.
May I
I'm trying to get the Nth record of a query which i don't know nothing
but the table name.
I mean something like select * from table where condition . give
me the Nth result;
SELECT * FROM table LIMIT N,1 ;
Alec
You asked:
I'm new to MySQL and loving it. So pardon my lack of the simple things. I
need to index a table where the field is indexed, so when I look at the in
the PHP script it is in order.
Also when I run a query how can I save the results as a new table?
I reply.
1. You need an ORDER BY
I
should not have with a Classic license. Is there a separate Classic
version, and where should I download it from?
Alec Cawley
mysql query
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual
See http://www.mysql.com/doc/en/CHAR.html or
http://www.mysql.com/doc/en/BLOB.html .
If your column types are CHAR or VARCHAR insert BINARY.
If your column type is TEXT, change to BLOB.
--
You said
Hi,
I have been
Is there a simple way in MySQL to only select the first x rows that meet
a specified criteria.
For example in Oracle the following would work:
Select * from Blah where stuff=true and rownum = 10
? (where rownum is not a specific column, just a count of how many rows
have been returned)
My application is intended to be scalable. In the eyes of the marketing
departments, it should be scalable from zero to infinity. But we all know
that this is not possible indefinitely - at some point you reach a
bottleneck. In the case of my system, that bottleneck will eventually be
the MySQL
, deleting long-unused connections before MySQL gets
bored of them ).
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list
When first used, the WinMySQLAdmin program puts up a box requesting
Username and Password. Can anybody tell me what this is intended to do?
Normally leave it blank, but when someone else did not do so, it created an
unwanted user with a forgotten password in the database. Furthermore, when
we
Victoria Reznichenko said:
Since 4.0.2 user must have CREATE TEMPORARY TABLES privilege, it's a
global level privilege:
http://www.mysql.com/doc/en/News-4.0.2.html
Thank you. That page says that To use these, you must have run the
mysql_fix_privilege_tables script after upgrading.
What privileges do I need for creating a TEMPORARY table? I seem to have
locked myself out of this - and yet I can create permanent tables, which
seems the wrong way round.
N:\mysql -ualec
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1121 to server
At 10:12 2002.09.24._ +0100, you wrote:
Question is, will this
require any SQL code changes to our application? We make heavy use of
features like temporary tables, autoincrement columns etc. Would if be
as simple as dumping the database and restoring it to InnoDB tables?
The simple
the
old one and then do the insert again - I don't care what the old data was,
my new data is correct for the new situation. Can I get MySQL to do that
for me?
Alec Cawley
-
Before posting, please check:
http
the same effect, some of which Paul has already explained.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive
join, or does it use sort-merge join if the table is
sorted
before joining it? Is the join algorithm merge if the tables are
already
sorted on the join attributes (through an index)?
Alec Cawley
-
Before posting, please check
Does anyone know if there is a good JDBC 3.0 Driver for MySQL?
I would like to use the getGeneratedKeys() method.
The mm.mysql driver has been taken over (with it's author), renamed (but
not the author) to Connector/J, and enhanced to 3.0 level. It is still Beta
at the moment, but supports
fails, you can dive in and fix it yourself. Of course you hope
never to resort to such an expedient (and a small company such as MySQL is
probably more amenable to altering their plans, at a cost, than a giant)
but it is a nice fallback line to have for the worst case.
Alec Cawley
? And if not so, would it be reasonable if I LOCK the
table round the insert?
Thanks for any help
Alec Cawley
mysql, query
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual
, as I am doing.
Alec Cawley
-
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
{password}
(See attached file: AITest.java)
OS: Windows 2000
MySQL: 4.0.2-alpha-max-nt, binary download
MM.MySQL: 1-14
Java: j2sdk 1.4.0_01
Alec Cawley
mysql, query
-
Before posting, please check:
http://www.mysql.com
If you've got to make copies to disk then why not just maintain copies on
disk via replication? Stop the slave, backup the slave, restart the
slave.
In my case, replication is installed to give 24/7 service even if one of
the server dies for some reason. When both master and slave are up, I
On windows you could simply copy the entire data directory with a
Scheduled job. Copying the files should be all you need to do for
windows.
For a cleaner, and what most people would say is a better way you could
schedule a batch file to run mysqldump that would dump the data and
structure
the select because it recognises a
familar request).
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread
Please tell me if the MySQL 4.0.2-alpha Windows 95/98/NT/2000/XP (17.2M)
supports the subselect command.
No version of MySQL currently supports subselects.
From http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html
Subselects are currently being implemented in the 4.1 development
a pointer to how I start this process? I have CVS, MS VisualC++,
Cygwin...
Alec Cawley
mysql, query, mutter, mutter
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
. I would reccoment that you get it to work fo you
and give it s good try before considering any other better driver.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
Also, if you initialise a TIMESTAMP field with NULL, MySQL puts the current
time into it - for the first such field in the record only. (p109 of Paul
DuBois book - sorry, www.mysql.com seems to have gone down so I can't get a
documentation URL).
Alec
Is there a way to have the timestamp
of
years.
Alec Cawley
-
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
.
AND ( (DATE_SUB(CURRENT_DATE INTERVAL 2 day)
j.stellen.t_stellen_date)
Alec Cawley
mysql
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list
You said:
I am trying to start up mysql on win2000 machine using the following
mysqld-nt --install
I get an error saying failed to install service
how do I get round this the docs say to use the folowing:
mysqld-max-nt --install
this turns out to be not recognized as a
to the master that it is waiting. Thus the
replication occurs as fast as is possible, allowing for network delays,
and there can be no tweakable parameters.
Alec Cawley
MySQL
-
Before posting, please check:
http://www.mysql.com
You should not SELECT MAX(userID), you should SELECT LAST_INSERT_ID(),
which gives you
tha last id *generated by your connection* regarless of any others,
This is general purpose. If you are willing to be MySQL specific, both C
and Java
(and, I presume, other languages) allow you to retrieve
offers row locking, both of which
would allow your insert to go through soon if not at once.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com
may eventually get a timeout.
It would not be a good thing if one database user could create unexpected
errors for another by use of locking.
Alec Cawley
Mysql query
-
Before posting, please check:
http://www.mysql.com
for one).
Alec Cawley
-
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
).
Alec Cawley
-
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
of the next time the cron job runs,
that you can (if you want to) do searches which include hidden
messages, that you are using MySQL to do what it is best at,
that your system doesn't have bits of intelligence hanging
round in cron jobs...
Alec Cawley
fast on the King James Bible (8Mb, 30,000 records).
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e
read loads by use of replication, but would bottleneck on high write loads
- I think).
(Or have I just fallen for Oracle propaganda?)
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php
, character FROM table_name WHERE count = @Random ;
Alternatively, this might work:
SELECT count, character FROM tableName ORDER BY rand() LIMIT 1 ;
Alec Cawley
---
I have database with table and 1 milions random
supports 2Gb data files, or 2) use InnoDB table type with multiple InnoDB
data bloclks, each of less than 2Gb.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
with updates while it was off line). Is this not a good idea? It
seems to me the fastest way of getting a clean copy, because it does not
require any access to the internals of the database nor reformatting.
Alec Cawley
mysql, database
--
This e-mail is intended for the named addressees only. Its
all
about the delays in development - but some indiciation would be really
helpful and could save me a lot of work.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
I'd also love any suggestions/criticisms of the above architecture. I'm
trying to address what is a potentially significant performance issue for
us
(we hope to allow the main table to grow to tens to hundreds of millions
of
rows before pruning it down), but there might be a much simpler
can
be different
in apparently identical values. For floating point comparisons you should
*always* use
unequalities e.g. WHERE temp BETWEEN 15.75 AND 15.85.
Alec Cawley
-
Before posting, please check:
http
is
a wholly different animal - IMO again. If I was going there I wouldn't
start from here -
it would need a clean brain look at the whole problem. If you really need
such searches,
Google survives by licencint that technology - speak to them.
Alec Cawley
is
a wholly different animal - IMO again. If I was going there I wouldn't
start from here -
it would need a clean brain look at the whole problem. If you really need
such searches,
Google survives by licencint that technology - speak to them.
Alec Cawley
can
be different
in apparently identical values. For floating point comparisons you should
*always* use
unequalities e.g. WHERE temp BETWEEN 15.75 AND 15.85.
Alec Cawley
-
Before posting, please check:
http
would have thoght a transfer size of 0.5-1.0 megabyte would be a good
target. If the disk
has lower acces tume (e.g. 15,000 rpm) reduce the transfer size. If the
disk is externally
raid-ed, probably increase the transfer size.
Alec Cawley (who uses disks for video servers)
SQL database
and order by it.
You will then be able to
delete using that key.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request
How do I go about querying a mySQL server for version information?
SELECT VERSION()
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
the BETWEEN ...
AND operator
solve your problem? All you have to do is to format the limits in a way
that MySQL understands
to be a timestamp, and it should then do a proper date comparison.
Alec Cawley
-
Before posting, please check
a fast
response. Which you do, of course, depends upon your updating mechanisms.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list
has said
that you
need it to protect yourself from his pack-mates. If you complain enough,
I might have some ammo to shout at The Management, but at the moment I
carry no weight
compaired to the lawyers. Sorry.
Alec Cawley
Ishis a bug? My table has one row, and my update says it has updated one
row,
but the data doesn't change. After the update, myisamchk
reports the table as crashed.
Possibly related, we have occurrences of mysql saying it is unable to open clips.MYD,
errno 145. clips.MYD still exists.
mysql
WHERE ClipID = 2 ;
#Display it agaim
SELECT ClipID, Owner FROM clips ;
#Owner should be me but is NULL
#This works at this point
SHOW COLUMNS FROM Clips ;
FLUSH TABLE Clips ; #So myisamchk sees a clean file
#This fails after the flush - errno 145
SHOW COLUMNS FROM Clips ;
Alec Cawley
can be prodigal with them if it aids clarity.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread
Anna Ã…hnberg writes:
Thanks, I actually already found the chapters but now I also now how to
use the function too!
Let me quote from the manual:
LAST_INSERT_ID([expr])
Returns the last automatically generated value that was
inserted into an AUTO_INCREMENT column.
mysql
.
For Java, download the mm.mysql JDBC driver from
http://sourceforge.net/projects/mmmysql/. This is an implementation for
MySQL of the java.sql package which is documented in the in the standard
Sun distribution.
Alec Cawley
You need the mm.mysql driver, which can be downloaded from
http://sourceforge.net/projects/mmmysql/
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com
Is there any way to insert more than one row at a time??? The data that
I
have will change with each row, but is there a way to insert 900 rows
(with
different values for each) all at once?
INSERT INTI table VALUES (row1), (row 2), (row3) .
where rowN is a list of values for the row
at that time - perhaps the developers
can comment (I would love to see them).
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list
About a year ago, I used mysql-super-smack and was able to hit 8,000
per second on our [then new] server. The highest I've recorded on an
actual production application was around 5,000. But I don't watch the
numbers closely very often...
Just out of curiosity, on what hardware? My needs
I am using, well trying to use mysql through WinNT. I have
successfully installed mysql and have had a look at the client
programs provided with the package. I'm trying to use mysql
through the DOS command prompt under Windows but when I type
C:\mysql I get an error message saying that
There are no updates (again, as of today)
Is this a reasonable thing to do, or a bad idea?
Thanks in advance of any opinions.
Alec Cawley
--
This e-mail is intended for the named addressees only. Its contents may be
privileged or confidential and should be treated as such. If you
Chris Boget wrote:
MySQL - as I said at our meeting, we would not be comfortable with this
as an enterprise strength solution. MySQL is unsupported freeware
As has already been pointed out, MySQL is commercially supported by MySQL
AB. What strikes me most significantly is that, if you purchase
to use/create MyISAM type table uder MySqld-Max??
The existing tables remain as they are, and will be handled in the same
way. The default remains MyISAM.
However, you can create new tables using different table types, and alter
your existing tables using the
ALTER TABLE command.
Alec Cawley
table and use
some sort of SELECT like statement to join the temporary table to the real
one, but I can't see any syntax for it. Is there no way to so it other than
to issue an individual update for every record?
Alec Cawley
--
This e-mail is intended for the named addressees only. Its contents
- if you
really need ACID, there
are other databeses which will offer it. If you don't, you can used MySQL
and not be
burdened with the cost of it.
Alec Cawley
-
Before posting, please check:
http://www.mysql.com
COk I was thinking that you had to tell LAST_INSERT_ID the table you
wanted
to get the last insert id from. What if you run a web site and you have
10
tables in a database, how can you tell what the last insert id of table 6
was?
As I understand it, LAST_INSERT_ID is connection based, not
can safely generate a unique id without
creating the master row?
The I could put the slave rows in before I create the master row, and I
wouldn't have a problem.
Thanks in advance for any advice.
Alec Cawley
--
This e-mail is intended for the named addressees only. Its contents may
Thanks for the info, however I'm struggling to understand how it applies to
my case. Following is the piece of code in question, and the error is due
to
the SELECT following the INSERT (insert works fine; LIGHTBOX_ID is on
AUTO_INCREMENT) :
// add a LIGHTBOX row ...
rs =
In JDBC2.0, you can move the invisible pointer witing your ResultSet
backwards and forward, or to absolute row numbers. You can therefore move
the pointer completely out of the table - fro wxample, by calling
ResultSet.beforeFirst(). If you then attempt to access the "current" row,
you will get
ie in MySQL 4.0 - which I hope is going to appear
soon.
--
Alec Cawley
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this t
I have a couple of SQL queries, both of which involve searching for misses rather than
searching for
hits. Would anybody be kind enough take a little time to assist me?
Suppose I have a table of products, a table of components, and a table which says
which components
are used in which
ll thermal recalibrate, which may take 250 milliseconds. This
means that
drivers tested on one brand of disk will show essentially no performance hit from
doing a sync with
Rezero, whilst a different brand would show a collossal hit. Yours appears to fall
between the two
extremes.
A
201 - 291 of 291 matches
Mail list logo