Page 1 of 1

Avoiding Mysql error

Posted: 12 Jul 2012, 15:56
by viking60
I have been the object of Guru-Berserk fury due to the fact that they produce and deliver their divine stuff and then they are met with a Mysql-error after 4h of work :f
That is enough to PO everyone and most certainly Berserks +1
My standing in Valhalla was jeopardized by this so I needed to find out what it was - fast!
Here are the results of the Valhallian jury:

:A
What rolf was trying to say:

Code: Select all

$ man rpm
..
-a, --all
Query all installed packages.
..
VERIFY OPTIONS
The general form of an rpm verify command is

rpm {-V|--verify} [select-options] [verify-options]

Verifying a package compares information about the installed files in the package with information about
the files taken from the package metadata stored in the rpm database. Among other things, verifying compares the size, MD5 sum,permissions, type, owner and group of each file. Any discrepancies are displayed. Files that were not installed from the package, for example, documentation files excluded on
installation using the "--excludedocs" option, will be silently ignored.

The package selection options are the same as for package querying (including package manifest files as
arguments). Other options unique to verify mode are:
..
--nodigest
Don't verify package or header digests when reading.
--nofiles
Don't verify any attributes of package files.
..
The format of the output is a string of 8 characters, a possible attribute marker:

c %config configuration file.
d %doc documentation file.
g %ghost file (i.e. the file contents are not included in the package payload).
l %license license file.
r %readme readme file.

from the package header, followed by the file name. Each of the 8 characters denotes the result of a comparison of attribute(s) of the file to the value of those attribute(s) recorded in the database. A single
"." (period) means the test passed, while a single "?" (question mark) indicates the test could not be
performed (e.g. file permissions prevent reading). Otherwise, the (mnemonically emBoldened) character
denotes failure of the corresponding --verify test:

S file Size differs
M Mode differs (includes permissions and file type)
5 MD5 sum differs
D Device major/minor number mismatch
L readLink(2) path mismatch
U User ownership differs
G Group ownership differs
T mTime differs

..

AFAIK, the --verify option can tell you if something has changed between the rpm package and how it's installed on your disk. This can be normal, such as changes to a configuration file you make, or might reveal some sort of corruption or unwanted fiddling. I only use it as a preliminary check, usually against one package I'm having trouble with, not -a, and don't have a very profound understanding of its usage.
:confused

rpm is pretty complex, isn't it? :whistle:
************************************
ONLY ROLF NEVER MANAGED TO POST THIS (I have fixed it now though).
Due to word division error the wrongful divisions that caused an Mysql error were
dis-
played

next
com-
pares
<--- unsure about this one but dead sure about the other two
then
com-
parison


What I did was to pull them together to one word and that made the post just fine.
My suspicion is that this has been copied from another system that divides the words in a non digestive way for PHPBB.
Rolf's original post is here
If you copy and paste that in here you will get a frustrating Mysql error - every time. If you fix the three words above it will work just fine.
Can you confirm rolf?

Re: Avoiding Mysql error

Posted: 12 Jul 2012, 17:46
by rolf

Re: Avoiding Mysql error

Posted: 12 Jul 2012, 17:52
by rolf
OH. :oops: I read too quickly and thought the separation was something you did in the sql code. Now, I see those words in my code block, did take out the hyphens, and will try again. :pray:

Image

Image

Image

:A

Code: Select all

$ man rpm
..
-a, --all
              Query all installed packages.
..
VERIFY OPTIONS
       The general form of an rpm verify command is

       rpm {-V|--verify} [select-options] [verify-options]

       Verifying a package compares information about the installed files in the package with  information  about
       the  files taken from the package metadata stored in the rpm database.  Among other things, verifying compares
        the size, MD5 sum, permissions, type, owner and group of each  file.   Any  discrepancies  are 
       displayed.   Files  that  were  not  installed from the package, for example, documentation files excluded on
       installation using the "--excludedocs" option, will be silently ignored.

       The package selection options are the same as for package querying (including package  manifest  files  as
       arguments).  Other options unique to verify mode are:
..
--nodigest
              Don't verify package or header digests when reading.

       --nofiles
              Don't verify any attributes of package files.
..
The format of the output is a string of 8 characters, a possible attribute marker:

       c %config configuration file.
       d %doc documentation file.
       g %ghost file (i.e. the file contents are not included in the package payload).
       l %license license file.
       r %readme readme file.

       from the package header, followed by the file name.  Each of the 8 characters denotes the result of a comparison
       of attribute(s) of the file to the value of those attribute(s) recorded in the database.  A single
       "."  (period)  means  the  test passed, while a single "?" (question mark) indicates the test could not be
       performed (e.g. file permissions prevent reading).  Otherwise,  the  (mnemonically  emBoldened)  character
       denotes failure of the corresponding --verify test:

       S file Size differs
       M Mode differs (includes permissions and file type)
       5 MD5 sum differs
       D Device major/minor number mismatch
       L readLink(2) path mismatch
       U User ownership differs
       G Group ownership differs
       T mTime differs

..



AFAIK, the --verify option can tell you if something has changed between the rpm package and how it's installed on your disk. This can be normal, such as changes to a configuration file you make, or might reveal some sort of corruption or unwanted fiddling. I only use it as a preliminary check, usually against one package I'm having trouble with, not -a, and don't have a very profound understanding of its usage.
:confused

rpm is pretty complex, isn't it? :whistle:

Re: Avoiding Mysql error

Posted: 12 Jul 2012, 17:56
by rolf
:B Very good! :s It looks like we have a workaround, thank you Image Image

Re: Avoiding Mysql error

Posted: 12 Jul 2012, 18:49
by viking60
Image
To recapulate:
This happens when you copy text from a terminal into a forum post with a hyphen in it. Typically from man pages.
Make it one word and life is good again:

com-pares = :naughty:
compares= :dance: