Professional Web Applications Themes

mysqldump file - interpreting syntax - MySQL

Am I interpreting this line correctly : /*!40101 SET OLD_CHARACTER_SET_CLIENT=CHARACTER_SET_CLIENT */; Looks like a C style comment, but ends with a semi-colon - so must be SQL Is the variable OLD_CHARACTER_SET_CLIENT being assigned CHARACTER_SET_CLIENT ? (does mean something that points to the value?) What does !40101 mean? Further down, I have this line : CREATE DATABASE /*!32312 IF NOT EXISTS*/ `rgdata` /*!40100 DEFAULT CHARACTER SET latin1 */; I don't quite understand what /*!32312 and /*!40100 mean? thanks, Roshan...

  1. #1

    Default mysqldump file - interpreting syntax

    Am I interpreting this line correctly :

    /*!40101 SET OLD_CHARACTER_SET_CLIENT=CHARACTER_SET_CLIENT */;

    Looks like a C style comment, but ends with a semi-colon - so must be
    SQL
    Is the variable OLD_CHARACTER_SET_CLIENT being assigned
    CHARACTER_SET_CLIENT ? (does mean something that points to the
    value?)

    What does !40101 mean?

    Further down, I have this line :

    CREATE DATABASE /*!32312 IF NOT EXISTS*/ `rgdata` /*!40100 DEFAULT
    CHARACTER SET latin1 */;

    I don't quite understand what /*!32312 and /*!40100 mean?

    thanks,
    Roshan

    roch77@gmail.com Guest

  2. #2

    Default Re: mysqldump file - interpreting syntax

    [email]roch77[/email] wrote:
    > Am I interpreting this line correctly :
    >
    > /*!40101 SET OLD_CHARACTER_SET_CLIENT=CHARACTER_SET_CLIENT */;
    >
    > Looks like a C style comment, but ends with a semi-colon - so must be
    > SQL
    > Is the variable OLD_CHARACTER_SET_CLIENT being assigned
    > CHARACTER_SET_CLIENT ? (does mean something that points to the
    > value?)
    >
    > What does !40101 mean?
    >
    > Further down, I have this line :
    >
    > CREATE DATABASE /*!32312 IF NOT EXISTS*/ `rgdata` /*!40100 DEFAULT
    > CHARACTER SET latin1 */;
    >
    > I don't quite understand what /*!32312 and /*!40100 mean?
    These are conditional comments. Every MySQL version starting with the
    mentioned version can interpret the commented syntax.

    32312 means MySQL>=3.23.12
    40101 means MySQL>=4.1.1 (4.01.01)
    and so on.

    So MySQL 4.0 interprets
    CREATE DATABASE IF NOT EXISTS `rgdata`;
    and MySQL 4.1 interprets
    CREATE DATABASE IF NOT EXISTS `rgdata` DEFAULT CHARACTER SET latin1;

    HTH
    Kai

    --
    This signature is left as an exercise for the reader.
    Kai Ruhnau Guest

  3. #3

    Default Re: mysqldump file - interpreting syntax

    Thanks a lot Kai, that is a great help. Cheers

    roch77@gmail.com Guest

Similar Threads

  1. interpreting 'netstat -s'
    By J.Smith in forum AIX
    Replies: 0
    Last Post: September 7th, 07:51 PM
  2. [PHP] mysqldump
    By Marios Adamantopoulos in forum PHP Development
    Replies: 2
    Last Post: July 25th, 05:53 PM
  3. mysqldump
    By Marios Adamantopoulos in forum PHP Development
    Replies: 2
    Last Post: July 25th, 03:53 PM
  4. Interpreting prstat -a 1
    By Shiva MahaDeva in forum Sun Solaris
    Replies: 0
    Last Post: July 23rd, 11:58 PM
  5. interpreting trace file
    By Jonathan Lewis in forum Oracle Server
    Replies: 0
    Last Post: December 19th, 02:37 PM

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