Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
84999eb5
Commit
84999eb5
authored
Mar 14, 2001
by
jcole@abel.spaceapes.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reversed SQL_ANSI_MODE per Monty's request.
parent
fef4e752
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
68 deletions
+27
-68
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
Docs/manual.texi
Docs/manual.texi
+0
-9
sql/gen_lex_hash.cc
sql/gen_lex_hash.cc
+2
-4
sql/lex.h
sql/lex.h
+0
-1
sql/mysql_priv.h
sql/mysql_priv.h
+0
-2
sql/sql_class.cc
sql/sql_class.cc
+0
-4
sql/sql_class.h
sql/sql_class.h
+0
-3
sql/sql_lex.cc
sql/sql_lex.cc
+24
-32
sql/sql_yacc.yy
sql/sql_yacc.yy
+0
-13
No files found.
BitKeeper/etc/logging_ok
View file @
84999eb5
...
...
@@ -7,3 +7,4 @@ sasha@work.mysql.com
serg@serg.mysql.com
tim@threads.polyesthetic.msg
tim@work.mysql.com
jcole@abel.spaceapes.com
Docs/manual.texi
View file @
84999eb5
...
...
@@ -22080,11 +22080,6 @@ or
mysql> UPDATE mysql.user SET password=PASSWORD("newpass") where user="bob' and host="%.loc.gov";
@end example
@item SQL_ANSI_MODE = 0 | 1
@cindex ANSI mode, SQL_ANSI_MODE
If set to @code{1}, the connection will be in ANSI mode, as described in
@ref{ANSI mode}.
@item SQL_AUTO_IS_NULL = 0 | 1
If set to @code{1} (default) then one can find the last inserted row
for a table with an auto_increment row with the following construct:
...
...
@@ -42110,10 +42105,6 @@ not yet 100 % confident in this code.
@node News-3.23.35, News-3.23.34a, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.35
@itemize @bullet
@item
Added SQL_ANSI_MODE. You can now switch to ANSI mode for only your
connection by running @code{SET SQL_ANSI_MODE=1}, and you can turn
ANSI mode off with @code{SET SQL_ANSI_MODE=0}.
@end itemize
@node News-3.23.34a, News-3.23.34, News-3.23.35, News-3.23.x
sql/gen_lex_hash.cc
View file @
84999eb5
...
...
@@ -472,9 +472,7 @@ int main(int argc,char **argv)
int
error
;
MY_INIT
(
argv
[
0
]);
start_value
=
4934807L
;
best_t1
=
5181754L
;
best_t2
=
1469522L
;
best_type
=
0
;
/* mode=4999 add=7 type: 0 */
start_value
=
5315771L
;
best_t1
=
6916833L
;
best_t2
=
3813748L
;
best_type
=
3
;
/* mode=5839 add=5 type: 0 */
if
(
get_options
(
argc
,(
char
**
)
argv
))
exit
(
1
);
...
...
sql/lex.h
View file @
84999eb5
...
...
@@ -270,7 +270,6 @@ static SYMBOL symbols[] = {
{
"SLAVE"
,
SYM
(
SLAVE
),
0
,
0
},
{
"SMALLINT"
,
SYM
(
SMALLINT
),
0
,
0
},
{
"SONAME"
,
SYM
(
UDF_SONAME_SYM
),
0
,
0
},
{
"SQL_ANSI_MODE"
,
SYM
(
SQL_ANSI_MODE
),
0
,
0
},
{
"SQL_AUTO_IS_NULL"
,
SYM
(
SQL_AUTO_IS_NULL
),
0
,
0
},
{
"SQL_BIG_RESULT"
,
SYM
(
SQL_BIG_RESULT
),
0
,
0
},
{
"SQL_BIG_SELECTS"
,
SYM
(
SQL_BIG_SELECTS
),
0
,
0
},
...
...
sql/mysql_priv.h
View file @
84999eb5
...
...
@@ -539,8 +539,6 @@ extern struct show_var_st init_vars[];
extern
struct
show_var_st
status_vars
[];
extern
enum
db_type
default_table_type
;
extern
uchar
global_state_map
[
256
];
#ifndef __WIN__
extern
pthread_t
signal_thread
;
#endif
...
...
sql/sql_class.cc
View file @
84999eb5
...
...
@@ -135,10 +135,6 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
}
#endif
// copy global state map into thread
for
(
int
x
=
0
;
x
<
256
;
x
++
)
state_map
[
x
]
=
global_state_map
[
x
];
#ifdef __WIN__
real_id
=
0
;
#endif
...
...
sql/sql_class.h
View file @
84999eb5
...
...
@@ -285,9 +285,6 @@ class THD :public ilink {
ulong
slave_proxy_id
;
// in slave thread we need to know in behalf of which
// thread the query is being run to replicate temp tables properly
// thread-specific state map for lex parser
uchar
state_map
[
256
];
THD
();
~
THD
();
bool
store_globals
();
...
...
sql/sql_lex.cc
View file @
84999eb5
...
...
@@ -75,7 +75,7 @@ inline int lex_casecmp(const char *s, const char *t, uint len)
#include "lex_hash.h"
uchar
global_
state_map
[
256
];
static
uchar
state_map
[
256
];
void
lex_init
(
void
)
...
...
@@ -89,49 +89,42 @@ void lex_init(void)
VOID
(
pthread_key_create
(
&
THR_LEX
,
NULL
));
/* Fill
global_
state_map with states to get a faster parser */
/* Fill state_map with states to get a faster parser */
for
(
i
=
0
;
i
<
256
;
i
++
)
{
if
(
isalpha
(
i
))
global_
state_map
[
i
]
=
(
uchar
)
STATE_IDENT
;
state_map
[
i
]
=
(
uchar
)
STATE_IDENT
;
else
if
(
isdigit
(
i
))
global_
state_map
[
i
]
=
(
uchar
)
STATE_NUMBER_IDENT
;
state_map
[
i
]
=
(
uchar
)
STATE_NUMBER_IDENT
;
#if defined(USE_MB) && defined(USE_MB_IDENT)
else
if
(
use_mb
(
default_charset_info
)
&&
my_ismbhead
(
default_charset_info
,
i
))
global_
state_map
[
i
]
=
(
uchar
)
STATE_IDENT
;
state_map
[
i
]
=
(
uchar
)
STATE_IDENT
;
#endif
else
if
(
!
isgraph
(
i
))
global_
state_map
[
i
]
=
(
uchar
)
STATE_SKIP
;
state_map
[
i
]
=
(
uchar
)
STATE_SKIP
;
else
global_state_map
[
i
]
=
(
uchar
)
STATE_CHAR
;
}
global_state_map
[(
uchar
)
'_'
]
=
global_state_map
[(
uchar
)
'$'
]
=
(
uchar
)
STATE_IDENT
;
global_state_map
[(
uchar
)
'\''
]
=
global_state_map
[(
uchar
)
'"'
]
=
(
uchar
)
STATE_STRING
;
global_state_map
[(
uchar
)
'-'
]
=
global_state_map
[(
uchar
)
'+'
]
=
(
uchar
)
STATE_SIGNED_NUMBER
;
global_state_map
[(
uchar
)
'.'
]
=
(
uchar
)
STATE_REAL_OR_POINT
;
global_state_map
[(
uchar
)
'>'
]
=
global_state_map
[(
uchar
)
'='
]
=
global_state_map
[(
uchar
)
'!'
]
=
(
uchar
)
STATE_CMP_OP
;
global_state_map
[(
uchar
)
'<'
]
=
(
uchar
)
STATE_LONG_CMP_OP
;
global_state_map
[(
uchar
)
'&'
]
=
global_state_map
[(
uchar
)
'|'
]
=
(
uchar
)
STATE_BOOL
;
global_state_map
[(
uchar
)
'#'
]
=
(
uchar
)
STATE_COMMENT
;
global_state_map
[(
uchar
)
';'
]
=
(
uchar
)
STATE_COLON
;
global_state_map
[(
uchar
)
':'
]
=
(
uchar
)
STATE_SET_VAR
;
global_state_map
[
0
]
=
(
uchar
)
STATE_EOL
;
global_state_map
[(
uchar
)
'\\'
]
=
(
uchar
)
STATE_ESCAPE
;
global_state_map
[(
uchar
)
'/'
]
=
(
uchar
)
STATE_LONG_COMMENT
;
global_state_map
[(
uchar
)
'*'
]
=
(
uchar
)
STATE_END_LONG_COMMENT
;
global_state_map
[(
uchar
)
'@'
]
=
(
uchar
)
STATE_USER_END
;
global_state_map
[(
uchar
)
'`'
]
=
(
uchar
)
STATE_USER_VARIABLE_DELIMITER
;
state_map
[
i
]
=
(
uchar
)
STATE_CHAR
;
}
state_map
[(
uchar
)
'_'
]
=
state_map
[(
uchar
)
'$'
]
=
(
uchar
)
STATE_IDENT
;
state_map
[(
uchar
)
'\''
]
=
state_map
[(
uchar
)
'"'
]
=
(
uchar
)
STATE_STRING
;
state_map
[(
uchar
)
'-'
]
=
state_map
[(
uchar
)
'+'
]
=
(
uchar
)
STATE_SIGNED_NUMBER
;
state_map
[(
uchar
)
'.'
]
=
(
uchar
)
STATE_REAL_OR_POINT
;
state_map
[(
uchar
)
'>'
]
=
state_map
[(
uchar
)
'='
]
=
state_map
[(
uchar
)
'!'
]
=
(
uchar
)
STATE_CMP_OP
;
state_map
[(
uchar
)
'<'
]
=
(
uchar
)
STATE_LONG_CMP_OP
;
state_map
[(
uchar
)
'&'
]
=
state_map
[(
uchar
)
'|'
]
=
(
uchar
)
STATE_BOOL
;
state_map
[(
uchar
)
'#'
]
=
(
uchar
)
STATE_COMMENT
;
state_map
[(
uchar
)
';'
]
=
(
uchar
)
STATE_COLON
;
state_map
[(
uchar
)
':'
]
=
(
uchar
)
STATE_SET_VAR
;
state_map
[
0
]
=
(
uchar
)
STATE_EOL
;
state_map
[(
uchar
)
'\\'
]
=
(
uchar
)
STATE_ESCAPE
;
state_map
[(
uchar
)
'/'
]
=
(
uchar
)
STATE_LONG_COMMENT
;
state_map
[(
uchar
)
'*'
]
=
(
uchar
)
STATE_END_LONG_COMMENT
;
state_map
[(
uchar
)
'@'
]
=
(
uchar
)
STATE_USER_END
;
state_map
[(
uchar
)
'`'
]
=
(
uchar
)
STATE_USER_VARIABLE_DELIMITER
;
if
(
thd_startup_options
&
OPTION_ANSI_MODE
)
{
global_
state_map
[(
uchar
)
'"'
]
=
STATE_USER_VARIABLE_DELIMITER
;
state_map
[(
uchar
)
'"'
]
=
STATE_USER_VARIABLE_DELIMITER
;
}
DBUG_VOID_RETURN
;
}
...
...
@@ -425,7 +418,6 @@ int yylex(void *arg)
uint
length
;
enum
lex_states
state
,
prev_state
;
LEX
*
lex
=
current_lex
;
uchar
*
state_map
=
lex
->
thd
->
state_map
;
YYSTYPE
*
yylval
=
(
YYSTYPE
*
)
arg
;
lex
->
yylval
=
yylval
;
// The global state
...
...
sql/sql_yacc.yy
View file @
84999eb5
...
...
@@ -394,7 +394,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token END
%token THEN_SYM
%token SQL_ANSI_MODE
%token SQL_BIG_TABLES
%token SQL_BIG_SELECTS
%token SQL_SELECT_LIMIT
...
...
@@ -2609,18 +2608,6 @@ option_value:
else
Lex->options|= OPTION_NOT_AUTO_COMMIT;
}
| SQL_ANSI_MODE equal NUM
{
if(atoi($3.str) == 0)
{
Lex->options &= ~(OPTION_ANSI_MODE);
Lex->thd->state_map[(uchar) '"'] = STATE_STRING;
} else {
Lex->options |= OPTION_ANSI_MODE;
Lex->thd->state_map[(uchar) '"'] = STATE_USER_VARIABLE_DELIMITER;
}
}
| SQL_SELECT_LIMIT equal ULONG_NUM
{
Lex->select_limit= $3;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment