Loading Docs/manual.texi +40 −40 Original line number Diff line number Diff line Loading @@ -4609,7 +4609,7 @@ sorting in ASCII order. @item MySQL Server @code{LIKE} is a case-insensitive or case-sensitive operator, depending on the columns involved. If possible, MySQL uses indexes if the @code{LIKE} argument doesn't start with a wild-card character. @code{LIKE} argument doesn't start with a wildcard character. @item mSQL Use @code{CLIKE}. @end table Loading Loading @@ -15637,7 +15637,7 @@ to indicate the local host. @item @cindex wildcards, in @code{mysql.user} table You can use the wild-card characters @samp{%} and @samp{_} in the @code{Host} You can use the wildcard characters @samp{%} and @samp{_} in the @code{Host} field. @item Loading Loading @@ -15669,7 +15669,7 @@ In the above example all IP:s in the interval 192.58.197.0 - @item @cindex anonymous user Wild-card characters are not allowed in the @code{User} field, but you can Wildcard characters are not allowed in the @code{User} field, but you can specify a blank value, which matches any name. If the @code{user} table entry that matches an incoming connection has a blank user name, the user is considered to be the anonymous user (the user with no name), rather than the Loading Loading @@ -15711,14 +15711,14 @@ connections: @item @code{'144.155.166.0/255.255.255.0'} @tab @code{'fred'} @tab Same as previous example @end multitable Because you can use IP wild-card values in the @code{Host} field (for example, Because you can use IP wildcard values in the @code{Host} field (for example, @code{'144.155.166.%'} to match every host on a subnet), there is the possibility that someone might try to exploit this capability by naming a host @code{144.155.166.somewhere.com}. To foil such attempts, MySQL disallows matching on hostnames that start with digits and a dot. Thus, if you have a host named something like @code{1.2.foo.com}, its name will never match the @code{Host} column of the grant tables. Only an IP number can match an IP wild-card value. match an IP wildcard value. An incoming connection may be matched by more than one entry in the @code{user} table. For example, a connection from @code{thomas.loc.gov} by Loading Loading @@ -15839,7 +15839,7 @@ Values in the scope fields may be specified as follows: @itemize @bullet @item The wild-card characters @samp{%} and @samp{_} can be used in the @code{Host} The wildcard characters @samp{%} and @samp{_} can be used in the @code{Host} and @code{Db} fields of either table. @item Loading Loading @@ -15879,7 +15879,7 @@ follows: @itemize @bullet @item The wild-card characters @samp{%} and @samp{_} The wildcard characters @samp{%} and @samp{_} can be used in the @code{Host} field of either table. @item Loading Loading @@ -16439,7 +16439,7 @@ In order to accommodate granting rights to users from arbitrary hosts, MySQL supports specifying the @code{user_name} value in the form @code{user@@host}. If you want to specify a @code{user} string containing special characters (such as @samp{-}), or a @code{host} string containing special characters or wild-card characters (such as @samp{%}), you containing special characters or wildcard characters (such as @samp{%}), you can quote the user or host name (for example, @code{'test-user'@@'test-hostname'}). You can specify wildcards in the hostname. For example, Loading Loading @@ -19106,7 +19106,7 @@ or SHOW SLAVE STATUS @code{SHOW} provides information about databases, tables, columns, or status information about the server. If the @code{LIKE wild} part is used, the @code{wild} string can be a string that uses the SQL @samp{%} and @samp{_} wild-card characters. and @samp{_} wildcard characters. @menu * SHOW DATABASE INFO:: Retrieving information about Database, Tables, Columns, and Indexes Loading Loading @@ -22756,7 +22756,7 @@ are shown. Note that in newer MySQL versions, you only see those database/tables/columns for which you have some privileges. If the last argument contains a shell or SQL wild-card (@code{*}, @code{?}, If the last argument contains a shell or SQL wildcard (@code{*}, @code{?}, @code{%} or @code{_}) then only what's matched by the wildcard is shown. This may cause some confusion when you try to display the columns for a table with a @code{_} as in this case @code{mysqlshow} only shows you Loading Loading @@ -26476,7 +26476,7 @@ leftmost prefixes of @code{(col1,col2,col3)}. @cindex indexes, and @code{LIKE} @cindex wildcards, and @code{LIKE} MySQL also uses indexes for @code{LIKE} comparisons if the argument to @code{LIKE} is a constant string that doesn't start with a wild-card to @code{LIKE} is a constant string that doesn't start with a wildcard character. For example, the following @code{SELECT} statements use indexes: @example Loading @@ -26494,7 +26494,7 @@ mysql> SELECT * FROM tbl_name WHERE key_col LIKE "%Patrick%"; mysql> SELECT * FROM tbl_name WHERE key_col LIKE other_col; @end example In the first statement, the @code{LIKE} value begins with a wild-card In the first statement, the @code{LIKE} value begins with a wildcard character. In the second statement, the @code{LIKE} value is not a constant. Loading @@ -26506,7 +26506,7 @@ is an index. MySQL normally uses the index that finds the least number of rows. An index is used for columns that you compare with the following operators: @code{=}, @code{>}, @code{>=}, @code{<}, @code{<=}, @code{BETWEEN}, and a @code{LIKE} with a non-wild-card prefix like @code{'something%'}. @code{LIKE} with a non-wildcard prefix like @code{'something%'}. Any index that doesn't span all @code{AND} levels in the @code{WHERE} clause is not used to optimise the query. In other words: To be able to use an Loading Loading @@ -27767,14 +27767,14 @@ A backslash (@samp{\}) character. @item \% A @samp{%} character. This is used to search for literal instances of @samp{%} in contexts where @samp{%} would otherwise be interpreted as a wild-card character. @xref{String comparison functions}. as a wildcard character. @xref{String comparison functions}. @findex _ (wildcard character) @findex Wildcard character (_) @item \_ A @samp{_} character. This is used to search for literal instances of @samp{_} in contexts where @samp{_} would otherwise be interpreted as a wild-card character. @xref{String comparison functions}. as a wildcard character. @xref{String comparison functions}. @end table Note that if you use @samp{\%} or @samp{\_} in some string contexts, these Loading Loading @@ -31011,7 +31011,7 @@ comparison is performed in case-sensitive fashion. @item expr LIKE pat [ESCAPE 'escape-char'] Pattern matching using SQL simple regular expression comparison. Returns @code{1} (TRUE) or @code{0} (FALSE). With @code{LIKE} you can use the following two wild-card characters (FALSE). With @code{LIKE} you can use the following two wildcard characters in the pattern: @multitable @columnfractions .10 .60 Loading @@ -31027,7 +31027,7 @@ mysql> SELECT 'David!' LIKE '%D%v%'; -> 1 @end example To test for literal instances of a wild-card character, precede the character To test for literal instances of a wildcard character, precede the character with the escape character. If you don't specify the @code{ESCAPE} character, @samp{\} is assumed: Loading Loading @@ -35703,7 +35703,7 @@ The @code{USE} statement is provided for Sybase compatibility. @code{DESCRIBE} provides information about a table's columns. @code{col_name} may be a column name or a string containing the SQL @samp{%} and @samp{_} wild-card characters. wildcard characters. If the column types are different than you expect them to be based on a @code{CREATE TABLE} statement, note that MySQL sometimes Loading Loading @@ -42662,7 +42662,7 @@ An unknown error occurred. Returns a result set consisting of database names on the server that match the simple regular expression specified by the @code{wild} parameter. @code{wild} may contain the wild-card characters @samp{%} or @samp{_}, or may @code{wild} may contain the wildcard characters @samp{%} or @samp{_}, or may be a @code{NULL} pointer to match all databases. Calling @code{mysql_list_dbs()} is similar to executing the query @code{SHOW databases [LIKE wild]}. Loading Loading @@ -42700,7 +42700,7 @@ An unknown error occurred. Returns a result set consisting of field names in the given table that match the simple regular expression specified by the @code{wild} parameter. @code{wild} may contain the wild-card characters @samp{%} or @samp{_}, or may @code{wild} may contain the wildcard characters @samp{%} or @samp{_}, or may be a @code{NULL} pointer to match all fields. Calling @code{mysql_list_fields()} is similar to executing the query @code{SHOW COLUMNS FROM tbl_name [LIKE wild]}. Loading Loading @@ -42772,7 +42772,7 @@ An unknown error occurred. Returns a result set consisting of table names in the current database that match the simple regular expression specified by the @code{wild} parameter. @code{wild} may contain the wild-card characters @samp{%} or @samp{_}, or may @code{wild} may contain the wildcard characters @samp{%} or @samp{_}, or may be a @code{NULL} pointer to match all tables. Calling @code{mysql_list_tables()} is similar to executing the query @code{SHOW tables [LIKE wild]}. Loading
Docs/manual.texi +40 −40 Original line number Diff line number Diff line Loading @@ -4609,7 +4609,7 @@ sorting in ASCII order. @item MySQL Server @code{LIKE} is a case-insensitive or case-sensitive operator, depending on the columns involved. If possible, MySQL uses indexes if the @code{LIKE} argument doesn't start with a wild-card character. @code{LIKE} argument doesn't start with a wildcard character. @item mSQL Use @code{CLIKE}. @end table Loading Loading @@ -15637,7 +15637,7 @@ to indicate the local host. @item @cindex wildcards, in @code{mysql.user} table You can use the wild-card characters @samp{%} and @samp{_} in the @code{Host} You can use the wildcard characters @samp{%} and @samp{_} in the @code{Host} field. @item Loading Loading @@ -15669,7 +15669,7 @@ In the above example all IP:s in the interval 192.58.197.0 - @item @cindex anonymous user Wild-card characters are not allowed in the @code{User} field, but you can Wildcard characters are not allowed in the @code{User} field, but you can specify a blank value, which matches any name. If the @code{user} table entry that matches an incoming connection has a blank user name, the user is considered to be the anonymous user (the user with no name), rather than the Loading Loading @@ -15711,14 +15711,14 @@ connections: @item @code{'144.155.166.0/255.255.255.0'} @tab @code{'fred'} @tab Same as previous example @end multitable Because you can use IP wild-card values in the @code{Host} field (for example, Because you can use IP wildcard values in the @code{Host} field (for example, @code{'144.155.166.%'} to match every host on a subnet), there is the possibility that someone might try to exploit this capability by naming a host @code{144.155.166.somewhere.com}. To foil such attempts, MySQL disallows matching on hostnames that start with digits and a dot. Thus, if you have a host named something like @code{1.2.foo.com}, its name will never match the @code{Host} column of the grant tables. Only an IP number can match an IP wild-card value. match an IP wildcard value. An incoming connection may be matched by more than one entry in the @code{user} table. For example, a connection from @code{thomas.loc.gov} by Loading Loading @@ -15839,7 +15839,7 @@ Values in the scope fields may be specified as follows: @itemize @bullet @item The wild-card characters @samp{%} and @samp{_} can be used in the @code{Host} The wildcard characters @samp{%} and @samp{_} can be used in the @code{Host} and @code{Db} fields of either table. @item Loading Loading @@ -15879,7 +15879,7 @@ follows: @itemize @bullet @item The wild-card characters @samp{%} and @samp{_} The wildcard characters @samp{%} and @samp{_} can be used in the @code{Host} field of either table. @item Loading Loading @@ -16439,7 +16439,7 @@ In order to accommodate granting rights to users from arbitrary hosts, MySQL supports specifying the @code{user_name} value in the form @code{user@@host}. If you want to specify a @code{user} string containing special characters (such as @samp{-}), or a @code{host} string containing special characters or wild-card characters (such as @samp{%}), you containing special characters or wildcard characters (such as @samp{%}), you can quote the user or host name (for example, @code{'test-user'@@'test-hostname'}). You can specify wildcards in the hostname. For example, Loading Loading @@ -19106,7 +19106,7 @@ or SHOW SLAVE STATUS @code{SHOW} provides information about databases, tables, columns, or status information about the server. If the @code{LIKE wild} part is used, the @code{wild} string can be a string that uses the SQL @samp{%} and @samp{_} wild-card characters. and @samp{_} wildcard characters. @menu * SHOW DATABASE INFO:: Retrieving information about Database, Tables, Columns, and Indexes Loading Loading @@ -22756,7 +22756,7 @@ are shown. Note that in newer MySQL versions, you only see those database/tables/columns for which you have some privileges. If the last argument contains a shell or SQL wild-card (@code{*}, @code{?}, If the last argument contains a shell or SQL wildcard (@code{*}, @code{?}, @code{%} or @code{_}) then only what's matched by the wildcard is shown. This may cause some confusion when you try to display the columns for a table with a @code{_} as in this case @code{mysqlshow} only shows you Loading Loading @@ -26476,7 +26476,7 @@ leftmost prefixes of @code{(col1,col2,col3)}. @cindex indexes, and @code{LIKE} @cindex wildcards, and @code{LIKE} MySQL also uses indexes for @code{LIKE} comparisons if the argument to @code{LIKE} is a constant string that doesn't start with a wild-card to @code{LIKE} is a constant string that doesn't start with a wildcard character. For example, the following @code{SELECT} statements use indexes: @example Loading @@ -26494,7 +26494,7 @@ mysql> SELECT * FROM tbl_name WHERE key_col LIKE "%Patrick%"; mysql> SELECT * FROM tbl_name WHERE key_col LIKE other_col; @end example In the first statement, the @code{LIKE} value begins with a wild-card In the first statement, the @code{LIKE} value begins with a wildcard character. In the second statement, the @code{LIKE} value is not a constant. Loading @@ -26506,7 +26506,7 @@ is an index. MySQL normally uses the index that finds the least number of rows. An index is used for columns that you compare with the following operators: @code{=}, @code{>}, @code{>=}, @code{<}, @code{<=}, @code{BETWEEN}, and a @code{LIKE} with a non-wild-card prefix like @code{'something%'}. @code{LIKE} with a non-wildcard prefix like @code{'something%'}. Any index that doesn't span all @code{AND} levels in the @code{WHERE} clause is not used to optimise the query. In other words: To be able to use an Loading Loading @@ -27767,14 +27767,14 @@ A backslash (@samp{\}) character. @item \% A @samp{%} character. This is used to search for literal instances of @samp{%} in contexts where @samp{%} would otherwise be interpreted as a wild-card character. @xref{String comparison functions}. as a wildcard character. @xref{String comparison functions}. @findex _ (wildcard character) @findex Wildcard character (_) @item \_ A @samp{_} character. This is used to search for literal instances of @samp{_} in contexts where @samp{_} would otherwise be interpreted as a wild-card character. @xref{String comparison functions}. as a wildcard character. @xref{String comparison functions}. @end table Note that if you use @samp{\%} or @samp{\_} in some string contexts, these Loading Loading @@ -31011,7 +31011,7 @@ comparison is performed in case-sensitive fashion. @item expr LIKE pat [ESCAPE 'escape-char'] Pattern matching using SQL simple regular expression comparison. Returns @code{1} (TRUE) or @code{0} (FALSE). With @code{LIKE} you can use the following two wild-card characters (FALSE). With @code{LIKE} you can use the following two wildcard characters in the pattern: @multitable @columnfractions .10 .60 Loading @@ -31027,7 +31027,7 @@ mysql> SELECT 'David!' LIKE '%D%v%'; -> 1 @end example To test for literal instances of a wild-card character, precede the character To test for literal instances of a wildcard character, precede the character with the escape character. If you don't specify the @code{ESCAPE} character, @samp{\} is assumed: Loading Loading @@ -35703,7 +35703,7 @@ The @code{USE} statement is provided for Sybase compatibility. @code{DESCRIBE} provides information about a table's columns. @code{col_name} may be a column name or a string containing the SQL @samp{%} and @samp{_} wild-card characters. wildcard characters. If the column types are different than you expect them to be based on a @code{CREATE TABLE} statement, note that MySQL sometimes Loading Loading @@ -42662,7 +42662,7 @@ An unknown error occurred. Returns a result set consisting of database names on the server that match the simple regular expression specified by the @code{wild} parameter. @code{wild} may contain the wild-card characters @samp{%} or @samp{_}, or may @code{wild} may contain the wildcard characters @samp{%} or @samp{_}, or may be a @code{NULL} pointer to match all databases. Calling @code{mysql_list_dbs()} is similar to executing the query @code{SHOW databases [LIKE wild]}. Loading Loading @@ -42700,7 +42700,7 @@ An unknown error occurred. Returns a result set consisting of field names in the given table that match the simple regular expression specified by the @code{wild} parameter. @code{wild} may contain the wild-card characters @samp{%} or @samp{_}, or may @code{wild} may contain the wildcard characters @samp{%} or @samp{_}, or may be a @code{NULL} pointer to match all fields. Calling @code{mysql_list_fields()} is similar to executing the query @code{SHOW COLUMNS FROM tbl_name [LIKE wild]}. Loading Loading @@ -42772,7 +42772,7 @@ An unknown error occurred. Returns a result set consisting of table names in the current database that match the simple regular expression specified by the @code{wild} parameter. @code{wild} may contain the wild-card characters @samp{%} or @samp{_}, or may @code{wild} may contain the wildcard characters @samp{%} or @samp{_}, or may be a @code{NULL} pointer to match all tables. Calling @code{mysql_list_tables()} is similar to executing the query @code{SHOW tables [LIKE wild]}.