Gleb Paharenko wrote:
Hello.
There was a question about exceptions recently. The answer might be
helpful:
http://lists.mysql.com/mysql/188048
Leigh <[EMAIL PROTECTED]> wrote:
Hi All,
I'm currently working on porting a database form Informix 9.2 to MySQL 5
in order to determine the suitab
Barbara,
> ... I don't know if I'm being asked to add or subtract days...
Why would you want to know that? ADDDATE() doesn't care:
SET @x = -1;
SELECT ADDDATE('1975-1-1', INTERVAL @x DAY);
+--+
| ADDDATE('1975-1-1', INTERVAL @x DAY) |
+
Try to avoid running functions against columns, unless you have very
little data, as it doesnt scale well (I'm talking 6 figure tables).
Two options I can suggest are:
1. Write a scheduled job using your MONTH() DAY() to replace the values
into a birthdays table on a daily basis
2. Use 2 sepera
Wouldnt that only work for the current year? For example I was born on
1970-08-25, "select id from members where birthday = now();" wouldnt
return my birthday if it was today. Or am I missing something new in
5.0.11?
Gleb Paharenko wrote:
Hello.
Why don't you want to use just:
select id
I just upgraded a server to MySQL 4.1.4. I was at 4.0.8 - everything
worked perfect at 4.0.8
However, since the upgrade, a few dozen tables in a few older databases are
apparently still in ISAM format. The tables now misbehave when trying to
access them(marked in use, error out, trash the serve
What might help as well is another problem I have:
Somehow, the data I am getting out of mysql and php and is being served by
apache is still in iso format, and not utf8. Which leads to bad displaying
(unless i switch back to iso in the browser, but then the html stuff in utf8
gets strange (whi
mysql> show create table tbl_gruppen;
+-+--
David Blomstrom wrote:
--- [EMAIL PROTECTED] wrote:
-
In my opinion:
The easiest thing for you to do right now would be a
table like
ID (primary key) NAME PARENTID
You don't need PARENT, because you have the PARENTID,
you can always retrieve parent. Alth
Eamon Daly wrote:
We have a table containing just one column that we use for
unique IDs:
CREATE TABLE `id_sequence` (
`id` int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (`id`)
) TYPE=MyISAM
Watching 'SHOW FULL PROCESSLIST' and reading the slow query
log shows the occasional backlog o
--- [EMAIL PROTECTED] wrote:
-
In my opinion:
The easiest thing for you to do right now would be a
table like
ID (primary key) NAME PARENTID
You don't need PARENT, because you have the PARENTID,
you can always retrieve parent. Although... i still
think it
--- [EMAIL PROTECTED] wrote:
> You have confused front end representation with
> back-end data design. How
> you store your data and create your data
> relationships is only marginally
> related to what your code makes it look like when it
> presents your data
> for the user. Why just create lo
Scott Gifford <[EMAIL PROTECTED]> wrote on 08/24/2005 04:45:36 PM:
> Hello,
>
> I'd like to sort my query results based on their distance from a given
> point. The actual data I have will be in (longitude,latitude) format,
> but I can convert to something else if that will work better.
>
> For
David,
>I can easily substitute integers from my primary key for
>names, but how do I substitute them for parents? For example:
>ID | NAME | PARENT
>10 | Canidae | Carnivora
>11 | Canis | Canidae
>12 | Vulpes |Canidae
>I can easily replace Canis with 11, Vulpes with 12.
>But they both hav
Hello,
I'd like to sort my query results based on their distance from a given
point. The actual data I have will be in (longitude,latitude) format,
but I can convert to something else if that will work better.
For example, I may have data like this
Item Latitude Longitude
Hello.
> so I have 3 questions
>
> how did this duplicate key happen, there was no error in my application
> logs on the master as I would expect?
Research and compare master binary logs and slave relay logs to find
what statement on the master produced the error. See:
http://dev.my
Hello.
If you have lots of concurrent updates and selects on the
same table, InnoDB usually has better performance. Use the
benchmarks to determine what configuration is preferred.
Super-smack for example allows you to write very flexible tests.
Be aware of different behavior of AUTO
Hello.
Your character_set_xxx variables is ok. The problem could be in
the table definition. Send the output of
SHOW CREATE TABLE tbl_gruppen;
Florian Burkart <[EMAIL PROTECTED]> wrote:
> Hey everyone,
>
> can't figure this one out, might be easy for one of you.
>
>
>
> This is
Hello.
MySQL-shared-compat-5.0.11-0.i386.rpm contains libmysqlclient.so.10.
It is available from
http://dev.mysql.com/downloads/mysql/5.0.html
"Bing Du" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When I run a Perl script that uses DBI and DBD::mysql on a RHEL 3 machine=
> ,
> I got t
Hello.
Why don't you want to use just:
select id from members where birthday = now();
See:
mysql> show create table members\G;
*** 1. row ***
Table: members
Create Table: CREATE TABLE `members` (
`id` int(11) NOT NULL auto_increment,
Hello.
> use MySQL through php. I understand that I must first create a user,
If you have MySQL correctly installed on your system, at least four
users usually exist (''@localhost, ''@hostname, [EMAIL PROTECTED],
[EMAIL PROTECTED]). Connect to MySQL server as root and create a user
with li
Hello.
Think about replication among other solutions. See:
http://dev.mysql.com/doc/mysql/en/replication.html
Alex Greg <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
> Our company is considering migrating some tablesfrom MyISAM to InnoDB,
> as it has row-level locking and other improvement
Hello.
> Would both of the above tables have 2^32 - 1 characters?=20
No. TEXT types are variable-length types. For each one, the storage
requirements depends on the actual length of column values, rather
than on the type's maximum possible size. See:
http://dev.mysql.com/doc/mysql/en/sto
Hello.
>Anyone can tell me step-by-step to solve these problems sir?
If you read all links which were mentioned in the log you
will be able to solve the problem by yourself.
>
>This is my sample error in my MySQL Log
>
>
>New value of fp=(nil) failed sanity check, terminating st
Hello.
There was a question about exceptions recently. The answer might be
helpful:
http://lists.mysql.com/mysql/188048
Leigh <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm currently working on porting a database form Informix 9.2 to MySQL 5
> in order to determine the suitability
David Blomstrom <[EMAIL PROTECTED]> wrote on 08/24/2005 03:31:19
PM:
> --- Peter Brawley <[EMAIL PROTECTED]> wrote:
>
> "As you note, the names [of animal taxons] aren't
> guaranteed to be unique, or to stay the same . . .
>
> > One way out is to give every table an
> > auto-incrementing intege
I think you misunderstand how auto_increment works. Primary keys using
auto_increment are NOT row numbers.
If your table has a primary key that is an auto_increment field then
when you add a row to the table the value of the primary key of the new
row is 1 greater than the max(Value) before the ro
"Pooly" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
I would like to display a list of members who have their birthday a
given day (today for instance).
My idea is to store their birth date in a column, and then query the
table against the column. But the query would be like :
What is the proper procedure to change the table (or database encoding) from
latin1 to UTF-8 with MySQL 4.1.x? My thought is to export the data to text
file, drop the table, recreate the table with the proper encoding and then
import the data. Is there a better way or something I missed?
-
Hi
Did someone use MySQLI in production environment ?
Is the transactions aspect reliable ? (bugs etc)
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
--- Peter Brawley <[EMAIL PROTECTED]> wrote:
"As you note, the names [of animal taxons] aren't
guaranteed to be unique, or to stay the same . . .
> One way out is to give every table an
> auto-incrementing integer PK, and
> use those keys, which will never change, to mark
> parent-child relatio
If you have any deletion gaps in your data, the SQL engine puts a full
TABLE LOCK on your table while performing inserts to a MyISAM table. You
don't have to do it, the engine does it for you.
As to your application design, all I am going to say is that if it works
for you, that's fine by me. I
I'm not doing any explicit locking-- these are just straight
INSERTs, and there are no gaps in the table (This is MySQL
4.0.20-standard-log, by the way).
As for why, there are several tables which share this PK,
each of which is heavily UPDATEd, and most make use of
INSERT DELAYED. This can't be
Hey everyone,
can't figure this one out, might be easy for one of you.
This is the query:
(SELECT 'Neue Gruppe' AS gruppenstring, '-1' AS gruppe_id)
UNION ALL
(SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
FROM tbl_gruppen
ORDER BY gruppe);
This error message is r
Hey everyone,
can't figure this one out, might be easy for one of you.
This is the query:
(SELECT 'Neue Gruppe' AS gruppenstring, '-1' AS gruppe_id)
UNION ALL
(SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
FROM tbl_gruppen
ORDER BY gruppe);
This error message is r
"Eamon Daly" <[EMAIL PROTECTED]> wrote on 08/24/2005 12:40:55 PM:
> We have a table containing just one column that we use for
> unique IDs:
>
> CREATE TABLE `id_sequence` (
> `id` int(10) unsigned NOT NULL auto_increment,
> PRIMARY KEY (`id`)
> ) TYPE=MyISAM
>
> Watching 'SHOW FULL PROCES
Hal Vaughan <[EMAIL PROTECTED]> wrote on 08/24/2005 12:41:36 PM:
> On Wednesday 24 August 2005 02:47 am, Hal Vaughan wrote:
> > I may have a misunderstanding of this, but as I have been told, if I
have a
> > table with 3 columns, Idx (an Index column, unique, auto-increment),
Name,
> > Value (bo
Yui Hiroaki <[EMAIL PROTECTED]> wrote on 08/24/2005 12:38:18 PM:
> Thank you for your reply.
>
> > sql>create table (test title longtext)TYPE=MyISAM;
> > sql>alter table test add fulltext (title);
>
> Your SQL above does not define the word long. How much
> character can I insert into "title"
We have a table containing just one column that we use for
unique IDs:
CREATE TABLE `id_sequence` (
`id` int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (`id`)
) TYPE=MyISAM
Watching 'SHOW FULL PROCESSLIST' and reading the slow query
log shows the occasional backlog of locks. Has anyo
Balazs Bagi <[EMAIL PROTECTED]> wrote on 08/24/2005 05:10:55 AM:
> Hi there, I'm kind of new to joining two tables. Please bear with me
> with this simple example. I have three tables.
>
> Guests is a list of guests that are coming to the party. The primary
> key of this table is 'id' and the
Thank you for your reply.
> sql>create table (test title longtext)TYPE=MyISAM;
> sql>alter table test add fulltext (title);
Your SQL above does not define the word long. How much
character can I insert into "title" column?
Yui
What do you expedt the number in brackets to do? I cannot find any
On Wednesday 24 August 2005 02:47 am, Hal Vaughan wrote:
> I may have a misunderstanding of this, but as I have been told, if I have a
> table with 3 columns, Idx (an Index column, unique, auto-increment), Name,
> Value (both varchar), and I try a command like this:
>
> INSERT IGNORE INTO myTable S
2005/8/24, Cummings, Shawn (GNAPs) <[EMAIL PROTECTED]>:
>
> The 29th wouldn't be an issue because if that is their birthday -- and
> today is 2/29 -- it will show up.
It will only happen once every 4 years... I'll go with the two fields
solution and make a special case for leap years.
thanks for
http://www.sitepoint.com/article/mysql-data-sqlyog-job-agent
SJA is available for both Linux and Windows.
Karam
--- Alex Greg <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
> Our company is considering migrating some tablesfrom
> MyISAM to InnoDB,
> as it has row-level locking and other improvements
>
Wow, thanks both of you. It worked... =)
-Original Message-
From: Roger Baklund [mailto:[EMAIL PROTECTED]
Sent: August 24, 2005 9:17 AM
To: mysql@lists.mysql.com
Cc: [EMAIL PROTECTED]
Subject: Re: need help with foreign keys, new to mysql
Pat Adams wrote:
> On Wed, 2005-08-24 at 06:11 -0
table bday
user int
mon int
day int
On Wed, 24 Aug 2005, Pooly wrote:
Hi,
I would like to display a list of members who have their birthday a
given day (today for instance).
My idea is to store their birth date in a column, and then query the
table against the column. But the query would be l
Hi,
I would like to display a list of members who have their birthday a
given day (today for instance).
My idea is to store their birth date in a column, and then query the
table against the column. But the query would be like :
select id from members where MONTH(birthday) = MONTH(NOW()) AND
DAY(b
On Wed, 24 Aug 2005, Harald Fuchs wrote:
"Praveen KS" <[EMAIL PROTECTED]> writes:
Can anyone help with a query to retrieve latest N records.
No auto_increment field.
No date field.
Primary key exists and is populated with random unique values.
This means that the only possible definition for
If you don't order your data but specified a LIMIT clause, what are
the records returned ?
24 Aug 2005 17:26:27 +0200, Harald Fuchs <[EMAIL PROTECTED]>:
> In article <[EMAIL PROTECTED]>,
> "Praveen KS" <[EMAIL PROTECTED]> writes:
>
> > Can anyone help with a query to retrieve latest N records.
>
Hi,
I have two simple tables:
CREATE TABLE `new_stations` (
`CD` char(3) default '',
`STATION` varchar(17) default NULL,
`ICAO` varchar(4) NOT NULL default '',
`IATA` varchar(4) default '',
`SYNOP` varchar(7) default '',
`LAT` varchar(6) default '',
`LON` varchar(7) default '',
`E
In article <[EMAIL PROTECTED]>,
"Praveen KS" <[EMAIL PROTECTED]> writes:
> Can anyone help with a query to retrieve latest N records.
> No auto_increment field.
> No date field.
> Primary key exists and is populated with random unique values.
This means that the only possible definition for "late
On Wed, 24 Aug 2005, Arno Coetzee wrote:
Alex Greg wrote:
Our company is considering migrating some tablesfrom MyISAM to InnoDB,
as it has row-level locking and other improvements over MyISAM.
However, one of the things we do at the moment is rsync the MySQL data
directory to our development
Hi
I set up replication for the first time last week. 1 master 1 slave.
Everything worked fine for 1 week, i checked out a couple of records
this morning to check everything was still working and the slave had
stopped. show slave status showed that there had been a duplicate key
error, the record
Pat Adams wrote:
On Wed, 2005-08-24 at 06:11 -0500, John Gonzales wrote:
CREATE TABLE `journal` (
`journal_id` int(10) unsigned NOT NULL auto_increment,
[snip]
CREATE TABLE comments
(
comment_id INT,
comment_journal_id INT,
INDEX jrn_id (journal_id),
Here you are defining an index name
Alex Greg wrote:
Hi,
Our company is considering migrating some tablesfrom MyISAM to InnoDB,
as it has row-level locking and other improvements over MyISAM.
However, one of the things we do at the moment is rsync the MySQL data
directory to our development server every night over an 2Mbps ADSL
Hi,
Our company is considering migrating some tablesfrom MyISAM to InnoDB,
as it has row-level locking and other improvements over MyISAM.
However, one of the things we do at the moment is rsync the MySQL data
directory to our development server every night over an 2Mbps ADSL
connection (as we h
Sérgio Júnior wrote:
> I’ve never worked with mysql db’s and I would like to start a new
> Project at work creating a new mysql db. I start read but I got lost
> so many times that I am seeking guidance help, someon to tell me
> first start with this and after do that. Is anyone available to give
On Wed, 2005-08-24 at 10:11 -0300, Alejandro Gad wrote:
> Hi,
>
> I am going to implement a mysql hosting, and I would to make a question,
> if a mysql-user with only a "SELECT" privilege make this query:
>
> SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql';
>
> the result is a file in
Wednesday, August 24, 2005, 5:11:14 PM, you wrote:
> Hi,
> I am going to implement a mysql hosting, and I would to make a question,
> if a mysql-user with only a "SELECT" privilege make this query:
> SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql';
> the result is a file in this pat
Sérgio Júnior <[EMAIL PROTECTED]> wrote on 08/24/2005 05:43:33
AM:
> Hello,
>
>
>
> I’ve never worked with mysql db’s and I would like to start a new
Project at
> work creating a new mysql db. I start read but I got lost so many times
that
> I am seeking guidance help, someon to tell me firs
On 24/08/2005, "Praveen KS" wrote:
> Can anyone help with a query to retrieve latest N records.
>
> No auto_increment field.
> No date field.
> Primary key exists and is populated with random unique values.
In a table, there are no such things as
- the first record
- the twenty third record
On Wed, 2005-08-24 at 06:11 -0500, John Gonzales wrote:
> CREATE TABLE `journal` (
> `journal_id` int(10) unsigned NOT NULL auto_increment,
> `journal_category` int(10) unsigned NOT NULL default '1',
> `journal_datetime_created` timestamp NOT NULL default CURRENT_TIMESTAMP,
> `journal_datet
Hi,
I am going to implement a mysql hosting, and I would to make a question,
if a mysql-user with only a "SELECT" privilege make this query:
SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql';
the result is a file in this path with the content of the table.
I could think that a maliciou
Can anyone help with a query to retrieve latest N records.
No auto_increment field.
No date field.
Primary key exists and is populated with random unique values.
Eg:
slno int(10) primary key (populated with random unique values)
name char(20)
Thanks in advance.
PraveenKumarKS
http://www.geoci
Sorry for not replying as quickly as I usually do, I ran into some other
server issues. Please take a look at my comments to your post.
-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: August 20, 2005 11:11 PM
Cc: John Gonzales; mysql@lists.mysql.com
Subject: Re: n
Yui Hiroaki <[EMAIL PROTECTED]> wrote on 24/08/2005 10:57:20:
> I created table for fulltext. I publish SQL:
>
> sql>create table (test title longtext)TYPE=MyISAM;
> sql>alter table test add fulltext title (4);
>
>
> But title is so small to insert text.
> what biggest text I can insert tit
I created table for fulltext. I publish SQL:
sql>create table (test title longtext)TYPE=MyISAM;
sql>alter table test add fulltext title (4);
But title is so small to insert text.
what biggest text I can insert title column?
When I publish SQL: alter table test add fulltext title(4294967295)
The insert will only be bounced where you specify the columns as unique.
Thus you need either separate UNIQUE indexes on Name and Value, if you
want them to be individually unique, or a single joint UNIQUE index if you
want them to be jointly unique but separately duplicable. The INSERT
command
Hi All,
I'm currently working on porting a database form Informix 9.2 to MySQL 5
in order to determine the suitability of MySQL for our application. At
the moment, I'm stuck with one of our stored procs that contains the
following lines:
-- If duplicates are detected, raise an error
IF count >
Hello,
Ive never worked with mysql dbs and I would like to start a new Project at
work creating a new mysql db. I start read but I got lost so many times that
I am seeking guidance help, someon to tell me first start with this and
after do that. Is anyone available to give some guidance at th
Hi there, I'm kind of new to joining two tables. Please bear with me
with this simple example. I have three tables.
Guests is a list of guests that are coming to the party. The primary
key of this table is 'id' and the foreign key that ties the guests to
the registered user of the site is 'user
On 24 Aug 2005, at 05:19, Michael Stassen wrote:
SHOW INNODB STATUS
It's a bit convoluted - you have to spot the message amongst tons of
other info - but it does work. I wouldn't like to try to do
programmatic support for it though. Perhaps I should post a feature/
bug report for having
Hi Hal,
in order to get INSERT IGNORE to work as you want it you must violate
a unique index somehow, i.e. you must have a unique index on Name,Value
or both and then you would get a quiet ignore of that violation.
The IGNORE keyword doesn't make the INSERT as such different, it just
affects the e
72 matches
Mail list logo