September 26, 2007

iPhone mail attachment missing in forward

I am not sure if anybody else has the similar issue, but for me am not able to see the attachment in the mail that I forward from my iPhone.

For example, I receive a mail with an attachment (lets say with .doc and/or .pdf with less than 1K) and when I forward that email to some other account by checking the option to include the attachment (iPhone will automatically ask you whether to include the attachment or not while forwarding), the mail arrives without any attachment to the mail content. I tried by sending it to different @yahoo and @gmail accounts and nothing shows up.

So, not sure how to tackle this issue. Man, sometimes I hate iPhone when it comes to few basic features.

September 24, 2007

MySQL time zone, tzdata changes

Due to the recent changes to the DayLight Savings Time (dst) from New Zealand (NZ), which makes the clock to move one hour ahead on Sep 30th rather than on October 6th. Even Venezuela had the similar change, which was supposed to be in effect since yesterday, Sep 23rd.

To get these new time zone changes to the MySQL server, I first updated my Redhat 4 server to have the latest tzdata package from Redhat. Redhat only included the changes for NZ but not for Venezuela in the recent release of tzdata-2007f-1 package. Once this tzdata package is installed through yum; I ran MySQL’s mysql_tzinfo_to_sql utility to get the latest changes and feeded the output back to server which inturn truncated all the timezone tables data and inserted new values.

1
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

After changes to timezone related tables in the ‘mysql’ database, I can see the changes after the server restart. Here is a simple case for NZ DST change, before and after updating the timezone tables:

After the NZ dst changes applied:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
mysql> SELECT CONVERT_TZ('2007-09-28 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-09-28 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-09-28 22:00:00                          |
+----------------------------------------------+
1 row in set (0.00 sec)
 
mysql> SELECT CONVERT_TZ('2007-09-29 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-09-29 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-09-29 23:00:00                          |
+----------------------------------------------+
1 row in set (0.00 sec)
 
mysql> SELECT CONVERT_TZ('2007-10-05 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-05 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-05 23:00:00                          |
+----------------------------------------------+
1 row in set (0.00 sec)
 
mysql> SELECT CONVERT_TZ('2007-10-06 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-06 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-06 23:00:00                          |
+----------------------------------------------+
1 row in set (0.01 sec)
 
mysql> SELECT CONVERT_TZ('2007-10-05 22:53:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-05 22:53:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-06 11:53:00                          |
+----------------------------------------------+
 
mysql> SELECT CONVERT_TZ('2007-10-06 22:53:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-06 22:53:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-07 11:53:00                          |
+----------------------------------------------+
1 row in set (0.01 sec)

Before the NZ dst changes applied:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
mysql> SELECT CONVERT_TZ('2007-09-28 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-09-28 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-09-28 22:00:00                          |
+----------------------------------------------+
1 row in set (0.00 sec)
 
mysql> SELECT CONVERT_TZ('2007-09-29 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-09-29 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-09-29 22:00:00                          |
+----------------------------------------------+
1 row in set (0.00 sec)
 
mysql> SELECT CONVERT_TZ('2007-10-05 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-05 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-05 22:00:00                          |
+----------------------------------------------+
1 row in set (0.00 sec)
 
mysql> SELECT CONVERT_TZ('2007-10-06 10:00:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-06 10:00:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-06 22:00:00                          |
+----------------------------------------------+
1 row in set (0.01 sec)
 
mysql> SELECT CONVERT_TZ('2007-10-05 22:53:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-05 22:53:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-06 10:53:00                          |
+----------------------------------------------+
 
mysql> SELECT CONVERT_TZ('2007-10-06 22:53:00','UTC','NZ');
+----------------------------------------------+
| CONVERT_TZ('2007-10-06 22:53:00','UTC','NZ') |
+----------------------------------------------+
| 2007-10-07 11:53:00                          |
+----------------------------------------------+
1 row in set (0.01 sec)

September 23, 2007

Back to PC Laptop

Finally, am back to good and old school technology. Means, I got my new HP PC laptop nc6400 back. After fighting with Macbook Pro for last few months and the problems were never ending and most of the time the Macbook was kind of useless to my prime time production. It gets too hot within an hour of time and on and off everyday the OS hangs and needs a reboot and all my unsaved documents were lost. So, finally I have to make a change.

After I got my HP laptop from Yahoo!, reinstalled Vista on top of XP Professional and got the setup as needed. Now the things are in normal control and I can see that my productivity was increased and am am spending more time in getting the real work done rather than fighting with endless problems. Even though I still have another Macbook Pro, not sure I will spend that much time as I used to spend earlier.

MySQL 5.0 or 5.1 string to longlong regression

Last week I received a bug from Yahoo! search team that when LOAD DATA INFILE is used to load data, few values were inserted incorrectly in to the MySQL 5.1.21 table where as the same one inserts right values when used with MySQL 4.0 or 4.1.

After debugging found that the regression is in the new strntoull10rnd function which was replaced by old strtoull which was present in the old versions of MySQL and introduced recently. The new function was not properly tested as it just appends the digits after the dot without proper verification.

Here is the simple case which fails with the new MySQL server version 5.0.45 or 5.1.21:

case 1:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
mysql> create table t1 (a bigint);
Query OK, 0 rows affected (0.00 sec)
 
mysql> insert into t1 values ("1.0000000000");
Query OK, 1 row affected (0.00 sec)
 
mysql> insert into t1 values ("1.000000000000000000");
Query OK, 1 row affected (0.00 sec)
 
mysql> insert into t1 values ("1.0000000000000000000000");
Query OK, 1 row affected, 1 warning (0.00 sec)
 
mysql> show warnings;
+---------+------+-----------------------------------------------------+
| Level   | Code | Message                                             |
+---------+------+-----------------------------------------------------+
| Warning | 1264 | Out of range value adjusted for column 'a' at row 1 | 
+---------+------+-----------------------------------------------------+
1 row in set (0.00 sec)
 
mysql> select * from t1;
+---------------------+
| a                   |
+---------------------+
|                   1 | 
|                   1 | 
| 9223372036854775807 | 
+---------------------+
3 rows in set (0.00 sec)

case 2:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mysql> create table t(c1 bigint);
Query OK, 0 rows affected (0.02 sec)
 
mysql> insert into t values('15449237462.0000000000');
Query OK, 1 row affected, 1 warning (0.00 sec)
 
mysql> show warnings;
+---------+------+---------------------------------------------+
| Level   | Code | Message                                     |
+---------+------+---------------------------------------------+
| Warning | 1264 | Out of range value for column 'c1' at row 1 |
+---------+------+---------------------------------------------+
1 row in set (0.00 sec)
 
mysql> select * from t;
+---------------------+
| c1                  |
+---------------------+
| 9223372036854775807 | 
+---------------------+
1 row in set (0.00 sec)

So, I made a simple patch by using the old strtoull code instead of fixing the new function. Lets wait for MySQL to have a fix for this. The bug is reported in the mysql bugs database.

September 16, 2007

iPhone Apple Care Service

My iPhone had few issues lately like:

  • getting hot when its charging with the USB connected to PC or when playing video songs or movies
  • randomly the touch screen gets hung (especially when the phone is in lock state and when you receive a call and to answer when I slide the bar) and only hard reset is needed in order to get around this.
  • the safari browser crashes for few sites and luckily nothing happens to iPhone but instead it goes to home screen automatically from browser window (good and bad: good in the sense the crash is limited to application and bad in the sense the Safari is crashing)

Up on contacting Apple customer service (1-800-My-iPhone) they decided to take my iPhone for testing as they thought heat is not permitted. Immediately next day morning I got the Apple Service 8GB iPhone as a lender phone and I shipped my iPhone back to Apple on the same day using the same shipping box. After 3 days I got my original phone back and nothing that Apple was able to fix nor they provided any kind of diagnose information to me to know what kind of tests they performed. Only thing that was mentioned in the letter was:


The reported symptom(s) that is not reproducible:
789/Unusually Warm Service

And after I got my phone, I kept it for re syncing and for charging. After few hours I noticed that the phone is hot…..not sure what to do at this time. I am still wondering why they did not perform any manual testing on this kind of issues or contacted me back on how to reproduce the issue.

September 11, 2007

Mercedes Benz C300 - My Experience

As am driving this new Mercedes Benz C300 model since couple of weeks, thought of writing what I like and dislike in the car.

So far I did not regret for the purchase of this model as Car is really cool to drive along with I got a very good deal when compared to what was offered by Lexus, Toyota and Acura when I initially considered them.

What I like:

  • Exterior Body style and Look
  • Interior Design and seating and space in small size sedan
  • Blue-tooth enabled hands-free calling with easy calling
  • 3-way controls for Audio and 2-way control for rest.
  • Low highway noise
  • Good storage area for driver and good cargo area space
  • Pretty much very comfortable drive and ride
  • MP3 playback
  • Aux playback
  • Auto Folding mirrors
  • Night interior lights
  • 7-speed manual cum automatic gear shift
  • Reading lights for both driver and passenger is neatly positioned that the rear or side cars will not notice the light
  • Multi purpose Steering wheel control for the Audio, telephone and speedo meter.
  • Good that there is an option in the steering wheel control to stop day time running lights.

What I dislike or wanted in the car

  • Could have been better if it had better sound system which is part of multi-media package along with equalizer
  • May be optional built-in navigation system
  • Scrolling ID3 tags display when playing MP3
  • Artwork display when playing songs
  • iPod integration (may be I will add this support after a month or so)
  • Could have been nice if it had 5-spoke Alloy wheel as default (either 17″ or 18″) instead of optional AMG 18″ 5-spoke
  • The speedo meter setting from the steering wheel resets back to original state once the car is turned off. It should have kept its original state when the car starts.
  • It was bit confusing initially to use the left and right signal handle as its normal position is occupied by cruise control.
  • Cruise control should have been better if it was integrated with the steering wheel or positioned on the right side.

September 6, 2007

iPhone - got the credit back

As apple announced the price reduction in the iPhone series nearly 200$, and am sure it is because they wanted to increase the total sales. Anyway, as I brought the iPhone just a week back I felt like I could have waited for a week or so to get the new price. Upon calling the customer service, they credited back the difference amount, thats a cool deal. Actually I asked them if I can get the upgrade from 4GB to 8GB instead of the credit, but they said it has to go through regular credit and they can’t issue any apple store credit.

At least am happy that I got my money back with the new price reduction. Now, lets wait and see how the iPhone sales will pitch.