Re: Duplicate entry error

2005-07-04 Thread Gleb Paharenko
Hello.





   | 4.0.17-standard |



It is an old version of MySQL which could contain lots of bugs. It is

strongly recommended to upgrade to the latest release 4.1.12, or if it

is impossible in your production environment to 4.0.24. Usually upgrade

solves such kind of errors. Please, next time send your messages to the

list, because the probability to obtain more help grows a lot.







1.

Send an output of the following statement executed both on master and

slave:

  select version();

   

   from master :-

   

   mysql select version();

   +-+

   | version()   |

   +-+

   | 4.0.17-standard-log |

   +-+

   1 row in set (0.02 sec)

   

   mysql

   

   from slave :-

   ===

   mysql select version();

   +-+

   | version()   |

   +-+

   | 4.0.17-standard |

   +-+

   1 row in set (0.00 sec)

   

   mysql

   

   3.

   

   The queries are same in bin log and relay logs.

   

   4.

   You should find where the error occurred, fix it, possibly by

   executing

   SQL query on the slave. Than 'CHANGE MASTER' to corresponding position

   in the master binary log and start slave.

   ---This may not be possible to do every time on and on every m/c.

   Can you tell any way to avoid this problem.

   

 Thanks,[EMAIL PROTECTED] wrote:



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [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: Post-Installation Procedures for Slackware

2005-07-04 Thread Gleb Paharenko
Hello.



It depends on which distribution you've installed. General tips are

contained in:

  http://dev.mysql.com/doc/mysql/en/unix-post-installation.html



4.0.20 is rather old, use the latest release (4.1.12).







Tim Johnson [EMAIL PROTECTED] wrote:

 Hello All:

 

 I am most familiar with mysql thru RH 9.0 and win XP.

 I have set up a slackware partition (ver 10.0) with

 mysql ver 4.0.20.

 

 Are there any special instructions for Post-Installation Procedures?

 

 thanks

 tim

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [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: Help needed regarding MySQL-C Libraries on Linux....

2005-07-04 Thread Gleb Paharenko
Hello.



This is an output of diff user.c user.cpp. Which successfully compiles on

my FC3 system using the following command:

  g++ user.cpp -I/usr/include/mysql  -lmysqlclient 



I've changed the extension to 'cpp', so g++ could work with this file.

Also #includeconio.h was commented, and main now returns int.



[EMAIL PROTECTED] pgm]$ diff  user.c user.cpp

2c2

 #include conio.h

---

 //#include conio.h

17c17

 void main()

---

 int main()

52a53









Ashok Kumar [EMAIL PROTECTED] wrote:

 [-- text/plain, encoding 8bit, charset: iso-8859-1, 29 lines --]

 

 Dear Friends,

 I'm Ashok here. first i'll tell my sys configuration.

 1.Redhat-Linux 9

 2.Intel Pentium chipset

 3.MySQL 4.1 with Development Libraries

 

 For this i've downloaded the MySQL4.1 under the

 specification Linux x86 RPM downloads from the site.

 

 In my system, the MySQL Server is working well. I

 tried to run the C program that will make the

 connection to the MySQL database and create the user

 database and useracc table.

 It's finely working with Windows-VC++. But when i'm

 trying to run with Linux gcc, I'm getting lots of

 errors. I don't know what's the problem. I've attached

 the C-Pgm and the Error info.

 

 Pls, help me regarding this.

 

 Thanks and Regards,

 Ashok.

 

 



  

 Yahoo! Sports 

 Rekindle the Rivalries. Sign up for Fantasy Football 

 http://football.fantasysports.yahoo.com

 [-- application/zip, encoding base64, 97 lines, name: Pgm_Err.zip --]

 [-- Description: 3707653052-Pgm_Err.zip --]

 

 [-- text/plain, encoding 7bit, charset: us-ascii, 5 lines --]

 

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [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]



missing ibd files on upgrade of mysql from 4.1.9 to 4.1.12a

2005-07-04 Thread Jason Pyeron


I just lost a bunch of personal and work development projects whilst 
upgrading to MySQL 4.1.12a (msi script).


I get errors like:
 ERROR 1016 (HY000): Can't open file: 'files.ibd' (errno: 1)

there are no .ibd files in any of the data directories.

I do have 3 very large files at the top.

[EMAIL PROTECTED] data]$ du -h i*
18M ib_logfile0
18M ib_logfile1
10M ibdata1

I guess I am just not thinking straight enough to solve this one.

All MyISAM tables are fine.

oh, yes my backup was taking backups on the 'old' data location. DOH!!!

TIA

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Partner  Sr. Manager 7 West 24th Street #100 -
- +1 (443) 921-0381 Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.


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



my-medium.cnf file not created

2005-07-04 Thread njackso2
Dear Sir or Madam:

After installing mysql, the template files, my-small.cnf, my-medium.cnf or 
my-large.cnf, were not created.  I uninstalled and then reinstalled mysql, but 
they were still not created.  I am using mysql-4.0.20a-win on Windows ME.  
Could you please help with this problem.

Thanks

Nick

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



Re: missing ibd files on upgrade of mysql from 4.1.9 to 4.1.12a

2005-07-04 Thread Gleb Paharenko
Hello.



[EMAIL PROTECTED] gleb]$ perror 1

OS error code   1:  Operation not permitted



Do you run new MySQL service under different user account?







Jason Pyeron [EMAIL PROTECTED] wrote:

 

 I just lost a bunch of personal and work development projects whilst 

 upgrading to MySQL 4.1.12a (msi script).

 

 I get errors like:

  ERROR 1016 (HY000): Can't open file: 'files.ibd' (errno: 1)

 

 there are no .ibd files in any of the data directories.

 

 I do have 3 very large files at the top.

 

 [EMAIL PROTECTED] data]$ du -h i*

 18M ib_logfile0

 18M ib_logfile1

 10M ibdata1

 

 I guess I am just not thinking straight enough to solve this one.

 

 All MyISAM tables are fine.

 

 oh, yes my backup was taking backups on the 'old' data location. DOH!!!

 

 TIA

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [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: missing ibd files on upgrade of mysql from 4.1.9 to 4.1.12a

2005-07-04 Thread Jason Pyeron

No the user is still the same, there are just no innodb files. ?anymore?

On Mon, 4 Jul 2005, Gleb Paharenko wrote:


Hello.

[EMAIL PROTECTED] gleb]$ perror 1
OS error code   1:  Operation not permitted

Do you run new MySQL service under different user account?



Jason Pyeron [EMAIL PROTECTED] wrote:


I get errors like:
 ERROR 1016 (HY000): Can't open file: 'files.ibd' (errno: 1)



--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Partner  Sr. Manager 7 West 24th Street #100 -
- +1 (443) 921-0381 Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.


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



Re: Post-Installation Procedures for Slackware

2005-07-04 Thread Tim Johnson
* Gleb Paharenko [EMAIL PROTECTED] [050704 09:03]:
 Hello.
 
 It depends on which distribution you've installed. General tips are
 contained in:
   http://dev.mysql.com/doc/mysql/en/unix-post-installation.html
 
  Thanks. I have read that document. But I wasn't clear as to whether
  or not I should run mysql_install_db. Looks like I should, 'cuz
  slack doesn't use RPM.

  Cheers
  tim

 4.0.20 is rather old, use the latest release (4.1.12).
 
 
 
 Tim Johnson [EMAIL PROTECTED] wrote:
  Hello All:
  
  I am most familiar with mysql thru RH 9.0 and win XP.
  I have set up a slackware partition (ver 10.0) with
  mysql ver 4.0.20.
  
  Are there any special instructions for Post-Installation Procedures?
  
  thanks
  tim
  
 
 
 -- 
 For technical support contracts, goto https://order.mysql.com/?ref=ensita
 This email is sponsored by Ensita.NET http://www.ensita.net/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
  / /|_/ / // /\ \/ /_/ / /__   [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]

-- 
Tim Johnson [EMAIL PROTECTED]
  http://www.alaska-internet-solutions.com

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



GRANT and mysql.user table

2005-07-04 Thread l'[EMAIL PROTECTED]

I tried as root having GRANT ALL PRIVILEGES with GRANT OPTION
to change the privilege of a user:
GRANT ALL ON mydb.*  TO myUser;

The result of this statement is that the query is OK and 0 rows are affected.
WHen I look at the mysql table holding the grants: user, the myUser row is 
unchanged.


What could possibly be preventing the system from changing the GRANT of myUser?
Is the mysql.db table part of the granting?

thanks in advance for your help.
laurie 



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



Re: GRANT and mysql.user table

2005-07-04 Thread Michael Stassen

l'[EMAIL PROTECTED] wrote:

I tried as root having GRANT ALL PRIVILEGES with GRANT OPTION
to change the privilege of a user:
GRANT ALL ON mydb.*  TO myUser;

The result of this statement is that the query is OK and 0 rows are 
affected.
WHen I look at the mysql table holding the grants: user, the myUser row 
is unchanged.


What could possibly be preventing the system from changing the GRANT of 
myUser?

Is the mysql.db table part of the granting?

thanks in advance for your help.
laurie


Most likely, nothing is preventing the granting of privileges.

Users in mysql are [EMAIL PROTECTED]  With GRANT statements, '%' is the 
default host, so if you grant to myuser, as opposed to [EMAIL PROTECTED], you are 
creating/modifying [EMAIL PROTECTED]  http://dev.mysql.com/doc/mysql/en/grant.html


The user table holds global privileges.  You are granting a db-specific 
privilege.  That goes in the 'db' table.  Hence, your statement should not 
have modified the user tablle. 
http://dev.mysql.com/doc/mysql/en/privileges.html


Trying to read and interpret the mysql db tables is definitely not the best 
way to verify user privileges.  Use


  SHOW GRANTS FOR [EMAIL PROTECTED];

instead.  http://dev.mysql.com/doc/mysql/en/show-grants.html

Michael


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



timestampdiff func miscalculation (month only)

2005-07-04 Thread Travis Hillenbrand
Description:
The number of months between two dates is not calculated properly by the
timestampdiff function when the second date is the same month in a future
year but the same day or earlier within the month.
Specifically, the number of months is obtained by calculating the 
number of
complete years between the two dates, multiplying by 12, and adding the
number of months that exist in the remainder of the year that is left.
However, the loop that counts the months exits when the 'start' and 'end'
month are the same, regardless of whether these months are in different
years.  In short, when the month of both dates are the same and the day of
the second date is less than or equal to that of the first date, the result
is just the number of years between the two dates multiplied by 12.

How-To-Repeat:

This example works as expected, as the day component of the second date is
greater:
mysql select timestampdiff(month,'2004-06-03 00:00:00','2005-06-04
00:00:00');
+--+
| timestampdiff(month,'2004-06-03 00:00:00','2005-06-04 00:00:00') |
+--+
|   12 |
+--+
1 row in set (0.00 sec)

This example works as expected, as the month differs between the two dates:
mysql select timestampdiff(month,'2004-06-03 00:00:00','2005-05-31
00:00:00');
+--+
| timestampdiff(month,'2004-06-03 00:00:00','2005-05-31 00:00:00') |
+--+
|   11 |
+--+
1 row in set (0.00 sec)

These 4 examples demonstrate what happens when this is not the case:
mysql select timestampdiff(month,'2004-06-03 00:00:00','2005-06-03
00:00:00');
+--+
| timestampdiff(month,'2004-06-03 00:00:00','2005-06-03 00:00:00') |
+--+
|0 |
+--+
1 row in set (0.00 sec)

mysql select timestampdiff(month,'2004-06-03 00:00:00','2005-06-02
00:00:00');
+--+
| timestampdiff(month,'2004-06-03 00:00:00','2005-06-02 00:00:00') |
+--+
|0 |
+--+
1 row in set (0.00 sec)

mysql select timestampdiff(month,'2004-06-03 00:00:00','2005-06-01
00:00:00');
+--+
| timestampdiff(month,'2004-06-03 00:00:00','2005-06-01 00:00:00') |
+--+
|0 |
+--+
1 row in set (0.01 sec)

mysql select timestampdiff(month,'2004-06-03 00:00:00','2006-06-01
00:00:00');
+--+
| timestampdiff(month,'2004-06-03 00:00:00','2006-06-01 00:00:00') |
+--+
|   12 |
+--+
1 row in set (0.01 sec)


Fix:
Applying the following patch corrects the problem for the system described
below:

--- sql/item_timefunc.cc~   Fri Jun 10 21:30:43 2005
+++ sql/item_timefunc.ccSun Jul  3 16:26:19 2005
@@ -2686,7 +2686,7 @@
 month_end--;

 months= 12*diff_years;
-while (month_beg != month_end)
+while (month_beg != month_end || year != year_end)
 {
   uint m_days= (uint) days_in_month[month_beg];
   if (month_beg == 1)


Submitter-Id:  Travis Hillenbrand
Originator:Travis Hillenbrand
Organization:
MySQL support: none
Synopsis:  timestampdiff func miscalculation (month only)
Severity:  serious
Priority:  medium
Category:  mysql
Class: sw-bug
Release:   mysql-5.0.7-beta (FreeBSD port: mysql-client-5.0.7)

C compiler:2.95.4
C++ compiler:  2.95.4
Environment:
System: FreeBSD GunSmoke 4.10-RELEASE-p16 FreeBSD 4.10-RELEASE-p16 #12: Sun
Jul  3 02:14:08 EDT 2005 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GUNSMOKE
i386


Some paths:  /bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.4 20020320 [FreeBSD]
Compilation info: CC='cc'
 CFLAGS='-O -pipe -march=pentiumpro -D_THREAD_SAFE'  CXX='cc'
 CXXFLAGS=' -O -pipe 

Innodb crash on failed read disk

2005-07-04 Thread Ady Wicaksono

Dear All

I use RedHat 9 with 2,5 Gbyte RAM, Intel(R) Xeon(TM) CPU 2.80GHz 
(Hyperthread),

filesystem ext3 standar linux journaling filesystem.

Today my DB is crash :(, here is the log.
I try to :

1. shutdown MySQL, unmount harddisk partition used by MySQL innodb data 
file and doing fsck.ext3 on it and found that partition is clean


|# fsck.ext3 -v -f /dev/sda3
e2fsck 1.32 (09-Nov-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Createy? yes

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/data1: * FILE SYSTEM WAS MODIFIED *

 20 inodes used (0%)
  1 non-contiguous inodes (5.0%)
# of inodes with ind/dind/tind blocks: 8/8/0
2103570 blocks used (82%)
  0 bad blocks
  0 large files

  8 regular files
  2 directories
  0 character device files
  0 block device files
  0 fifos
  0 links
  0 symbolic links (0 fast symbolic links)
  0 sockets

 10 files
|
  
Any explanation ?


|050705 11:19:18  InnoDB: Started; log sequence number 0 4129451638
/usr/sbin/mysqld-max: ready for connections.
Version: '4.1.9-Max'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  
Official MySQL RPM

InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 18467.
InnoDB: You may have to recover from a backup.

 hexdump ...

050705 11:19:20  InnoDB: Page checksum 1075917609, prior-to-4.0.14-form 
checksum 3652064195
InnoDB: stored checksum 2099841729, prior-to-4.0.14-form stored checksum 
3652064195

InnoDB: Page lsn 0 3887279414, low 4 bytes of lsn at page end 3887279414
InnoDB: Page number (if stored to page already) 18467,
InnoDB: space id (if created with = MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 0 310
InnoDB: (index PRIMARY of table sms_9388_telkomsel/t_outgoing_sms)
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 18467.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

Number of processes running now: 0
050705 11:19:20  mysqld restarted
|

--
Regards,
Ady Wicaksono
HP: +628562208680