Strange insert: ERROR 1172 (42000)

2006-09-26 Thread Wai-Sun Chia

This is so weird! I'm getting a:
ERROR 1172 (42000): Result consisted of more than one row

I've setup 2 machines. Same table (dbsetup.sql) , same insert
statement (foo.sql), same version (5.0.24a).

Only difference is:
One is my laptop on FC5-i386, the other is a server on RHEL4u4-i386

Any clues? Help!

p.s. I've attached the table definition and the insert statement.
INSERT INTO logs
	(host, facility, priority, level, tag, datetime, program, msg,
	event_id, username, computer_name)
	VALUES (
		REPLACE(TRIM('SGBSPR01.isddc.men.maxis.com.my'),'  ',''),
		REPLACE(TRIM('user'),'	',''),
		REPLACE(TRIM('notice'),'	',''),
		REPLACE(TRIM('notice'),'	',''),
		REPLACE(TRIM('0d'),'	',''),
		REPLACE(TRIM('2006-09-26 22:06:49'),'	',''),
		REPLACE(TRIM('MSWinEventLog;0;Security;6077;Tue Sep 26 22'),'	',''),
		REPLACE(TRIM('MSWinEventLog;0;Security;6077;Tue Sep 26 22:06:41 2006;593;Security;SYSTEM;User;Success Audit;SGBSPR01;Detailed Tracking;;A process has exited:   Process ID: 5708Image File NameC:\\WINDOWS\\system32\\cmd.exe   User Name:  SGBSPR01$   Domain:ISDDCLogon ID:   (0x0,0x3E7);6070'), ':	',':'),
		SUBSTRING_INDEX(SUBSTRING_INDEX('MSWinEventLog;0;Security;6077;Tue Sep 26 22:06:41 2006;593;Security;SYSTEM;User;Success Audit;SGBSPR01;Detailed Tracking;;A process has exited:Process ID: 5708   Image File Name: C:\\WINDOWS\\system32\\cmd.exe  User Name:  SGBSPR01$   Domain: ISDDC   Logon ID:   (0x0,0x3E7);6070', ';',  6), ';', -1),
		SUBSTRING_INDEX(SUBSTRING_INDEX('MSWinEventLog;0;Security;6077;Tue Sep 26 22:06:41 2006;593;Security;SYSTEM;User;Success Audit;SGBSPR01;Detailed Tracking;;A process has exited:Process ID: 5708   Image File Name: C:\\WINDOWS\\system32\\cmd.exe  User Name:  SGBSPR01$   Domain: ISDDC   Logon ID:   (0x0,0x3E7);6070', ';',  8), ';', -1),
		SUBSTRING_INDEX(SUBSTRING_INDEX('MSWinEventLog;0;Security;6077;Tue Sep 26 22:06:41 2006;593;Security;SYSTEM;User;Success Audit;SGBSPR01;Detailed Tracking;;A process has exited:Process ID: 5708   Image File Name: C:\\WINDOWS\\system32\\cmd.exe  User Name:  SGBSPR01$   Domain: ISDDC   Logon ID:   (0x0,0x3E7);6070', ';', 11), ';', -1)
	);
CREATE TABLE IF NOT EXISTS logs (
seq bigint(12) unsigned NOT NULL primary key auto_increment,
hostchar(35),
facilitychar(8),
prioritychar(7),
level   char(7),
tag char(2),
datetimedatetime,
program char(15),
msg text,
event_idinteger,
usernamechar(25),
computer_name   char(25),
index   msg_idx (msg(255)),
index   host_idx (host),
index   program_idx (program),
index   datetime_idx (datetime),
index   priority_idx (priority),
index   facility_idx (facility),
index   event_id_idx (event_id),
index   username_idx (username),
index   computer_name_idx (computer_name)
) TYPE=MyISAM row_format=fixed;


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

Re: transitioning from ms sql

2006-09-26 Thread Wai-Sun Chia

On 9/27/06, Arjun Bhandari [EMAIL PROTECTED] wrote:

Hi,

I have been using MS SQL for the last one year, however would not like to


Huh? If you would NOT like to transition to MySQL, then why are you
asking all these stuff?

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



Re: CentOS 4.3 - MySQL - NIS user issue

2006-09-04 Thread Wai-Sun Chia

On 8/31/06, Tom Brown [EMAIL PROTECTED] wrote:

Hi

I have what i think is a strange issue -


snip

now when a NIS user tries to use the db

[EMAIL PROTECTED] su - bugzilla
[EMAIL PROTECTED] mysql -u bugs -p bugs
ERROR 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)

any ideas why this is or what i can do to make it work?



Do your NIS users mount only their HOME directories from the NIS/MySQL server?
If so, obviously the /var partition on the MySQL server wouldn't be
available to them, right?

To confirm:
1. Log in as a NIS user
2. su to root
3. Check out ls -l /var/lib/mysql/



snip

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



Re: Outputting text in a

2006-08-24 Thread Wai-Sun Chia

On 8/24/06, Dan Buettner [EMAIL PROTECTED] wrote:

Sure - in your sql script, put in
SELECT text to the screen;


Then you'll get 2 copies...
Try this:
SELECT text to the screen AS '';

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