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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7d766fdb
Commit
7d766fdb
authored
Feb 22, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#6662: Changes after Guilhems and Sergs review
parent
edaf33a1
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
9 deletions
+28
-9
client/mysqldump.c
client/mysqldump.c
+3
-4
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+18
-0
sql/mysql_priv.h
sql/mysql_priv.h
+2
-2
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/set_var.cc
sql/set_var.cc
+3
-1
sql/sql_error.cc
sql/sql_error.cc
+1
-1
No files found.
client/mysqldump.c
View file @
7d766fdb
...
@@ -489,11 +489,10 @@ static void write_header(FILE *sql_file, char *db_name)
...
@@ -489,11 +489,10 @@ static void write_header(FILE *sql_file, char *db_name)
"
);
"
);
}
}
fprintf
(
sql_file
,
fprintf
(
sql_file
,
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;
\n
"
,
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;
\n
"
"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
\n
"
,
path
?
""
:
"NO_AUTO_VALUE_ON_ZERO"
,
compatible_mode_normal_str
[
0
]
==
0
?
""
:
","
,
path
?
""
:
"NO_AUTO_VALUE_ON_ZERO"
,
compatible_mode_normal_str
[
0
]
==
0
?
""
:
","
,
compatible_mode_normal_str
);
compatible_mode_normal_str
);
fprintf
(
sql_file
,
"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
\n
"
);
check_io
(
sql_file
);
check_io
(
sql_file
);
}
}
}
/* write_header */
}
/* write_header */
...
@@ -521,7 +520,7 @@ static void write_footer(FILE *sql_file)
...
@@ -521,7 +520,7 @@ static void write_footer(FILE *sql_file)
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
\n
"
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
\n
"
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
\n
"
);
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
\n
"
);
fprintf
(
sql_file
,
fprintf
(
sql_file
,
"/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;"
);
"/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
\n
"
);
fputs
(
"
\n
"
,
sql_file
);
fputs
(
"
\n
"
,
sql_file
);
check_io
(
sql_file
);
check_io
(
sql_file
);
}
}
...
...
mysql-test/r/mysqldump.result
View file @
7d766fdb
...
@@ -82,6 +82,7 @@ UNLOCK TABLES;
...
@@ -82,6 +82,7 @@ UNLOCK TABLES;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
...
@@ -97,6 +98,7 @@ INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456)
...
@@ -97,6 +98,7 @@ INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456)
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1(a int, b text, c varchar(3));
CREATE TABLE t1(a int, b text, c varchar(3));
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
...
@@ -173,6 +175,7 @@ UNLOCK TABLES;
...
@@ -173,6 +175,7 @@ UNLOCK TABLES;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a int) ENGINE=MYISAM;
CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t1 VALUES (1), (2);
...
@@ -196,6 +199,7 @@ UNLOCK TABLES;
...
@@ -196,6 +199,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
...
@@ -216,6 +220,7 @@ UNLOCK TABLES;
...
@@ -216,6 +220,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
DROP TABLE t1;
create table ```a` (i int);
create table ```a` (i int);
CREATE TABLE ```a` (
CREATE TABLE ```a` (
...
@@ -250,6 +255,7 @@ UNLOCK TABLES;
...
@@ -250,6 +255,7 @@ UNLOCK TABLES;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
...
@@ -269,6 +275,7 @@ UNLOCK TABLES;
...
@@ -269,6 +275,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
set global sql_mode='ANSI_QUOTES';
set global sql_mode='ANSI_QUOTES';
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
...
@@ -297,6 +304,7 @@ UNLOCK TABLES;
...
@@ -297,6 +304,7 @@ UNLOCK TABLES;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
...
@@ -316,6 +324,7 @@ UNLOCK TABLES;
...
@@ -316,6 +324,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
set global sql_mode='';
set global sql_mode='';
drop table t1;
drop table t1;
create table t1(a int);
create table t1(a int);
...
@@ -338,6 +347,7 @@ CREATE TABLE `t1` (
...
@@ -338,6 +347,7 @@ CREATE TABLE `t1` (
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1
1
2
2
3
3
...
@@ -363,6 +373,7 @@ USE `test`;
...
@@ -363,6 +373,7 @@ USE `test`;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
create database mysqldump_test_db character set latin2 collate latin2_bin;
create database mysqldump_test_db character set latin2 collate latin2_bin;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
...
@@ -385,6 +396,7 @@ USE `mysqldump_test_db`;
...
@@ -385,6 +396,7 @@ USE `mysqldump_test_db`;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
drop database mysqldump_test_db;
drop database mysqldump_test_db;
CREATE TABLE t1 (a CHAR(10));
CREATE TABLE t1 (a CHAR(10));
INSERT INTO t1 VALUES (_latin1 '');
INSERT INTO t1 VALUES (_latin1 '');
...
@@ -416,6 +428,7 @@ UNLOCK TABLES;
...
@@ -416,6 +428,7 @@ UNLOCK TABLES;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
...
@@ -436,6 +449,7 @@ UNLOCK TABLES;
...
@@ -436,6 +449,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
...
@@ -456,6 +470,7 @@ UNLOCK TABLES;
...
@@ -456,6 +470,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
...
@@ -476,6 +491,7 @@ UNLOCK TABLES;
...
@@ -476,6 +491,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
...
@@ -496,6 +512,7 @@ UNLOCK TABLES;
...
@@ -496,6 +512,7 @@ UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a int);
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
CREATE TABLE t2 (a int);
...
@@ -529,5 +546,6 @@ UNLOCK TABLES;
...
@@ -529,5 +546,6 @@ UNLOCK TABLES;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t2;
sql/mysql_priv.h
View file @
7d766fdb
...
@@ -213,8 +213,8 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
...
@@ -213,8 +213,8 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
#define SELECT_NO_UNLOCK (1L << 28)
#define SELECT_NO_UNLOCK (1L << 28)
/* If set to 0, then the thread will ignore all warnings with level notes.
/* If set to 0, then the thread will ignore all warnings with level notes.
Set by executing SET S
HOW
_NOTES=1 */
Set by executing SET S
QL
_NOTES=1 */
#define OPTION_
NOTES
(1L << 31)
#define OPTION_
SQL_NOTES
(1L << 31)
/* Bits for different SQL modes modes (including ANSI mode) */
/* Bits for different SQL modes modes (including ANSI mode) */
#define MODE_REAL_AS_FLOAT 1
#define MODE_REAL_AS_FLOAT 1
...
...
sql/mysqld.cc
View file @
7d766fdb
...
@@ -5623,7 +5623,7 @@ static void mysql_init_variables(void)
...
@@ -5623,7 +5623,7 @@ static void mysql_init_variables(void)
mysql_data_home
=
mysql_real_data_home
;
mysql_data_home
=
mysql_real_data_home
;
thd_startup_options
=
(
OPTION_UPDATE_LOG
|
OPTION_AUTO_IS_NULL
|
thd_startup_options
=
(
OPTION_UPDATE_LOG
|
OPTION_AUTO_IS_NULL
|
OPTION_BIN_LOG
|
OPTION_QUOTE_SHOW_CREATE
|
OPTION_BIN_LOG
|
OPTION_QUOTE_SHOW_CREATE
|
OPTION_NOTES
);
OPTION_
SQL_
NOTES
);
protocol_version
=
PROTOCOL_VERSION
;
protocol_version
=
PROTOCOL_VERSION
;
what_to_log
=
~
(
1L
<<
(
uint
)
COM_TIME
);
what_to_log
=
~
(
1L
<<
(
uint
)
COM_TIME
);
refresh_version
=
flush_version
=
1L
;
/* Increments on each reload */
refresh_version
=
flush_version
=
1L
;
/* Increments on each reload */
...
...
sql/set_var.cc
View file @
7d766fdb
...
@@ -425,7 +425,7 @@ static sys_var_thd_bit sys_sql_warnings("sql_warnings", 0,
...
@@ -425,7 +425,7 @@ static sys_var_thd_bit sys_sql_warnings("sql_warnings", 0,
OPTION_WARNINGS
);
OPTION_WARNINGS
);
static
sys_var_thd_bit
sys_sql_notes
(
"sql_notes"
,
0
,
static
sys_var_thd_bit
sys_sql_notes
(
"sql_notes"
,
0
,
set_option_bit
,
set_option_bit
,
OPTION_NOTES
);
OPTION_
SQL_
NOTES
);
static
sys_var_thd_bit
sys_auto_is_null
(
"sql_auto_is_null"
,
0
,
static
sys_var_thd_bit
sys_auto_is_null
(
"sql_auto_is_null"
,
0
,
set_option_bit
,
set_option_bit
,
OPTION_AUTO_IS_NULL
);
OPTION_AUTO_IS_NULL
);
...
@@ -863,6 +863,8 @@ struct show_var_st init_vars[]= {
...
@@ -863,6 +863,8 @@ struct show_var_st init_vars[]= {
{
sys_sort_buffer
.
name
,
(
char
*
)
&
sys_sort_buffer
,
SHOW_SYS
},
{
sys_sort_buffer
.
name
,
(
char
*
)
&
sys_sort_buffer
,
SHOW_SYS
},
{
sys_sql_mode
.
name
,
(
char
*
)
&
sys_sql_mode
,
SHOW_SYS
},
{
sys_sql_mode
.
name
,
(
char
*
)
&
sys_sql_mode
,
SHOW_SYS
},
{
sys_storage_engine
.
name
,
(
char
*
)
&
sys_storage_engine
,
SHOW_SYS
},
{
sys_storage_engine
.
name
,
(
char
*
)
&
sys_storage_engine
,
SHOW_SYS
},
{
"sql_notes"
,
(
char
*
)
&
sys_sql_notes
,
SHOW_BOOL
},
{
"sql_warnings"
,
(
char
*
)
&
sys_sql_warnings
,
SHOW_BOOL
},
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
{
sys_sync_binlog_period
.
name
,(
char
*
)
&
sys_sync_binlog_period
,
SHOW_SYS
},
{
sys_sync_binlog_period
.
name
,(
char
*
)
&
sys_sync_binlog_period
,
SHOW_SYS
},
{
sys_sync_replication
.
name
,
(
char
*
)
&
sys_sync_replication
,
SHOW_SYS
},
{
sys_sync_replication
.
name
,
(
char
*
)
&
sys_sync_replication
,
SHOW_SYS
},
...
...
sql/sql_error.cc
View file @
7d766fdb
...
@@ -105,7 +105,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
...
@@ -105,7 +105,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
MYSQL_ERROR
*
err
=
0
;
MYSQL_ERROR
*
err
=
0
;
DBUG_ENTER
(
"push_warning"
);
DBUG_ENTER
(
"push_warning"
);
if
(
level
==
MYSQL_ERROR
::
WARN_LEVEL_NOTE
&&
!
(
thd
->
options
&
OPTION_NOTES
))
if
(
level
==
MYSQL_ERROR
::
WARN_LEVEL_NOTE
&&
!
(
thd
->
options
&
OPTION_
SQL_
NOTES
))
return
(
0
);
return
(
0
);
if
(
thd
->
query_id
!=
thd
->
warn_id
)
if
(
thd
->
query_id
!=
thd
->
warn_id
)
...
...
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