Professional Web Applications Themes

ins/**/ert?? - MySQL

Recently, someone has told me that they've been able to run queries written like "ins/**/ert ..." work on their server. I've tried it on two different servers and can't seem to do it (never-mind the fact that it seems kinda stupid). This has left me wondering... why can they do it and I can't? Does the server have to be configured in a certain way for it to work? Does it need to be a certain version of MySQL? Or are they just pulling my leg?...

  1. #1

    Default ins/**/ert??

    Recently, someone has told me that they've been able to run queries
    written like "ins/**/ert ..." work on their server. I've tried it on
    two different servers and can't seem to do it (never-mind the fact that
    it seems kinda stupid). This has left me wondering... why can they do
    it and I can't? Does the server have to be configured in a certain way
    for it to work? Does it need to be a certain version of MySQL? Or are
    they just pulling my leg?

    yawnmoth Guest

  2. #2

    Default Re: ins/**/ert??

    yawnmoth wrote:
    > written like "ins/**/ert ..." work on their server.
    > Does it need to be a certain version of MySQL?
    Seems to work on 5.0.21 in the mysql shell, but _not_ in MySQL Query
    Browser. I'd guess that the mysql shell is stripping out the comments
    before executing the statement. So any other environment (Java, PHP,
    ODBC, etc.) that doesn't do this comment pre-processing probably will
    generate an error.

    mysql> sel/**/ect 1;
    +---+
    | 1 |
    +---+
    | 1 |
    +---+
    1 row in set (0.00 sec)

    Regards,
    Bill K.
    Bill Karwin Guest

  3. #3

    Default Re: ins/**/ert??

    Bill Karwin wrote
    >Seems to work on 5.0.21 in the mysql shell, but not in MySQL Query
    >Browser.
    Correct, MySQL Query Browser sends the statements as they are, including
    all the comments. This usually works fine if the comments do not split
    identifiers. Actually, most programming languages do not allow comments
    within identifiers. It seems the MySQL shell tries to be clever here and
    hence confuses people.

    The general rule for comments is: they are allow everywhere where a
    whitespace is allowed.

    Mike
    --
    Mike Lischke, Software Engineer GUI
    MySQL AB, [url]www.mysql.com[/url]
    Mike Lischke Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139