InnoDB corrupt after power failure

2012-10-03 Thread Andrew Miklas
Hi guys, I recently had a data corruption issue with InnoDB. MySQL was shut down improperly (power failure), and when the system came back up, MySQL refused to start. On inspection of the logs (see below), it looks like the tablespace became seriously corrupted. In the end, I had to rebuild

Re: passing shell variable to the SET data type in parentheses

2012-10-03 Thread Morning Star
Thanks guys for all the corrections. I fix it by executing: mysql -u $user -p${password} --skip-column-names -e 'ALTER TABLE '$table' MODIFY '$kolom' SET( '$var' );' $database ; :) Greetings, Marco On Thu, Oct 4, 2012 at 4:49 AM, wrote: > 2012/10/03 20:35 +0700, Morning Star > $ ech

Re: passing shell variable to the SET data type in parentheses

2012-10-03 Thread hsv
2012/10/03 20:35 +0700, Morning Star $ echo $var "value1","value2","value3" what i did: mysql -u $user -p${password} --skip-column-names -e 'ALTER TABLE '$table' MODIFY '$kolom' SET(" '$var' ");' $database ; the result: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax;

RE: Accessing Column Aliases In Other Columns?

2012-10-03 Thread Rick James
One way: SELECT @foo := this + that, more_stuff + @foo FROM ...; Another way: SELECT foo, more_stuff + foo FROM ( SELECT this + that AS foo FROM ... ) x; > -Original Message- > From: Jan Steinman [mailto:j...@bytesmiths.com] > Sent: Wednesday, Oc

Accessing Column Aliases In Other Columns?

2012-10-03 Thread Jan Steinman
I would like to refer to calculated columns in other columns. I thought a column alias would do it, but apparently they're only for aggregation, like GROUP BY. Other than repeating the entire calculation, what techniques are available for accessing such a calculation? I'm calculating an electr

Re: need list of country ISO code to demonyms

2012-10-03 Thread Nuno Tavares
Ermmm... actually it was done from Firefox to OpenOffice Calc, on Ubuntu.. :-) I just mentioned Excel so you could get the idea... glad I could help, though :-) -NT Em 03-10-2012 23:21, Daevid Vincent escreveu: HA! No $hit! Well isn't that clever. I didn't know that you can highlight a table

RE: need list of country ISO code to demonyms

2012-10-03 Thread Dave Stevens
Quoting Daevid Vincent : HA! No $hit! Well isn't that clever. I didn't know that you can highlight a table like that, and paste it into Excel. That darn Microsoft -- they think of everything! :) Hell, don't give them ideas! They'll be trying to patent cut and paste... Dave Thanks for the ti

RE: need list of country ISO code to demonyms

2012-10-03 Thread Daevid Vincent
HA! No $hit! Well isn't that clever. I didn't know that you can highlight a table like that, and paste it into Excel. That darn Microsoft -- they think of everything! :) Thanks for the tip. > -Original Message- > From: Nuno Tavares [mailto:nuno.tava...@dri.pt] > Sent: Wednesday, October 03

Re: need list of country ISO code to demonyms

2012-10-03 Thread Nuno Tavares
I don't have it, sorry. But it took me 10 seconds to copy & paste it to an Excel, so I could save it as CSV and import it directly to MySQL. Further on, it'd be as simples as JOIN by name with a table with ISO-to-country-names, which you can fetch in hundreds of places, such as Wikipedia. -N

need list of country ISO code to demonyms

2012-10-03 Thread Daevid Vincent
Anyone have a SQL dump or other programmatically useable map of country ISO codes to demonyms? http://www.geography-site.co.uk/pages/countries/demonyms.html I can parse the strings I suppose there, but that's not quite as accurate, and ripping that out of the HTML page to parse seems painful too.

Re: passing shell variable to the SET data type in parentheses

2012-10-03 Thread Garot Conklin
Should have included an example: echo $var "value1","value2","value3" echo mysql -u $user -p${password} --skip-column-names -e 'ALTER TABLE ' $table' MODIFY '$kolom' SET(" '$var' ");' $database ; mysql -u -p --skip-column-names -e ALTER TABLE   MODIFY  SET(" "value1","value2","value3" "); echo

Re: passing shell variable to the SET data type in parentheses

2012-10-03 Thread Garot Conklin
are you trying to get the value of var encapsulated with  ' ' marks? Typical shell expansion while within " " will output the literal: var=10 echo "'$var'" '10' Have you tried removing the single quotes?  The shell can be funny with ' and "   garotconk...@yahoo.com

Re: passing shell variable to the SET data type in parentheses

2012-10-03 Thread Michael Dykman
What is the result if you echo that line instead of running it? ie: echo mysql -u $user -p${password} --skip-column-names -e 'ALTER TABLE ' $table' MODIFY '$kolom' SET(" '$var' ");' $database ; I'm not clear exactly what the text is of the command you are trying to run. - michael dykman On We

passing shell variable to the SET data type in parentheses

2012-10-03 Thread Morning Star
Hi guys, i have a problem when trying to pass shell variable to the SET data type in parentheses. i have a variable like this: $ echo $var "value1","value2","value3" what i did: mysql -u $user -p${password} --skip-column-names -e 'ALTER TABLE '$table' MODIFY '$kolom' SET(" '$var' ");' $database ;