Re: Update Problem when ORing w/ Long.MIN_VALUE
Hi Daniel, I can see the problem without using "update". However, I am a newbie at mysql, so can't say for certain if it's a bug: mysql> drop table if exists foo; mysql> create table foo (id int signed, val bigint signed); mysql> insert into foo values (0x, 0x), (-1, -1); mysql> select hex(id), hex(val) from foo; +--+--+ | hex(id) | hex(val) | +--+--+ | 7FFF | 7FFF | | | | +--+--+ 2 rows in set (0.00 sec) Regards Gautam Daniel Doubleday wrote: Hi everybody - I'm experiencing some really weird update behaviour (mysql 5.0) when or'ing results from subselects using Long.MIN_VALUE. But before I post a bug report I wanted to ask if I'm missing something. drop table if exists foo; drop table if exists bar; create table foo (fooid int, fooval bigint); create table bar (barid int, barval bigint); insert into foo values (1, null), (2, null); insert into bar values (1, 123), (2, 345); update foo set fooval = (select barval from bar where barid = fooid) | 0x8000; select * from foo; # +---+-+ # | fooid | fooval | # +---+-+ # | 1 | 9223372036854775807 | # | 2 | 9223372036854775807 | # +---+-+ # 2 rows in set (0.00 sec) # Oops result is Long.MAX_VALUE (as if subselect result was 0 - bit logic result is always unsigned bigint) # Same thing when you replace subselect by multi table update syntax update foo, bar set fooval = barval | 0x8000 where fooid = barid; select * from foo; # +---+-+ # | fooid | fooval | # +---+-+ # | 1 | 9223372036854775807 | # | 2 | 9223372036854775807 | # +---+-+ # 2 rows in set (0.00 sec) # and it seems that its all about MSB sign bit, cause thats fine: update foo, bar set fooval = barval | 0x7000 where fooid = barid; select * from foo; # +---+-+ # | fooid | fooval | # +---+-+ # | 1 | 8070450532247928955 | # | 2 | 8070450532247929177 | # +---+-+ # 2 rows in set (0.00 sec) # and casting the or result! does the trick too though I dont understand why ... update foo set fooval = cast((select barval from bar where barid = fooid) | 0x8000 as signed); select * from foo; # +---+--+ # | fooid | fooval | # +---+--+ # | 1 | -9223372036854775685 | # | 2 | -9223372036854775463 | # +---+--+ # 2 rows in set (0.00 sec) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
TurnKey MySQL: new installable live CD optimized for ease of use
Hi guys, I am one of the developers for TurnKey Linux, an opensource project that aims to develop high-quality software appliances that are easy to use, easy to deploy, and free. Our motto is "everything that can be easy, should be easy!" We recently released TurnKey MySQL, an easy-to-use, lightweight, installable live CD of the MySQL database engine that can run on real hardware in addition to most types of virtual machines. It is designed to provide users with a pre-integrated, turn-key operating system environment that is carefully built from the ground up with the minimum components needed to run MySQL with maximum usability, efficiency, and security. Key features: * auto-updated daily with latest security patches * MacOS X themed web management interface * easy to use configuration console (written from scratch in Python) * packaged as an installable Live CD that runs on real machines and VMs * minimal footprint (152MB) - includes only minimum required components * based on Ubuntu 8.04.1 Hardy LTS Check it out and tell us what you think! http://www.turnkeylinux.org/appliances/mysql Cheers, Liraz -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Special Characters
Thx's Jerry, appreciate the info, very helpful. ;) Mike(mickalo)Blezien === Thunder Rain Internet Publishing Providing Internet Solution that Work http://www.thunder-rain.com === - Original Message - From: "Jerry Schwartz" <[EMAIL PROTECTED]> To: "'Mike Blezien'" <[EMAIL PROTECTED]>; "'MySQL List'" Sent: Monday, November 24, 2008 9:21 AM Subject: RE: Special Characters -Original Message- From: Mike Blezien [mailto:[EMAIL PROTECTED] Sent: Sunday, November 23, 2008 4:59 PM To: MySQL List Subject: Special Characters Hello, we are in the process of setting up a database with members data and other info. We'll need to enter names with special characters, i.e: apostrophes: O'Rourke tildes: Magglio Ordóñez titlo: Anaïs hyphen: Chun-Myers Is there some special table setup required, collation or storage engine, in order to enter data like this or can this be handled with our programming, Perl? Where using MySQL 5.0.51 [JS] For the most flexibility, I suggest you use utf8_general_ci as the default for your entire database. That's what we use, and it will swallow just about anything (including Chinese). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Special Characters
>-Original Message- >From: Mike Blezien [mailto:[EMAIL PROTECTED] >Sent: Sunday, November 23, 2008 4:59 PM >To: MySQL List >Subject: Special Characters > >Hello, > >we are in the process of setting up a database with members data and >other info. >We'll need to enter names with special characters, i.e: > >apostrophes: O'Rourke >tildes: Magglio Ordóñez >titlo: Anaïs >hyphen: Chun-Myers > >Is there some special table setup required, collation or storage engine, >in >order to enter data like this or can this be handled with our >programming, Perl? >Where using MySQL 5.0.51 > [JS] For the most flexibility, I suggest you use utf8_general_ci as the default for your entire database. That's what we use, and it will swallow just about anything (including Chinese). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Displaying information from table graphically
>-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Sunday, November 23, 2008 6:12 AM >To: Jujitsu Lizard >Cc: mysql@lists.mysql.com >Subject: Re: Displaying information from table graphically > >Does it support interaction in terms of allowing user to click on >individual part of the composite image and use that event to update the >database? Other words does it support interactive graphics? > [JS] That sounds like a job for Ajax. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Update Problem when ORing w/ Long.MIN_VALUE
Hi everybody - I'm experiencing some really weird update behaviour (mysql 5.0) when or'ing results from subselects using Long.MIN_VALUE. But before I post a bug report I wanted to ask if I'm missing something. drop table if exists foo; drop table if exists bar; create table foo (fooid int, fooval bigint); create table bar (barid int, barval bigint); insert into foo values (1, null), (2, null); insert into bar values (1, 123), (2, 345); update foo set fooval = (select barval from bar where barid = fooid) | 0x8000; select * from foo; # +---+-+ # | fooid | fooval | # +---+-+ # | 1 | 9223372036854775807 | # | 2 | 9223372036854775807 | # +---+-+ # 2 rows in set (0.00 sec) # Oops result is Long.MAX_VALUE (as if subselect result was 0 - bit logic result is always unsigned bigint) # Same thing when you replace subselect by multi table update syntax update foo, bar set fooval = barval | 0x8000 where fooid = barid; select * from foo; # +---+-+ # | fooid | fooval | # +---+-+ # | 1 | 9223372036854775807 | # | 2 | 9223372036854775807 | # +---+-+ # 2 rows in set (0.00 sec) # and it seems that its all about MSB sign bit, cause thats fine: update foo, bar set fooval = barval | 0x7000 where fooid = barid; select * from foo; # +---+-+ # | fooid | fooval | # +---+-+ # | 1 | 8070450532247928955 | # | 2 | 8070450532247929177 | # +---+-+ # 2 rows in set (0.00 sec) # and casting the or result! does the trick too though I dont understand why ... update foo set fooval = cast((select barval from bar where barid = fooid) | 0x8000 as signed); select * from foo; # +---+--+ # | fooid | fooval | # +---+--+ # | 1 | -9223372036854775685 | # | 2 | -9223372036854775463 | # +---+--+ # 2 rows in set (0.00 sec) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Need Help
what rate of pay are you offering? On Mon, Nov 24, 2008 at 5:13 AM, Tanveer Bhurani <[EMAIL PROTECTED]>wrote: > Dear All, > > I am looking for help as I want to make a website like orkut. > > can u plz help me in designing the Data Table and Queries > > -- > Thanks & Regards, > Tanveer Bhurani > "The Bend on the road is not the end of the Road..., Unless you forget > to make the turn" > -- Jim Lyons Web developer / Database administrator http://www.weblyons.com
Need Help
Dear All, I am looking for help as I want to make a website like orkut. can u plz help me in designing the Data Table and Queries -- Thanks & Regards, Tanveer Bhurani "The Bend on the road is not the end of the Road..., Unless you forget to make the turn"
roles table design
HI, I'm developing a cms, I need some suggessions regarding database design. I'm creating role table in which role name will be unique, so my question is that should I create roleid(int, autoincreament, primary key )? Same question for users table. Note: I'll have user role mapping table. -- Sharique uddin Ahmed Farooqui (C++/C# Developer, IT Consultant) http://safknw.blogspot.com/ "Peace" is the Ultimate thing we want. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]