ANN: Database Workbench 2.8.5 released!

2006-03-27 Thread Martijn Tonies
Ladies, gentlemen,

Upscene Productions is proud to announce the next
version of the popular database development tool:

Database Workbench 2.8.5 has been released today!



Download a trial at: http://www.upscene.com
What's new?: http://www.upscene.com/products/dbw/whatsnew.htm
Full list of features and fixes: http://www.upscene.com/news/20060327.htm



Database Workbench supports:
- Borland InterBase ( 4.x - 7.x )
- Firebird ( 1.x, 2.0 )
- MS SQL Server/MSDE ( v6.5, 7, 2000, 2005, MSDE 1  2, SQL Express )
- MySQL 4, 4.1, 5.0
- Oracle Database ( 8i, 9i, 10g )
- NexusDB ( 2.05 )

If you experience any problems with this new version, don't 
hestitate and either go to the website and send a support email 
or email directly to [EMAIL PROTECTED]

New

- NexusDB 2 support
- Microsoft SQL 2005 support
- MySQL 5 support
- Two-way Visual Query Builder
- Increased Oracle support
- New SQL Insight
- Create INSERT script from ODBC datasource
- TIFF support in BLOB Editor


Enhancements

- Code/SQL Editor enhancements
- More complte Schema Compare/Migration
- Automatic image-type recognition in BLOB Editor
- many user interface improvements
- MySQL explain support in SQL Editor


Thank you for your support,

Martijn Tonies
Database Workbench - the database developer tool for professionals
Upscene Productions
http://www.upscene.com


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



Re: Date Field Reverting to 0000-00-00 Format

2006-03-27 Thread Lola J. Lee Beno

Michael Stassen wrote:


So, take a look at yarn_date.txt and let us know.



Yes, you're right . . . there was an extra tab stop.  When I deleted the 
extra tab, the date field were retained successfully.  Thanks!




--
Lola - mailto:[EMAIL PROTECTED]
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Freedom is not free.
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

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



Re: Comparing x.x.x.x strings

2006-03-27 Thread Lucas Vendramin

Thank you.
The INET_ATON() function works fine. :D
I hope this solution save me.
Thanks.


Take a look at the MySQL function INET_ATON and it's counterpart (I don't
remember what it's counterpart is but it should be easy to find once you
find INET_ATON).

I know in PHP there is a function that will convert x.x.x.x to an int and
then you just put that int into a field in your database and then use the
INET_ATON function in MySQL to select the ips you want.

SELECT INET_ATON('3.2.0.13')  INET_ATON('3.2.0.2')

That should return TRUE. :)

Hope that helps.




On 3/24/06 2:44 PM, Lucas Vendramin [EMAIL PROTECTED] wrote:


Hi all.
I have a problem:
When I compare two strings in mask (x.x.x.x) the comparation is not true 
(for

my question :D)... look:
 select '3.2.0.13'  '3.2.0.2'- FALSE
I want this command return TRUE, but it is returning FALSE.
But, if I put a space first into the smaller string the camparation will
returns what I want:
 select '3.2.0.13'  ' 3.2.0.2'- TRUE

How can I check it? There is a way to correct my problem? The string is 
like a

IP-ADDRESS where 192.168.0.13 is better than 192.168.0.2, but it is not a
IPADDRESS column, it is a Version of file (version 3.2.0, version 3.2.1,
etc...) 



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



Insuring select returns the last record for a given day.

2006-03-27 Thread Paul Halliday
Hi,

I have a table that looks somthing like this:

ID   timestampcampusIDS ePOinbound
outbound   statinfo

2289411143430287MA0 0424526713
284590944  0  NULL
2289401143430002ST 2 0290248558
119939485  0  NULL
2289391143430290AN122001697436588   
20836217840  NULL

I am trying to read the last record for each column for a given day
(when the stats are input they are already a sum, so the last entry
will be the cumulative total for each day). My query looks like this:

select campus,date_format(from_unixtime(timestamp),'%Y-%m-%d') as
day,inbound,outbound,IDS,ePO from stats where
date_sub(curdate(),interval 7 day) = from_unixtime(timestamp) and
campus='MA' group by day;

campus day   inbound  outbound  IDS ePO
MA2006-03-21618584262358793491974   0
MA2006-03-2285702498739824446572 0
MA2006-03-238745243413847904889 50
MA2006-03-244856668982854718766  1   0
MA2006-03-25798980766 250534732  00
MA2006-03-26424526713 284590944  00
MA2006-03-27144573737 59843102  790

So this query returns the last value for each day for the past 7 days
grouped by day. Tentative testing shows that the values are indeed
always the last entries but is this the right way to pull off this
query? I dont see anything specific in the query itself to insure it
extracts the last record for said day.

Is this correct or should the query have further processing.

Thanks.

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



ERROR 2013 (HY000): Lost connection to MySQL server during query

2006-03-27 Thread Marten Lehmann

Hello,

again, I'm having problems with InnoDB tables. A certain table cannot be 
dropped. If I'm issueing the drop table statement, the connection is 
lost and I get the following in the logfile:


060327 14:38:11  InnoDB: error: space object of table db15670/mw_pagelinks,
InnoDB: space id 12 did not exist in memory. Retrying an open.
InnoDB: Error: trying to add tablespace 12 of name 
'./db15670/mw_pagelinks.ibd'

InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 12 of name './db15720/admin.ibd' already exists in the tablespace
InnoDB: memory cache!
060327 14:38:11  InnoDB: Error: page 3 log sequence number 0 153218641
InnoDB: is in the future! Current system log sequence number 0 14322402.
InnoDB: Your database may be corrupt.
060327 14:38:11InnoDB: Assertion failure in thread 196621 in file 
fsp0fsp.c line 3202
InnoDB: Failing assertion: xdes_get_bit(descr, XDES_FREE_BIT, 
buf_frame_get_page_no(header) % FSP_EXTENT_SIZE, mtr) == FALSE

InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help 
diagnose
the problem, but since we have already crashed, something is definitely 
wrong

and this may fail.

key_buffer_size=402653184
read_buffer_size=2093056
max_used_connections=12
max_connections=1000
threads_connected=5
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections 
= 290904 K

bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8a000c18
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbe1fbe08, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80a43b4
0x82bf71c
0x820a5fd
0x81b64f5
0x8169f26
0x81a4bc7
0x81a4224
0x81a36c2
0x817f332
0x817e57d
0x819376b
0x8125411
0x811ba68
0x812abe0
0x812a500
0x80b76b2
0x80bbb72
0x80b54bd
0x80b5102
0x80b48f9
0x82bb001
0x82ed89a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and 
follow instructions on how to resolve the stack trace. Resolved

stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd-query at 0x8bb38e0 = drop table mw_pagelinks
thd-thread_id=220
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0
060327 14:38:12  mysqld restarted
060327 14:38:12  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.

The whole mysql-server crashed just because something is wrong in one 
innodb table. The force-recovery-hint didn't help at all, because it 
just made it possible do drop the table, but nothing was fixed and I 
couldn't create the table back then.


Why does this happen?

Regards
Marten

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



Re: mysqld_safe and timezone settings

2006-03-27 Thread Michael Sutter

Thanks for the help,

but this isn't my problem. When you start the server as shown below, the 
SYSTEM Timezone is  used for the MySQL  server. This could be seen when 
executing the query select @@global.time_zone  on the server. Than  you 
must get a SYSTEM in your  data. The problem is that  I wan't to start 
the server with a different timezone than the system one, which can be 
done by starting the server with --timzeone=..


Regards Michael

Dominik Klein wrote:

This was done as root and shows that TZ works.

dk:/usr/local/mysql # bin/mysql -V
bin/mysql  Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using 
readline 5.0

dk:/usr/local/mysql # echo $TZ

dk:/usr/local/mysql # bin/mysqld_safe --user=mysql 
[1] 802
dk:/usr/local/mysql # Starting mysqld daemon with databases from 
/usr/local/mysql/data


dk:/usr/local/mysql # bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql select now();
+-+
| now()   |
+-+
| 2006-03-27 09:26:35 |
+-+
1 row in set (0.05 sec)

mysql Bye
dk:/usr/local/mysql # support-files/mysql.server stop
Shutting down MySQL...STOPPING server from pid file 
/usr/local/mysql/data/dk.pid

060327 09:26:45  mysqld ended

  
done

[1]+  Donebin/mysqld_safe --user=mysql
dk:/usr/local/mysql # export TZ=America/Argentina/Mendoza
dk:/usr/local/mysql # bin/mysqld_safe --user=mysql 
[1] 889
dk:/usr/local/mysql # Starting mysqld daemon with databases from 
/usr/local/mysql/data


dk:/usr/local/mysql # bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql select now();
+-+
| now()   |
+-+
| 2006-03-27 04:27:09 |
+-+
1 row in set (0.00 sec)

mysql Bye




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

[Fwd: Re: mysqld_safe and timezone settings]

2006-03-27 Thread Michael Sutter
The starting of the Server with the timezone settings works fine after 
setting the TZ variable. I always looked at the output from select 
@@global.time_zone. This was SYSTEM and so I beliefed the timezone 
wasn't set right on the server.


Thanks and Regards
Michael


Thanks for the help,

but this isn't my problem. When you start the server as shown below, the 
SYSTEM Timezone is  used for the MySQL  server. This could be seen when 
executing the query select @@global.time_zone  on the server. Than  you 
must get a SYSTEM in your  data. The problem is that  I wan't to start 
the server with a different timezone than the system one, which can be 
done by starting the server with --timzeone=..


Regards Michael

Dominik Klein wrote:
This was done as root and shows that TZ works.

dk:/usr/local/mysql # bin/mysql -V
bin/mysql  Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using 
readline 5.0

dk:/usr/local/mysql # echo $TZ

dk:/usr/local/mysql # bin/mysqld_safe --user=mysql 
[1] 802
dk:/usr/local/mysql # Starting mysqld daemon with databases from 
/usr/local/mysql/data


dk:/usr/local/mysql # bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql select now();
+-+
| now()   |
+-+
| 2006-03-27 09:26:35 |
+-+
1 row in set (0.05 sec)

mysql Bye
dk:/usr/local/mysql # support-files/mysql.server stop
Shutting down MySQL...STOPPING server from pid file 
/usr/local/mysql/data/dk.pid

060327 09:26:45  mysqld ended

  
done

[1]+  Donebin/mysqld_safe --user=mysql
dk:/usr/local/mysql # export TZ=America/Argentina/Mendoza
dk:/usr/local/mysql # bin/mysqld_safe --user=mysql 
[1] 889
dk:/usr/local/mysql # Starting mysqld daemon with databases from 
/usr/local/mysql/data


dk:/usr/local/mysql # bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql select now();
+-+
| now()   |
+-+
| 2006-03-27 04:27:09 |
+-+
1 row in set (0.00 sec)

mysql Bye





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

JOINs-- need some expertise on this one

2006-03-27 Thread Mark
Hi i am emiling you hoping you can help me urgently,
I have a football tipping script which works fine now except i want to update a 
field from one table to another.

At the moment there is a table (leaderboard) which is updated weekly via the 
updateleaderboard.php
It shows  USERNAME ,SCORE ,and COMPETITON NAME (eg: George | 12 points | harrys 
comp.) What i want to do is ad an avatar next to each username.

I have already worked out the form for users to choose avatar and place the 
name of the image in an AVATAR field in the USERNAME table and echo it.

My problem is that each week the LEADERBOARD usernames change and so do thier 
scores, comp name and of course their avatar.. i have made an AVATAR field in 
the LEADERBOARD table as well, now i just need some script which i will use as 
an i-nclude -on the updateleaderboard script to take the avatar field data and 
carry it over to the AVATAR field in the LEADERBOARD table as well.

here is my script that doesnt work (also there is no session involved, makes it 
harder)
below is my schema

titleupdate_avatars/title?php
include(header.php);
include(connect.php);


//insert avatar into leaderboard


$sql = mysql_query SELECT users.avatar, leaderboard.username FROM users, 
leaderboard
   WHERE users.comp_id=leaderboard.comp_id;

  $result = @mysql_query($sql);
$avatars = avatar; 
$username = username;  

$query = mysql_query(UPDATE leaderboard SET avatar = '$avatars' WHERE username 
= '$username');
$query = mysql_query($sql);  

 
?

?php
include(footer.html);
?





*

#
# Table structure for table `comps`
#

CREATE TABLE `comps` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `username` varchar(255) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  `emailtipsuser` char(1) NOT NULL default '0',
  `emailtipsall` char(1) NOT NULL default '0',
  `latetips` text NOT NULL,
  `winpoints` int(11) NOT NULL default '0',
  `drawpoints` int(11) NOT NULL default '0',
  `joinfee` float NOT NULL default '0',
  `perfect8point` char(1) NOT NULL default '0',
  `perfect8amt` float NOT NULL default '0',
  `ranking` text NOT NULL,
  `email` varchar(255) NOT NULL default '',
  `signup_date` datetime NOT NULL default '-00-00 00:00:00',
  `rules` text NOT NULL,
  `status` text NOT NULL,
  `pool` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;


# Table structure for table `leaderboard`
#

CREATE TABLE `leaderboard` (
  `id` int(11) NOT NULL auto_increment,
  `user_id` int(11) NOT NULL default '0',
  `comp_id` int(11) NOT NULL default '0',
  `username` text NOT NULL,
  `points` int(11) NOT NULL default '0',
  `amt` float NOT NULL default '0',
  `margin` int(11) NOT NULL default '0',
  `acc_margin` int(11) NOT NULL default '0',
  `avatar` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;


CREATE TABLE `tips` (
  `id` int(11) NOT NULL auto_increment,
  `user_id` int(11) NOT NULL default '0',
  `points` int(11) NOT NULL default '0',
  `round` varchar(2) NOT NULL default '0',
  `game` int(11) NOT NULL default '0',
  `winner` text NOT NULL,
  `comp_id` int(11) NOT NULL default '0',
  `margin` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;

#
# Table structure for table `users`
#

CREATE TABLE `users` (
  `id` int(11) NOT NULL auto_increment,
  `comp_id` int(11) NOT NULL default '0',
  `username` varchar(255) NOT NULL default '',  
  `password` varchar(255) NOT NULL default '',
  `phone` varchar(255) NOT NULL default '',
  `email` varchar(255) NOT NULL default '',
  `signup_date` datetime NOT NULL default '-00-00 00:00:00',
  `last_login` datetime NOT NULL default '-00-00 00:00:00',
  `activated` char(1) NOT NULL default '',
  `first_name` varchar(50) NOT NULL default '',
  `last_name` varchar(50) NOT NULL default '',
  `avatar` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;

}

?


**

Regards MArk

Complicated select query

2006-03-27 Thread Barry

Hello Everyone!

Probably somone can help me out.

I have 2 databases and it looks like:
db1 Project 1
  db2 Subproject 1
  db2 Subproject 2
db1 Project 2
  db2 Subproject 1
db1 Project 3
  db2 Subproject 1
  db2 Subproject 2
  db2 Subproject 3

What kind of a query would give me the first Subproject out of dv2 of 
each Project in db1?


And er is it possible to have loops in mysql?

Like
SELECT * FROM db WHERE id = 5 STEP id +5 UNTIL id = 50
+--+---+
|id|val|
+--+---+
|5 |10 |
|10|xy |
|15|jks|
...
...
|50|763|
+--+---+

and so on.

Thanks for any Help!

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: Complicated select query

2006-03-27 Thread Gabriel PREDA
About the first problem I think you need to give us more data !

As for the seccond... I haven't sen such loops yet...

But you can go arround them and do something like:

SELECT * FROM db WHERE (id BETWEEN 5 AND 50)  AND id%5=0

--
Gabriel PREDA
Senior Web Developer


Re: Complicated select query

2006-03-27 Thread Peter Brawley

Barry,

Hello Everyone!

Probably somone can help me out.

I have 2 databases and it looks like:
(Wayne Ratliff is dead but his mistake lives on :-) ). You mean tables, 
right?

db1 Project 1
  db2 Subproject 1
  db2 Subproject 2
db1 Project 2
  db2 Subproject 1
db1 Project 3
  db2 Subproject 1
  db2 Subproject 2
  db2 Subproject 3

What kind of a query would give me the first Subproject out of dv2 of 
each Project in db1?
A hierarchical query, ie a query which traverses the data as a graph. 
They're doable in MySQL, eg see 
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html. A 
simple nodes-and-edges (Edge List) model should do fine for your problem.


PB





--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/292 - Release Date: 3/24/2006


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



Re: JOINs-- need some expertise on this one

2006-03-27 Thread Peter Brawley




Mark,
here is my script that doesnt work (also there is no 
session involved, makes it harder)
What doesn't work? 

What stops you from using $_SESSION[]?

PB

Mark wrote:

  Hi i am emiling you hoping you can help me urgently,
I have a football tipping script which works fine now except i want to update a field from one table to another.

At the moment there is a table (leaderboard) which is updated weekly via the updateleaderboard.php
It shows  USERNAME ,SCORE ,and COMPETITON NAME (eg: George | 12 points | harrys comp.) What i want to do is ad an avatar next to each username.

I have already worked out the form for users to choose avatar and place the name of the image in an AVATAR field in the USERNAME table and echo it.

My problem is that each week the LEADERBOARD usernames change and so do thier scores, comp name and of course their avatar.. i have made an AVATAR field in the LEADERBOARD table as well, now i just need some script which i will use as an i-nclude -on the updateleaderboard script to take the avatar field data and carry it over to the AVATAR field in the LEADERBOARD table as well.

here is my script that doesnt work (also there is no session involved, makes it harder)
below is my schema

titleupdate_avatars/title?php
include("header.php");
include("connect.php");


//insert avatar into leaderboard


$sql = mysql_query SELECT users.avatar, leaderboard.username FROM users, leaderboard
   WHERE users.comp_id=leaderboard.comp_id;

  $result = @mysql_query($sql);
$avatars = "avatar"; 
$username = "username";  

$query = mysql_query("UPDATE leaderboard SET avatar = '$avatars' WHERE username = '$username'");
$query = mysql_query($sql);  

 
?

?php
include("footer.html");
?





*

#
# Table structure for table `comps`
#

CREATE TABLE `comps` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `username` varchar(255) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  `emailtipsuser` char(1) NOT NULL default '0',
  `emailtipsall` char(1) NOT NULL default '0',
  `latetips` text NOT NULL,
  `winpoints` int(11) NOT NULL default '0',
  `drawpoints` int(11) NOT NULL default '0',
  `joinfee` float NOT NULL default '0',
  `perfect8point` char(1) NOT NULL default '0',
  `perfect8amt` float NOT NULL default '0',
  `ranking` text NOT NULL,
  `email` varchar(255) NOT NULL default '',
  `signup_date` datetime NOT NULL default '-00-00 00:00:00',
  `rules` text NOT NULL,
  `status` text NOT NULL,
  `pool` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;


# Table structure for table `leaderboard`
#

CREATE TABLE `leaderboard` (
  `id` int(11) NOT NULL auto_increment,
  `user_id` int(11) NOT NULL default '0',
  `comp_id` int(11) NOT NULL default '0',
  `username` text NOT NULL,
  `points` int(11) NOT NULL default '0',
  `amt` float NOT NULL default '0',
  `margin` int(11) NOT NULL default '0',
  `acc_margin` int(11) NOT NULL default '0',
  `avatar` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;


CREATE TABLE `tips` (
  `id` int(11) NOT NULL auto_increment,
  `user_id` int(11) NOT NULL default '0',
  `points` int(11) NOT NULL default '0',
  `round` varchar(2) NOT NULL default '0',
  `game` int(11) NOT NULL default '0',
  `winner` text NOT NULL,
  `comp_id` int(11) NOT NULL default '0',
  `margin` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;

#
# Table structure for table `users`
#

CREATE TABLE `users` (
  `id` int(11) NOT NULL auto_increment,
  `comp_id` int(11) NOT NULL default '0',
  `username` varchar(255) NOT NULL default '',  
  `password` varchar(255) NOT NULL default '',
  `phone` varchar(255) NOT NULL default '',
  `email` varchar(255) NOT NULL default '',
  `signup_date` datetime NOT NULL default '-00-00 00:00:00',
  `last_login` datetime NOT NULL default '-00-00 00:00:00',
  `activated` char(1) NOT NULL default '',
  `first_name` varchar(50) NOT NULL default '',
  `last_name` varchar(50) NOT NULL default '',
  `avatar` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM ;

}

?


**

Regards MArk
  
  

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/292 - Release Date: 3/24/2006
  



No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date: 3/26/2006


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

Re: DBD::mysql::st execute failed: MySQL server has gone away

2006-03-27 Thread sheeri kritzer
What happens if you try to connect to the database on the commandline?

-Sheeri

On 3/24/06, Luke Vanderfluit [EMAIL PROTECTED] wrote:
 Hi.

 I'm getting the following error running apache2 with modperl, mysql
 4.1.18 and RT 3.4.5
 *error:*DBD::mysql::st execute failed: MySQL server has gone away at
 /usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm
 line 70.
 *context:*
 *...*
 *66:*   if ($self-{lock}) {
 *67:*   local $self-{dbh}-{RaiseError} = 1;
 *68:*
 *69:*   my $sth = $self-{dbh}-prepare_cached(q{SELECT
 RELEASE_LOCK(?)}, {}, 1);
 *70:*   $sth-execute($self-{lockid});
 *71:*
 *72:*   $self-{lock} = 0;
 *73:*   }
 *74:*   }
 *...*

 *code stack:*
 /usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:70
 /usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:81
 /usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:87
 /usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/HTML/Mason/Request.pm:1249


 If anyone can help, I'd appreciate it.
 Kind regards.

 --
 Luke




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



Re: problem with encoding utf8 in text field

2006-03-27 Thread sheeri kritzer
What does it look like on the commandline?  If it looks OK on the
commandline, then it's an application/web server problem.

-Sheeri

On 3/24/06, Grzegorz Smith [EMAIL PROTECTED] wrote:
 Hi all. In my apps I use two languages: english and my national polish.
 Translates i keep in MySQL 5.0 in text field (MyISAM engine) with utf8
 encodings. I don't know why but i can get polish translates from databes
 properly, my national character are seen from webb like sign ?. I connect
 to database with URI like
 host://[EMAIL PROTECTED]:database?read_default_file=mysql configuration file
 e.g. c:/windows/my.ini
 in configuration file i have:
 [client]
 port=3306
 default-character-set=utf8
 [mysql]
 default-character-set=utf8
 [mysqld]
 port=3306
 default-character-set=utf8
 Does anyone can tell mi what I'm doing wrong?


 --
 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]



Summing tables and fields Please help,,,

2006-03-27 Thread Brian E Boothe

can someone post a snippit on Summing tables together of a feild of the
entire Database ? why does everyone Have such a problem with this 
question? everyone i ask says the same thing,,   let me show what i'm 
needing by Visual representation

 MySQL databaseworkorders
  Table : Orders
  Field(aa) ProjectName --  [enter Projectname]
   Field [a] ElecprojCost  - -Enter in Number
Field [b] ElecprojBilling  --Enter in Number
 Field [c] Elecprojremaining =  [a] - [b]
 Field [d] CtrlprojCost   - -Enter in Number
  Field [e] CtrlprojBilling  - -Enter in 
Number

  Field [f] Ctrlprojremaining =  [d] - [e]
  Field [g] OtherprojCost  - -Enter in Number
Field [h] OtherprojBilling  - -Enter 
in Number

  Field [i] Otherprojremaining =  [g] - [h]
 Field [j] BondedAmount =  -Enter in Number
 Field [k] Bondedprogbilling =  -Enter in Number
  Field [l] Bondedprogremaining =  -= [j] - [ k ]
  Field [m] totalelecworkonhand =  -sum of all remaining = (sum of  C 
all sum records for Values of (C)
 Field [n] totalCtrlworkonhand =  -sum of all remaining = (sum of  F 
all sum records for Values of (F)
 Field [o]totalOtherworkonhand =  -sum of all remaining = (sum of  i 
all sum records for Values of (i)

  Field [p] totalworkonhand =   m + n + o
  Field [Q] totalBondedworkonhand =   sum of all remaining = (sum of  P 
all sum records for Values of (P)


 Any help in all this would be greatly appreaciated,, u can 
also email me via  [EMAIL PROTECTED]


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



Re: Find records not in many-to-many table?

2006-03-27 Thread sheeri kritzer
Your question seems to have been answered already, so let me add one
cautionary note -- use a LIMIT clause when testing out a new query! 
Especially with a join.  A simple mistake can lead to a Cartesian
product of 2 tables -- I always do limit 100 or something so that I
can then check to see that what I get is logically correct.

(I usually craft the query, do a LIMIT, check the logic, then do a
COUNT(fields), check to make sure that sounds like the right #, and
then the final query.  Saves a lot of aborting.  By the way, aborting
the query (say, using Ctrl-C) doesn't actually stop the query, it just
stops the mysql client.  You really need to go in and kill the query
via thread id if you want the server to actually stop performing the
query.)

-Sheeri

On 3/25/06, barney [EMAIL PROTECTED] wrote:
 Folk,

 This may be off-base for this list, but I've run out of places to look, 
 sorry.  I can't seem to find this anywhere, although I'm certain I've seen it 
 before.

 How can I identify all the records in a table that are not referenced in a 
 many-to-many table?

 I have a [unique] table of files and a [unique] table of attributes.  These 
 are linked in a merge table which is many-to-many.  I need to find all items 
 in the file table that are not referenced in the merge table in order to add 
 appropriate attributes for those records.  The attribute list is 26-30 
 records and the file table is currently about 3,200 records, which could make 
 for a merge table of 96,000 records.

 I tried using an IN statement against a sub-select of unique file ids in the 
 merge table, but either that will not work or I did not craft it properly  
 The query hit 6 million records before I aborted it sigh /.

 I'm certain this can be done ... I seem to remember a similar process from 
 the DB2 corporate days ... but I just cannot wrap my head around it.  Anybody 
 have any ideas, please?

 Make a good day ...
   ... barn




 --
 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: Summing tables and fields Please help,,,

2006-03-27 Thread Peter Brawley




Brian,

can someone post
a snippit
on Summing tables together of a feild of the 
entire Database ? 
Do you mean summing
all row
values of a column in a table, grouped by the value of another column?
If so, for example to
retrieve all electprojcost, electprojbilling values and their
differences per
projectname would be ...

SELECT 
 projectname, 
 SUM(electprojcost),
 SUM(elecprojbilling),
 SUM(elexprojcost-electprojbilling)
AS margin
FROM orders
GROUP BY projectname;
Or
do you mean something else?

PB

-

Brian E Boothe wrote:
can
someone post a snippit on Summing tables together of a feild of the
  
entire Database ? why does everyone Have such a problem with this
question? everyone i ask says the same thing,, let me show what i'm
needing by Visual representation
  
 MySQL database  workorders
  
 Table : Orders
  
 Field(aa) ProjectName -- [enter Projectname]
  
 Field [a] ElecprojCost - -Enter in
Number
  
 Field [b] ElecprojBilling --Enter in
Number
  
 Field [c] Elecprojremaining = [a] - [b]
  
 Field [d] CtrlprojCost - -Enter in
Number
  
 Field [e] CtrlprojBilling - -Enter
in Number
  
 Field [f] Ctrlprojremaining = [d] - [e]
  
 Field [g] OtherprojCost - -Enter in
Number
  
 Field [h] OtherprojBilling -
-Enter in Number
  
 Field [i] Otherprojremaining = [g] - [h]
  
Field [j] BondedAmount = -Enter in Number
  
Field [k] Bondedprogbilling = -Enter in Number
  
 Field [l] Bondedprogremaining = -= [j] - [ k ]
  
 Field [m] totalelecworkonhand = -sum of all remaining = (sum of
C all sum records for Values of (C)
  
Field [n] totalCtrlworkonhand = -sum of all remaining = (sum of
F all sum records for Values of (F)
  
Field [o]totalOtherworkonhand = -sum of all remaining = (sum of
i all sum records for Values of (i)
  
 Field [p] totalworkonhand = m + n + o
  
 Field [Q] totalBondedworkonhand = sum of all remaining = (sum of P
all sum records for Values of (P)
  
  
 Any help in all this would be greatly appreaciated,, u can
also email me via [EMAIL PROTECTED]
  
  



No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date: 3/26/2006


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

Fwd: Insuring select returns the last record for a given day.

2006-03-27 Thread sheeri kritzer
-- Forwarded message --
From: sheeri kritzer [EMAIL PROTECTED]
Date: Mar 27, 2006 1:18 PM
Subject: Re: Insuring select returns the last record for a given day.
To: Paul Halliday [EMAIL PROTECTED]


I have a similar table, so I tried out your query on the table I have:

 select created,date_format(created,'%Y-%m-%d') as day from Users
where date_sub(curdate(),interval 14 day)created group by day;

(my dates are 'datetime' not unix timestamp)

And in fact I got a random time of day, not the actual last one --
usually closer to the beginning of the day, actually.

The following query worked for me:

select date_format(max(created),'%Y-%m-%d'),
date_format(created,'%Y-%m-%d') as day from Users where
date_sub(curdate(),interval 7 day)created group by day;

You have to do the date format twice -- in my example, the first field
I select is the maximum, the second is what you group on.  You cannot
group on the max field by itself.

(a simple select max(created) as day from Users group by day; got me
ERROR 1056 (42000): Can't group on 'day')

hope it helps!

-Sheeri

On 3/27/06, Paul Halliday [EMAIL PROTECTED] wrote:
 Hi,

 I have a table that looks somthing like this:

 ID   timestampcampusIDS ePOinbound
 outbound   statinfo

 2289411143430287MA0 0424526713
 284590944  0  NULL
 2289401143430002ST 2 0290248558
 119939485  0  NULL
 2289391143430290AN122001697436588
 20836217840  NULL

 I am trying to read the last record for each column for a given day
 (when the stats are input they are already a sum, so the last entry
 will be the cumulative total for each day). My query looks like this:

 select campus,date_format(from_unixtime(timestamp),'%Y-%m-%d') as
 day,inbound,outbound,IDS,ePO from stats where
 date_sub(curdate(),interval 7 day) = from_unixtime(timestamp) and
 campus='MA' group by day;

 campus day   inbound  outbound  IDS ePO
 MA2006-03-21618584262358793491974   0
 MA2006-03-2285702498739824446572 0
 MA2006-03-238745243413847904889 50
 MA2006-03-244856668982854718766  1   0
 MA2006-03-25798980766 250534732  00
 MA2006-03-26424526713 284590944  00
 MA2006-03-27144573737 59843102  790

 So this query returns the last value for each day for the past 7 days
 grouped by day. Tentative testing shows that the values are indeed
 always the last entries but is this the right way to pull off this
 query? I dont see anything specific in the query itself to insure it
 extracts the last record for said day.

 Is this correct or should the query have further processing.

 Thanks.

 --
 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: newbee error (1044)

2006-03-27 Thread Frank Delatorre
Michael, group;

Thanks much for the directionsI followed them and solved my problem!!!

Now I've got this issue and I'm not sure what syntax to use to get this
script to run:

[EMAIL PROTECTED]:~/ZoneMinder-1.22.0/db vi zm_create.sql.in
[EMAIL PROTECTED]:~/ZoneMinder-1.22.0/db mysql mysql 
zm_create.sql.in ERROR 1045 (28000): Access denied for user
'frank'@'localhost' (using password: NO)

It wants to default to the OS user who is logged in and that user is NOT in
the mysql database and does not need to be. I tried to insert the -u root
but got a syntax error .

Any ideas?


On 3/26/06, Michael Stassen [EMAIL PROTECTED] wrote:

 Shawn Sharp wrote:
  Dilipkumar,
 
  Thanks much for the tipit did the job!
 
  Now we query mysql to see if the new mysql database is seen by mysql and
 it
  still only sees test:

 No, you can't see the mysql db, because you don't have permission to
 access it.
   I expect you are still logged in as the anonymous user, who can only
 work with
 the test db.  You have some reading to do.  You've run mysql_install_db,
 now you
 need to secure the initial accounts:

http://dev.mysql.com/doc/refman/4.1/en/default-privileges.html.

 Next you'll want to read up on how mysql's privilege system works:

http://dev.mysql.com/doc/refman/4.1/en/privilege-system.html

 Then you should read about creating and managing user accounts:

http://dev.mysql.com/doc/refman/4.1/en/user-account-management.html

  [EMAIL PROTECTED]:/usr/bin mysqlshow
  +---+
  | Databases |
  +---+
  | test  |
  +---+
  [EMAIL PROTECTED]:/usr/bin

 Michael




--
Frank DeLaTorre
408.390.0415


Table doesn't exist?

2006-03-27 Thread Sara Woglom
I had to shut down my MySQL server (5.0.18) because of an error while
editing a table (Table is full).  I restarted it fine, but in order to do
so I had to delete all my ibdata and ib_logfile files.  Now, I am getting
ERROR 1146: Table 'dbname.tablename' doesn't exist.  Obviously it does
exist, because when I request SHOW TABLES; it lists them all correctly.

What on earth is going on?  I followed the directions for restarting the
server and deleting the log files!  I also ran mysqladmin flush-privileges,
flush-hosts, and refresh.  Please help!


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

RE: Table doesn't exist?

2006-03-27 Thread Ing. Edwin Cruz
Are the permissions corectly to that file???

Chown mysql:mysql /mysql/data/dbname/tablename.*





-Mensaje original-
De: Sara Woglom [mailto:[EMAIL PROTECTED] 
Enviado el: Lunes, 27 de Marzo de 2006 01:47 p.m.
Para: mysql@lists.mysql.com
Asunto: Table doesn't exist?


I had to shut down my MySQL server (5.0.18) because of an error while
editing a table (Table is full).  I restarted it fine, but in order to do
so I had to delete all my ibdata and ib_logfile files.  Now, I am getting
ERROR 1146: Table 'dbname.tablename' doesn't exist.  Obviously it does
exist, because when I request SHOW TABLES; it lists them all correctly.

What on earth is going on?  I followed the directions for restarting the
server and deleting the log files!  I also ran mysqladmin flush-privileges,
flush-hosts, and refresh.  Please help!




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



Re: Comparing x.x.x.x strings

2006-03-27 Thread Jake Peavy
On 3/27/06, Lucas Vendramin [EMAIL PROTECTED] wrote:

 Thank you.
 The INET_ATON() function works fine. :D
 I hope this solution save me.
 Thanks.

  Take a look at the MySQL function INET_ATON and it's counterpart (I
 don't
  remember what it's counterpart is but it should be easy to find once you
  find INET_ATON).
 
  I know in PHP there is a function that will convert x.x.x.x to an int
 and
  then you just put that int into a field in your database and then use
 the
  INET_ATON function in MySQL to select the ips you want.
 
  SELECT INET_ATON('3.2.0.13')  INET_ATON('3.2.0.2')
 
  That should return TRUE. :)
 
  Hope that helps.
 

  On 3/24/06 2:44 PM, Lucas Vendramin [EMAIL PROTECTED] wrote:
 
  Hi all.
  I have a problem:
  When I compare two strings in mask (x.x.x.x) the comparation is not
 true
  (for
  my question :D)... look:
   select '3.2.0.13'  '3.2.0.2'- FALSE
  I want this command return TRUE, but it is returning FALSE.
  But, if I put a space first into the smaller string the camparation
 will
  returns what I want:
   select '3.2.0.13'  ' 3.2.0.2'- TRUE
 
  How can I check it? There is a way to correct my problem? The string is
  like a
  IP-ADDRESS where 192.168.0.13 is better than 192.168.0.2, but it is not
 a
  IPADDRESS column, it is a Version of file (version 3.2.0, version 3.2.1
 ,
  etc...)


Note that your version numbers will have to remain formatted as 4 dotted
decimals or that function will throw an error.  You may have to 0-fill
unused octets (such as version 4.0.0.0 instead of simply version 4.0)

In addition, your version numbers will have to be IP-like -- for example a
version of 2.2.0.918 will error.


--
 -jp


Update multiple tables

2006-03-27 Thread Mike Blezien

Hello,

I'm alittle unclear on how too update multiple tables. We have two tables with 
the same column name:

account.state
account_service.state

when we update the account table, we also need to update the account_service 
table with the same value for the 'state' column. Can this be done with MySQL 
4.1.12. and what is the correct syntax?



Thx's
Mickalo 



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



how to start mysql instanct manager on Solaris platform?

2006-03-27 Thread Jenny Chen
Hi,

I'm trying to start mysql with mysql IM, by following the steps as bellow:

1. change the use_mysqld_safe = 0 in the mysql.server

2.set /etc/my.cnf as:
[client]
#password   = your_password
port= 3306
socket  = /tmp/mysql.sock

# Here follows entries for some specific programs
[manager]
default-mysqld-path = /usr/local/mysql/bin/mysqld
socket=/tmp/manager.sock
pid-file=/tmp/manager.pid
monitoring-interval = 2
port = 1999
bind-address = 209.128.126.155

# The MySQL server
[mysqld]
mysqld-path=/usr/local/mysql5018_mmap_2/bin/mysqld
socket=/tmp/mysql.sock
port=3307
server_id=1
skip-stack-trace
core-file
skip-bdb
log-bin
log-error
log=mylog
log-slow-queries

[mysqld2]
port=3308
server_id=2
mysqld-path= /tests/jc_data/mysql-
standard-5.0.15-solaris10-x86_64/bin/mysqld
socket = /tmp/mysql.sock5
pid-file   = /tmp/hostname.pid5
datadir= /tests/jc_data/mysql-standard-5.0.15-solaris10-x86_64/data
log-bin
log=/tmp/fordel.log

3. Then I start mysql by running
   mysql.server start
4. I noticed that a few problems:
   a. only the first mysqld(under
/usr/local/mysql5018_mmap_2/bin/mysqld)started,
the mysqld2 didn't start

5. If I run the client from
  /usr/local/mysql/bin/mysql
  mysql show instances
 It complained wrong sysntax,that make me believe that commands for MySQL IM
accepts are not available for some reason.

Is there anything wrong with my above steps causing the problems?
Thanks in advance for your information!


Jenny


RE: Table doesn't exist?

2006-03-27 Thread Sara Woglom
I can't run the chown command.  I'm on a Windows 2003 Server machine.


-Original Message-
From: Ing. Edwin Cruz [mailto:[EMAIL PROTECTED]
Sent: Monday, March 27, 2006 3:01 PM
To: 'Sara Woglom'
Subject: RE: Table doesn't exist?


Are the permissions corectly to that file???

Chown mysql:mysql /mysql/data/dbname/tablename.*



-Mensaje original-
De: Sara Woglom [mailto:[EMAIL PROTECTED] 
Enviado el: Lunes, 27 de Marzo de 2006 01:47 p.m.
Para: mysql@lists.mysql.com
Asunto: Table doesn't exist?


I had to shut down my MySQL server (5.0.18) because of an error while
editing a table (Table is full).  I restarted it fine, but in order to do
so I had to delete all my ibdata and ib_logfile files.  Now, I am getting
ERROR 1146: Table 'dbname.tablename' doesn't exist.  Obviously it does
exist, because when I request SHOW TABLES; it lists them all correctly.

What on earth is going on?  I followed the directions for restarting the
server and deleting the log files!  I also ran mysqladmin flush-privileges,
flush-hosts, and refresh.  Please help!






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



Re: Update multiple tables

2006-03-27 Thread Rhino


- Original Message - 
From: Mike Blezien [EMAIL PROTECTED]

To: MySQL List mysql@lists.mysql.com
Sent: Monday, March 27, 2006 3:39 PM
Subject: Update multiple tables



Hello,

I'm alittle unclear on how too update multiple tables. We have two tables 
with the same column name:

account.state
account_service.state

when we update the account table, we also need to update the 
account_service table with the same value for the 'state' column. Can this 
be done with MySQL 4.1.12. and what is the correct syntax?



I think you're asking if you can update both tables within the same SQL 
statement.


Unless MySQL works much differently than DB2, the main relational database I 
use, you have to write a separate UPDATE statement for each table. 
Relational databases (or at least DB2!) normally require that an UPDATE 
statement can only affect a single table; you can't put multiple table names 
in the FROM clause of an UPDATE statement.


Assuming you are using an engine that supports transactions, I would 
definitely make a point of enclosing both updates within a single 
transaction. That way, if one of the updates fails, they will both be rolled 
back to maintain consistency. Otherwise, if the first update succeeds and 
then you hit a problem, like a power failure, the column that is common to 
both tables will have one value in one table and a different value in the 
other table.


--
Rhino 




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date: 26/03/2006


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



Re: ANN: Database Workbench 2.8.5 released!

2006-03-27 Thread Nick Arnett
On 3/27/06, Martijn Tonies [EMAIL PROTECTED] wrote:

 Ladies, gentlemen,

 Upscene Productions is proud to announce the next
 version of the popular database development tool:

 Database Workbench 2.8.5 has been released today!


I'd like to hear more about the stored procedure debugger -- does all the
functionality in the documentation work with MySQL?  Anybody used this with
MySQL, who could describe their experience with it?

I would really love a good SP debugger!

Nick

--

Nick Arnett
[EMAIL PROTECTED]
Messages: 408-904-7198


Starting mysql monitor on Windows 2000

2006-03-27 Thread Whil Hentzen

Hi folks,

I have MySQL 5.0.18 running like a charm on Win2K as a service. I've 
been connecting to it willy-nilly, creating databases and querying the 
daylights out of it. Working just dandy.


I'm trying to run the MySQL monitor in a DOS box and having no luck. I 
open a DOS box, and no matter what command I run, I do not get the nifty 
mysql prompt that I can get on my Linux machine. Here are some 
permutations and the results (or lack thereof):


c:\mysql\bin mysql -u root -p
mysql: unknown variable 'log-general.log'

c:\mysql\bin mysqld
(no response, just another DOS prompt)

c:\mysql\bin mysqld-nt
(again, no response, just another DOS prompt)

Watching Task Manager while I do this provides no new data. I still just 
see mysqld-nt running as a process.


I'm stuck here - no error messages to search on (the mysql error message 
didn't turn up any results on a specialized search on mysql.com or 
general google search). I also searched my yearlong stash of mailing 
messages and had no luck there either.


The doc (section 3.1 - Connecting/Disconnecting to the server) said nothing.

Any suggestions?

Whil


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



Re: DBD::mysql::st execute failed: MySQL server has gone away

2006-03-27 Thread Luke Vanderfluit

Hi Sheeri.

sheeri kritzer wrote:


What happens if you try to connect to the database on the commandline?
 


Yup. Basically if I do a particular query from the command line,
I get the following error:
===
InnoDB: Error: tried to read 16384 bytes at offset 1 3469819904.
InnoDB: Was only able to read -1.
060327  8:25:41  InnoDB: Operating system error number 5 in a file 
operation.

InnoDB: Error number 5 means 'I/O error'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html
InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.
060327 08:25:41  mysqld restarted
060327  8:25:42  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060327  8:25:42  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 2 2096716847.
InnoDB: Doing recovery: scanned up to log sequence number 2 2096716847
InnoDB: Last MySQL binlog file position 0 79, file name 
./ticketdb-bin.15

060327  8:25:42  InnoDB: Flushing modified pages from the buffer pool...
060327  8:25:42  InnoDB: Started; log sequence number 2 2096716847
/opt/csw/mysql4/libexec/mysqld: ready for connections.
Version: '4.1.18-log'  socket: '/tmp/mysql.sock'  port: 3306  Source 
distribution

=

Your help is appreciated.
Thanks.
Kind regards.
Luke



-Sheeri

On 3/24/06, Luke Vanderfluit [EMAIL PROTECTED] wrote:
 


Hi.

I'm getting the following error running apache2 with modperl, mysql
4.1.18 and RT 3.4.5
*error:*DBD::mysql::st execute failed: MySQL server has gone away at
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm
line 70.
*context:*
*...*
*66:*   if ($self-{lock}) {
*67:*   local $self-{dbh}-{RaiseError} = 1;
*68:*
*69:*   my $sth = $self-{dbh}-prepare_cached(q{SELECT
RELEASE_LOCK(?)}, {}, 1);
*70:*   $sth-execute($self-{lockid});
*71:*
*72:*   $self-{lock} = 0;
*73:*   }
*74:*   }
*...*

*code stack:*
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:70
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:81
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:87
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/HTML/Mason/Request.pm:1249


If anyone can help, I'd appreciate it.
Kind regards.

--
Luke



   



 




--
Luke



Re: Starting mysql monitor on Windows 2000

2006-03-27 Thread Whil Hentzen
I'm trying to run the MySQL monitor in a DOS box and having no luck. I 
open a DOS box, and no matter what command I run, I do not get the nifty 
mysql prompt that I can get on my Linux machine. Here are some 
permutations and the results (or lack thereof):


c:\mysql\bin mysql -u root -p
mysql: unknown variable 'log-general.log'


I tried downloading the latest zipped binaries (5.0.19) and put them in 
a temp dir. After turning off the current running MySQL service, I ran 
the mysqld binary:


c:\temp\bin mysql --console

This worked fine - told me server was up and waiting. Then I opened a 
second DOS box, ran mysql -u root, and was greeted with my desired 
mysql prompt.


Then, I go back to my original installation:

 C:\mysql\binmysqld --console
 060327 18:51:04 [Warning] options --log-slow-admin-statements and
 w-queries is not set
 060327 18:51:05 [Note] mysqld: ready for connections.
 Version: '5.0.15'  socket: ''  port: 3306  Official MySQL binary

Finally, I go to a second DOS box and this happens:

 C:\mysql\binmysql -u root -p
 mysql: unknown variable 'log=general.log'
 C:\mysql\bin

I should have gotten the mysql prompt.

1. I don't understand what I did this time (mysqld --console) that gets 
the server to work that didn't work before. (I thought the --console 
option was just an aid, not a requirement to connect to the server.)


2. I'm guessing there's setting in my original installation that doesn't 
exist in the temp version. Don't know what, though, nor how to fix it.


Whil


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



Re: problem with encoding utf8 in text field

2006-03-27 Thread Ligaya Turmelle

Grzegorz Smith wrote:

Hi all. In my apps I use two languages: english and my national polish.
Translates i keep in MySQL 5.0 in text field (MyISAM engine) with utf8
encodings. I don't know why but i can get polish translates from databes
properly, my national character are seen from webb like sign ?. I connect
to database with URI like 
host://[EMAIL PROTECTED]:database?read_default_file=mysql configuration file

e.g. c:/windows/my.ini
in configuration file i have:
[client]
port=3306
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
port=3306
default-character-set=utf8
Does anyone can tell mi what I'm doing wrong?


Richard Lynch on the PHP general mailing list gave a response to a 
question very similar to yours... I'll just copy and paste it for your 
information:


Check the HEADERS your web-server is sending.

If they don't have Charset UTF-8 in there, it won't work on REAL
browsers (Mozilla based)

Then, for reasons known only to Microsoft, you have to use a META tag
to define the Charset for IE.

MS will *ignore* the headers in favor of a heuristic whereby they
count the number of characters in any given document which do/don't
fit into various common charsets, and then they choose the charset
based on that.

Apparently, MS assumes that web-designers who can only handle META
tags are smarter than developers who use header() function.  Go
figure. :-^ 


--

life is a game... so have fun.


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

best way to handle two timestamp times

2006-03-27 Thread jonathan
I've looked around the web and found very diffreing ideas about how  
this should be handled.


Basically, I want to have a content row that has two times,  the time  
that an insert was done and the time that it was last updated if any.  
I keep getting an error when I try to create a table with two  
timestamp values (#1293 - Incorrect table definition; there can be  
only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON  
UPDATE clause).


If I can have only one timestamp in the table, what is the ideal way  
to do this?


thanks,

jon

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



Re: JOINs-- need some expertise on this one

2006-03-27 Thread SGreen
Mark [EMAIL PROTECTED] wrote on 03/27/2006 09:45:57 AM:

 Hi i am emiling you hoping you can help me urgently,
 I have a football tipping script which works fine now except i want 
 to update a field from one table to another.
 
 At the moment there is a table (leaderboard) which is updated weekly
 via the updateleaderboard.php
 It shows  USERNAME ,SCORE ,and COMPETITON NAME (eg: George | 12 
 points | harrys comp.) What i want to do is ad an avatar next to 
 each username.
 
 I have already worked out the form for users to choose avatar and 
 place the name of the image in an AVATAR field in the USERNAME table
 and echo it.
 
 My problem is that each week the LEADERBOARD usernames change and so
 do thier scores, comp name and of course their avatar.. i have made 
 an AVATAR field in the LEADERBOARD table as well, now i just need 
 some script which i will use as an i-nclude -on the 
 updateleaderboard script to take the avatar field data and carry it 
 over to the AVATAR field in the LEADERBOARD table as well.
 
 here is my script that doesnt work (also there is no session 
 involved, makes it harder)
 below is my schema
 
 titleupdate_avatars/title?php
 include(header.php);
 include(connect.php);
 
 
 //insert avatar into leaderboard
 
 
 $sql = mysql_query SELECT users.avatar, leaderboard.username FROM 
 users, leaderboard
WHERE users.comp_id=leaderboard.comp_id;
 
   $result = @mysql_query($sql);
 $avatars = avatar; 
 $username = username; 
 
 $query = mysql_query(UPDATE leaderboard SET avatar = '$avatars' 
 WHERE username = '$username');
 $query = mysql_query($sql); 
 
 
 ?
 
 ?php
 include(footer.html);
 ?
 
 
 
 
 
 *
 
 #
 # Table structure for table `comps`
 #
 
 CREATE TABLE `comps` (
   `id` int(11) NOT NULL auto_increment,
   `name` varchar(255) NOT NULL default '',
   `username` varchar(255) NOT NULL default '',
   `password` varchar(255) NOT NULL default '',
   `emailtipsuser` char(1) NOT NULL default '0',
   `emailtipsall` char(1) NOT NULL default '0',
   `latetips` text NOT NULL,
   `winpoints` int(11) NOT NULL default '0',
   `drawpoints` int(11) NOT NULL default '0',
   `joinfee` float NOT NULL default '0',
   `perfect8point` char(1) NOT NULL default '0',
   `perfect8amt` float NOT NULL default '0',
   `ranking` text NOT NULL,
   `email` varchar(255) NOT NULL default '',
   `signup_date` datetime NOT NULL default '-00-00 00:00:00',
   `rules` text NOT NULL,
   `status` text NOT NULL,
   `pool` int(11) NOT NULL default '0',
   PRIMARY KEY  (`id`)
 ) TYPE=MyISAM ;
 
 
 # Table structure for table `leaderboard`
 #
 
 CREATE TABLE `leaderboard` (
   `id` int(11) NOT NULL auto_increment,
   `user_id` int(11) NOT NULL default '0',
   `comp_id` int(11) NOT NULL default '0',
   `username` text NOT NULL,
   `points` int(11) NOT NULL default '0',
   `amt` float NOT NULL default '0',
   `margin` int(11) NOT NULL default '0',
   `acc_margin` int(11) NOT NULL default '0',
   `avatar` varchar(50) NOT NULL default '',
   PRIMARY KEY  (`id`)
 ) TYPE=MyISAM ;
 
 
 CREATE TABLE `tips` (
   `id` int(11) NOT NULL auto_increment,
   `user_id` int(11) NOT NULL default '0',
   `points` int(11) NOT NULL default '0',
   `round` varchar(2) NOT NULL default '0',
   `game` int(11) NOT NULL default '0',
   `winner` text NOT NULL,
   `comp_id` int(11) NOT NULL default '0',
   `margin` int(11) NOT NULL default '0',
   PRIMARY KEY  (`id`)
 ) TYPE=MyISAM ;
 
 #
 # Table structure for table `users`
 #
 
 CREATE TABLE `users` (
   `id` int(11) NOT NULL auto_increment,
   `comp_id` int(11) NOT NULL default '0',
   `username` varchar(255) NOT NULL default '', 
   `password` varchar(255) NOT NULL default '',
   `phone` varchar(255) NOT NULL default '',
   `email` varchar(255) NOT NULL default '',
   `signup_date` datetime NOT NULL default '-00-00 00:00:00',
   `last_login` datetime NOT NULL default '-00-00 00:00:00',
   `activated` char(1) NOT NULL default '',
   `first_name` varchar(50) NOT NULL default '',
   `last_name` varchar(50) NOT NULL default '',
   `avatar` varchar(50) NOT NULL default '',
   PRIMARY KEY  (`id`)
 ) TYPE=MyISAM ;
 
 }
 
 ?
 
 
 **
 
 Regards MArk

Multi-table updates work just like multi-table selects. All you need to do 
is to swap things around a little.

UPDATE leaderboard l
INNER JOIN users u
on u.comp_id = l.comp_id
SET l.avatar = u.avatar;

Because we are using an INNER JOIN, you will only be updating those 
records in leaderboard (because that what we said to do in our SET clause) 
with a valuefrom users (also from the SET clause) based on whether 
leaderboard.comp_id = users.comp_id (please look at the ON clause).

Please RTFineM for more details:
http://dev.mysql.com/doc/refman/4.1/en/update.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Re: Update multiple tables

2006-03-27 Thread SGreen
Mike Blezien [EMAIL PROTECTED] wrote on 03/27/2006 03:39:15 PM:

 Hello,
 
 I'm alittle unclear on how too update multiple tables. We have two 
 tables with 
 the same column name:
 account.state
 account_service.state
 
 when we update the account table, we also need to update the 
account_service 
 table with the same value for the 'state' column. Can this be done with 
MySQL 
 4.1.12. and what is the correct syntax?
 
 
 Thx's
 Mickalo 
 

Are there any other fields that link those two tables?

If not, this may work It would have been much easier to answer if you 
had provided more information about your tables and how they relate to 
each other.

UPDATE account act
INNER JOIN account_service svc
on act.state = svc.state
SET act.state = newvalue, svc.state = newvalue
WHERE svc.state = oldvalue;

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Re: DBD::mysql::st execute failed: MySQL server has gone away

2006-03-27 Thread Ravi Prasad LR
Luke,

 Yup. Basically if I do a particular query from the command line,
 I get the following error:
 ===
 InnoDB: Error: tried to read 16384 bytes at offset 1 3469819904.
 InnoDB: Was only able to read -1.
 060327  8:25:41  InnoDB: Operating system error number 5 in a file
 operation.
 InnoDB: Error number 5 means 'I/O error'.
 InnoDB: Some operating system error numbers are described at
 InnoDB: http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html
 InnoDB: File operation call: 'read'.
 InnoDB: Cannot continue operation.
 060327 08:25:41  mysqld restarted
 060327  8:25:42  InnoDB: Database was not shut down normally!
 InnoDB: Starting crash recovery.
 InnoDB: Reading tablespace information from the .ibd files...
 InnoDB: Restoring possible half-written data pages from the doublewrite
 InnoDB: buffer...
 060327  8:25:42  InnoDB: Starting log scan based on checkpoint at
 InnoDB: log sequence number 2 2096716847.
 InnoDB: Doing recovery: scanned up to log sequence number 2 2096716847
 InnoDB: Last MySQL binlog file position 0 79, file name
 ./ticketdb-bin.15
 060327  8:25:42  InnoDB: Flushing modified pages from the buffer pool...
 060327  8:25:42  InnoDB: Started; log sequence number 2 2096716847
 /opt/csw/mysql4/libexec/mysqld: ready for connections.
 Version: '4.1.18-log'  socket: '/tmp/mysql.sock'  port: 3306  Source
 distribution

It looks like your disk is having problems.What does 'dmesg' 
or /var/log/messages  say.

Thanks,
Ravi 



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



mysql restart error

2006-03-27 Thread leo huang
hi,

I met the MySQL restart error today.

First, I stopped the running mysql server using
/usr/local/mysql/bin/mysqladmin -uroot shutdown.

After the server shutdowned, I restarted it using
/usr/local/mysql/bin/mysqld_safe .

Then, I got this error: [ERROR] Can't start server: Bind on TCP/IP port:
Address already in use.

There was no other process that was using the port 3306 which mysql server
use. But there were some mysql connect did not release because the shutdown.


The error log is followed:
060328  8:20:45 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

060328  8:20:47  InnoDB: Starting shutdown...
060328  8:20:49  InnoDB: Shutdown completed; log sequence number 120
2134241340
060328  8:20:49 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

060328 08:20:49  mysqld ended

060328 08:21:15  mysqld started
060328  8:21:15 [ERROR] Can't start server: Bind on TCP/IP port: Address
already in use
060328  8:21:15 [ERROR] Do you already have another mysqld server running on
port: 3306 ?
060328  8:21:15 [ERROR] Aborting

060328  8:21:15 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

060328 08:21:15  mysqld ended

The netstat outputs are followed:
$ netstat -al
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address  Foreign Address(state)
tcp4   0  0  bj.3306  s4.9405   FIN_WAIT_2
tcp4   0  0  bj.3306  s4.5168   FIN_WAIT_2
tcp4   0  0  bj.3306  s4.25007  FIN_WAIT_2
tcp4   0  0  bj.3306  s4.9940   FIN_WAIT_2
tcp4   0  0  bj.3306  s4.3916   FIN_WAIT_2
tcp4   0  0  bj.3306  s4.15229  FIN_WAIT_2
tcp4   0  0  bj.3306  s4.6479   FIN_WAIT_2
tcp4   0  0  bj.3306  s4.7873   FIN_WAIT_2

Our mysql version is 4.1.18. It is running on FreeBSD 4.9-RELEASE.

Any comment will be great thankful!

Regards,
Leo Huang


Slow performance in 4.1 and 5.0?

2006-03-27 Thread PauloMorfeo
I am using the .net connector for mono in my application to connect to MySql
servers. Application is open-source and can be found here:
http://fileuniverse.com/?p=showitemID=2746
The program searches some text files for info to store in a database.

- In both my Linux boxes, with MySql 4.1, program runs at normal speed.
- In Windows, with MySql 4.0, program runs at normal speed. MySql Administrator
shows, in the Health section, around 700 KB/s of traffic while the program
executes.

The problem is MySql 4.1 and 5.0 on my Windows...
- With MySql 4.1, in Windows, the traffic is extremely slow for many minutes,
showing some 7~14 KB/s of traffic, until, at some point, it blasts off to
working fast again, quickly finishing the work.

- With MySql 5.0, in Windows, the traffic never seems to change from a perfectly
stable 9.1~9.2 KB/s of traffic. Needless to say, that way it takes forever to
finish the task.

All instalations made in Windows had all the default setting and i'm always
using the default root user without modifications except for password 
modification.
Anyone have any idea what might be happening?
__
O email preferido dos portugueses agora com
2 000 MB de espaço e acesso gratuito à Internet
http://www.portugalmail.pt/2000mb

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



Re: mysql restart error

2006-03-27 Thread leo huang
hi, Lakshmi

 The mysql process had ended. I get it from both mysql err log and ps
output.

regards,
Leo Huang

2006/3/28, Lakshmi M P [EMAIL PROTECTED]:

 Run   ps -ef | grep mysql and see any mysql process is running and if so
 kill the same and try to start mysql.It may help.
 leo huang wrote:
  hi,
 
  I met the MySQL restart error today.
 
  First, I stopped the running mysql server using
  /usr/local/mysql/bin/mysqladmin -uroot shutdown.
 
  After the server shutdowned, I restarted it using
  /usr/local/mysql/bin/mysqld_safe .
 
  Then, I got this error: [ERROR] Can't start server: Bind on TCP/IP port:
  Address already in use.
 
  There was no other process that was using the port 3306 which mysql
 server
  use. But there were some mysql connect did not release because the
 shutdown.
 
 
  The error log is followed:
  060328  8:20:45 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown
 
  060328  8:20:47  InnoDB: Starting shutdown...
  060328  8:20:49  InnoDB: Shutdown completed; log sequence number 120
  2134241340
  060328  8:20:49 [Note] /usr/local/mysql/libexec/mysqld: Shutdown
 complete
 
  060328 08:20:49  mysqld ended
 
  060328 08:21:15  mysqld started
  060328  8:21:15 [ERROR] Can't start server: Bind on TCP/IP port: Address
  already in use
  060328  8:21:15 [ERROR] Do you already have another mysqld server
 running on
  port: 3306 ?
  060328  8:21:15 [ERROR] Aborting
 
  060328  8:21:15 [Note] /usr/local/mysql/libexec/mysqld: Shutdown
 complete
 
  060328 08:21:15  mysqld ended
 
  The netstat outputs are followed:
  $ netstat -al
  Active Internet connections (including servers)
  Proto Recv-Q Send-Q  Local Address  Foreign
 Address(state)
  tcp4   0  0  bj.3306  s4.9405   FIN_WAIT_2
  tcp4   0  0  bj.3306  s4.5168   FIN_WAIT_2
  tcp4   0  0  bj.3306  s4.25007  FIN_WAIT_2
  tcp4   0  0  bj.3306  s4.9940   FIN_WAIT_2
  tcp4   0  0  bj.3306  s4.3916   FIN_WAIT_2
  tcp4   0  0  bj.3306  s4.15229  FIN_WAIT_2
  tcp4   0  0  bj.3306  s4.6479   FIN_WAIT_2
  tcp4   0  0  bj.3306  s4.7873   FIN_WAIT_2
 
  Our mysql version is 4.1.18. It is running on FreeBSD 4.9-RELEASE.
 
  Any comment will be great thankful!
 
  Regards,
  Leo Huang
 
 


 --
 regards,
 Lakshmi.M.P.
 DBA-Support
 Sify Limited.
 Ext:4134

 ** DISCLAIMER **
 Information contained and transmitted by this E-MAIL is proprietary to
 Sify Limited and is intended for use only by the individual or entity to
 which it is addressed, and may contain information that is privileged,
 confidential or exempt from disclosure under applicable law. If this is a
 forwarded message, the content of this E-MAIL may not have been sent with
 the authority of the Company. If you are not the intended recipient, an
 agent of the intended recipient or a  person responsible for delivering
 the
 information to the named recipient,  you are notified that any use,
 distribution, transmission, printing, copying or dissemination of this
 information in any way or in any manner is strictly prohibited. If you
 have
 received this communication in error, please delete this mail  notify us
 immediately at [EMAIL PROTECTED]

 www.sify.com - your homepage on the internet for news, sports, finance,
 astrology, movies, entertainment, food, languages etc



SP Debugger (was: Re: ANN: Database Workbench 2.8.5 released!)

2006-03-27 Thread Martijn Tonies
Hello Nick,

 Upscene Productions is proud to announce the next
 version of the popular database development tool:

 Database Workbench 2.8.5 has been released today!


I'd like to hear more about the stored procedure debugger -- does all the
functionality in the documentation work with MySQL?  Anybody used this with
MySQL, who could describe their experience with it?

I would really love a good SP debugger!

I'm sorry to say the debugger only works with InterBase
and Firebird.

The MySQL server doesn't provide debugging hooks, by itself,
this is a problem for 3rd party tool vendors. InterBase or Firebird
don't provide these either, but we are emulating server behaviour
at the client side. Although this works for a very large part, it isn't
exactly easy and there are still problems sometimes, it's hard to
get perfect.

This is the reason why we haven't gone that route with MySQL.

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


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



Re: InnDB disabbled on 5.1.7

2006-03-27 Thread Heikki Tuuri

Gordon,

what does mysqld write to the .err log?

InnoDB should be included in all 5.1 binaries.

Best regards,

Heikki

Oracle Corp./Innobase Oy
InnoDB - transactions, row level locking, and foreign keys for MySQL

InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM 
tables

http://www.innodb.com/order.php


- Original Message - 
From: Gordon [EMAIL PROTECTED]

Newsgroups: mailing.database.myodbc
Sent: Friday, March 24, 2006 9:48 PM
Subject: InnDB disabbled on 5.1.7



We are running 2.6.15-gentoo Linux and downloaded the max binaries for
5.1.7. With the following my.cnf I thought we should have InnoDB. All of =
the
InnoDB files got created but show variables like 'have%'; displays 
have_innodb  DISABLED. Exactly the same my.cnf {except the skip bdb is =
not
commented out} has InnoDB enabled.

Any ideas on what we have to do to enable InnoDB.

my.cnf

# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/var) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the --help option.
=A0
# The following options will be passed to all MySQL clients
[client]
#password=A0=A0=A0=A0=A0=A0 =3D your_password
port=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 3306
socket=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D /tmp/mysql.sock
=A0
# Here follows entries for some specific programs
=A0
# The MySQL server
[mysqld]
port=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 3306
socket=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D /tmp/mysql.sock
max_connections =3D 100
key_buffer =3D 256M
max_allowed_packet =3D 1M
table_cache =3D 256
sort_buffer_size =3D 256K
read_buffer_size =3D 256K
read_rnd_buffer_size =3D 256K
thread_cache_size =3D 8
query_cache_size=3D 2M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency =3D 4
=A0
=A0
=A0
# Replication Master Server (default)
# binary logging is required for replication
log-bin=3Dmysql-bin
=A0
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id=A0=A0=A0=A0=A0=A0 =3D 1
=A0
=A0
=A0
# Point the following paths to different dedicated disks
#tmpdir=A0=A0=A0=A0=A0=A0=A0=A0 =3D /tmp/
#log-update=A0=A0=A0=A0 =3D /path-to-dedicated-directory/hostname
=A0
skip-bdb
=A0
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir =3D /usr/local/var/
innodb_data_file_path =3D =
ibd1:2000M;ibd2:2000M;ibd3:2000;ibd4:10M:autoextend
#innodb_log_group_home_dir =3D /usr/local/var/
#innodb_log_arch_dir =3D /usr/local/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size =3D 512M
innodb_additional_mem_pool_size =3D 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size =3D 128M
innodb_log_buffer_size =3D 8M
innodb_flush_log_at_trx_commit =3D 0
innodb_lock_wait_timeout =3D 50
=A0
[mysqldump]
quick
max_allowed_packet =3D 16M
=A0
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
=A0

[myisamchk]
key_buffer =3D 128M
sort_buffer_size =3D 128M
read_buffer =3D 2M
write_buffer =3D 2M
=A0
[mysqlhotcopy]
interactive-timeout

mysql select version();
++
| version()  |
++
| 5.1.7-beta-max-log |
++
1 row in set (1.73 sec)

Linux zeus 2.6.15-gentoo-r1 #10 SMP PREEMPT Tue Mar 7 15:36:28 MST 2006 =
i686
Intel(R) Xeon(TM) CPU 3.80GHz GenuineIntel GNU/Linux

mysql show variables like 'have%';
++--+
| Variable_name  | Value|
++--+
| have_archive   | YES  |
| have_bdb   | DISABLED |
| have_blackhole_engine  | YES  |
| have_compress  | YES  |
| have_crypt | YES  |
| have_csv   | YES  |
| have_example_engine| NO   |
| have_federated_engine  | YES  |
| have_geometry  | YES  |
| have_innodb| DISABLED |
| have_ndbcluster| DISABLED |
| have_openssl   | NO   |
| have_partitioning  | YES  |
| have_query_cache   | YES  |
| have_row_based_replication | YES  |
| have_rtree_keys| YES  |
| have_symlink   | YES  |
++--+
17 rows in set (0.10 sec)

mysql show variables like 'inno%';
+-+--=
---
+
| Variable_name   | Value
|
+-+--=
---
+
| innodb_additional_mem_pool_size | 20971520
|
| innodb_autoextend_increment | 8
|
| 

Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2006-03-27 Thread Heikki Tuuri

Marten,

can you email the complete .err log from the server to 
[EMAIL PROTECTED]


I am interested in what caused the very first crash in the server. Now your 
database seems to be seriously corrupt, since the log sequence number in the 
log files is only 14 MB, while it is = 153 MB in a data file!


Did you move around or delete ib_logfiles or ibdata files or .ibd files, or 
edit my.cnf while mysqld was running?


Are you using some exotic file system?

The output looks like ib_logfiles and data files from different servers 
would be mixed.


Best regards,

Heikki

Oracle Corp./Innobase Oy
InnoDB - transactions, row level locking, and foreign keys for MySQL

InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM 
tables

http://www.innodb.com/order.php




- Original Message - 
From: Marten Lehmann [EMAIL PROTECTED]

Newsgroups: mailing.database.myodbc
Sent: Monday, March 27, 2006 3:46 PM
Subject: ERROR 2013 (HY000): Lost connection to MySQL server during query



Hello,

again, I'm having problems with InnoDB tables. A certain table cannot be
dropped. If I'm issueing the drop table statement, the connection is
lost and I get the following in the logfile:

060327 14:38:11  InnoDB: error: space object of table 
db15670/mw_pagelinks,

InnoDB: space id 12 did not exist in memory. Retrying an open.
InnoDB: Error: trying to add tablespace 12 of name
'./db15670/mw_pagelinks.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 12 of name './db15720/admin.ibd' already exists in the tablespace
InnoDB: memory cache!
060327 14:38:11  InnoDB: Error: page 3 log sequence number 0 153218641
InnoDB: is in the future! Current system log sequence number 0 14322402.
InnoDB: Your database may be corrupt.
060327 14:38:11InnoDB: Assertion failure in thread 196621 in file
fsp0fsp.c line 3202
InnoDB: Failing assertion: xdes_get_bit(descr, XDES_FREE_BIT,
buf_frame_get_page_no(header) % FSP_EXTENT_SIZE, mtr) == FALSE
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly 
built,
or misconfigured. This error can also be caused by malfunctioning 
hardware.

We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail.

key_buffer_size=402653184
read_buffer_size=2093056
max_used_connections=12
max_connections=1000
threads_connected=5
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections
= 290904 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8a000c18
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbe1fbe08, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80a43b4
0x82bf71c
0x820a5fd
0x81b64f5
0x8169f26
0x81a4bc7
0x81a4224
0x81a36c2
0x817f332
0x817e57d
0x819376b
0x8125411
0x811ba68
0x812abe0
0x812a500
0x80b76b2
0x80bbb72
0x80b54bd
0x80b5102
0x80b48f9
0x82bb001
0x82ed89a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and
follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd-query at 0x8bb38e0 = drop table mw_pagelinks
thd-thread_id=220
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0
060327 14:38:12  mysqld restarted
060327 14:38:12  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.

The whole mysql-server crashed just because something is wrong in one
innodb table. The force-recovery-hint didn't help at all, because it
just made it possible do drop the table, but nothing was fixed and I
couldn't create the table back then.

Why does this happen?

Regards
Marten

--
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: best way to handle two timestamp times

2006-03-27 Thread Gabriel PREDA
You can make the first timestamp without autoupdating and a default value
with no importance... and the second with

DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

When you insert a new row.. .you'll use:
Asuming the table has columns: col1, ., colN, col_timestamp1,
col_timestamp2
INSERT INTO table_name (col1, ., colN, col_timestamp1) VALUES
('value_col1', ... 'value_colN', NOW())

This way the first TIMESTAMP column is registered with the
CURRENT_TIMESTAMP so is the second because the default value is also
CURRENT_TIMESTAMP.
But ... from now on for every change in the row only the second column will
change values !

--
Gabriel PREDA
Senior Web Developer


On 3/28/06, jonathan [EMAIL PROTECTED] wrote:

 Basically, I want to have a content row that has two times,  the time
 that an insert was done and the time that it was last updated if any.
 I keep getting an error when I try to create a table with two
 timestamp values (#1293 - Incorrect table definition; there can be
 only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON
 UPDATE clause).
 If I can have only one timestamp in the table, what is the ideal way
 to do this?
 thanks,
 jon