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
9ae2a1bd
Commit
9ae2a1bd
authored
Aug 11, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-ndb
parents
89507ae2
596ee62d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
9 deletions
+70
-9
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+1
-1
mysql-test/r/ctype_recoding.result
mysql-test/r/ctype_recoding.result
+24
-0
mysql-test/r/date_formats.result
mysql-test/r/date_formats.result
+3
-0
mysql-test/t/ctype_recoding.test
mysql-test/t/ctype_recoding.test
+14
-0
mysql-test/t/date_formats.test
mysql-test/t/date_formats.test
+1
-0
ndb/src/mgmapi/Makefile.am
ndb/src/mgmapi/Makefile.am
+3
-3
sql/sql_show.cc
sql/sql_show.cc
+17
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+7
-4
No files found.
mysql-test/mysql-test-run.sh
View file @
9ae2a1bd
...
@@ -1449,7 +1449,7 @@ then
...
@@ -1449,7 +1449,7 @@ then
if
[
-z
"
$USE_RUNNING_NDBCLUSTER
"
]
if
[
-z
"
$USE_RUNNING_NDBCLUSTER
"
]
then
then
echo
"Starting ndbcluster"
echo
"Starting ndbcluster"
./ndb/ndbcluster
--port-base
=
$NDBCLUSTER_PORT
--small
--
diskless
--
initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
./ndb/ndbcluster
--port-base
=
$NDBCLUSTER_PORT
--small
--initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
NDB_CONNECTSTRING
=
"host=localhost:
$NDBCLUSTER_PORT
"
NDB_CONNECTSTRING
=
"host=localhost:
$NDBCLUSTER_PORT
"
export
NDB_CONNECTSTRING
export
NDB_CONNECTSTRING
else
else
...
...
mysql-test/r/ctype_recoding.result
View file @
9ae2a1bd
...
@@ -136,6 +136,30 @@ SET character_set_connection=binary;
...
@@ -136,6 +136,30 @@ SET character_set_connection=binary;
SELECT 'тест' as s;
SELECT 'тест' as s;
s
s
тест
тест
SET NAMES latin1;
CREATE TABLE t1 (`` CHAR(128) DEFAULT '', `1` ENUM('1','2') DEFAULT '2');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`` char(128) default '',
`1` enum('1','2') default '2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
char(128) YES
1 enum('1','2') YES 2
SET NAMES binary;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ä` char(128) default 'ä',
`ä1` enum('ä1','ä2') default 'ä2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
ä char(128) YES ä
ä1 enum('ä1','ä2') YES ä2
DROP TABLE t1;
SET NAMES binary;
SET NAMES binary;
CREATE TABLE `good` (a int);
CREATE TABLE `good` (a int);
ERROR HY000: Invalid utf8 character string: ''
ERROR HY000: Invalid utf8 character string: ''
...
...
mysql-test/r/date_formats.result
View file @
9ae2a1bd
...
@@ -379,6 +379,9 @@ a
...
@@ -379,6 +379,9 @@ a
select get_format(DATETIME, 'eur') as a;
select get_format(DATETIME, 'eur') as a;
a
a
%Y-%m-%d %H.%i.%s
%Y-%m-%d %H.%i.%s
select get_format(TIMESTAMP, 'eur') as a;
a
%Y-%m-%d %H.%i.%s
select get_format(DATE, 'TEST') as a;
select get_format(DATE, 'TEST') as a;
a
a
NULL
NULL
...
...
mysql-test/t/ctype_recoding.test
View file @
9ae2a1bd
...
@@ -98,6 +98,20 @@ SET NAMES utf8;
...
@@ -98,6 +98,20 @@ SET NAMES utf8;
SET
character_set_connection
=
binary
;
SET
character_set_connection
=
binary
;
SELECT
'тест'
as
s
;
SELECT
'тест'
as
s
;
# Bug#4417, another aspect:
# Check that both "SHOW CREATE TABLE" and "SHOW COLUMNS"
# return column names and default values in UTF8 after "SET NAMES BINARY"
SET
NAMES
latin1
;
CREATE
TABLE
t1
(
``
CHAR
(
128
)
DEFAULT
''
,
`1`
ENUM
(
'1'
,
'2'
)
DEFAULT
'2'
);
SHOW
CREATE
TABLE
t1
;
SHOW
COLUMNS
FROM
t1
;
SET
NAMES
binary
;
SHOW
CREATE
TABLE
t1
;
SHOW
COLUMNS
FROM
t1
;
DROP
TABLE
t1
;
#
#
# Test that we allow only well-formed UTF8 identitiers
# Test that we allow only well-formed UTF8 identitiers
#
#
...
...
mysql-test/t/date_formats.test
View file @
9ae2a1bd
...
@@ -206,6 +206,7 @@ drop table t1;
...
@@ -206,6 +206,7 @@ drop table t1;
select
get_format
(
DATE
,
'USA'
)
as
a
;
select
get_format
(
DATE
,
'USA'
)
as
a
;
select
get_format
(
TIME
,
'internal'
)
as
a
;
select
get_format
(
TIME
,
'internal'
)
as
a
;
select
get_format
(
DATETIME
,
'eur'
)
as
a
;
select
get_format
(
DATETIME
,
'eur'
)
as
a
;
select
get_format
(
TIMESTAMP
,
'eur'
)
as
a
;
select
get_format
(
DATE
,
'TEST'
)
as
a
;
select
get_format
(
DATE
,
'TEST'
)
as
a
;
select
str_to_date
(
'15-01-2001 12:59:59'
,
GET_FORMAT
(
DATE
,
'USA'
));
select
str_to_date
(
'15-01-2001 12:59:59'
,
GET_FORMAT
(
DATE
,
'USA'
));
...
...
ndb/src/mgmapi/Makefile.am
View file @
9ae2a1bd
...
@@ -10,9 +10,9 @@ include $(top_srcdir)/ndb/config/common.mk.am
...
@@ -10,9 +10,9 @@ include $(top_srcdir)/ndb/config/common.mk.am
include
$(top_srcdir)/ndb/config/type_util.mk.am
include
$(top_srcdir)/ndb/config/type_util.mk.am
#ndbtest_PROGRAMS = ndb_test_mgmapi
#ndbtest_PROGRAMS = ndb_test_mgmapi
ndb_test_mgmapi_SOURCES
=
test_mgmapi.cpp
#
ndb_test_mgmapi_SOURCES = test_mgmapi.cpp
ndb_test_mgmapi_LDFLAGS
=
@ndb_bin_am_ldflags@
\
#ndb_test_mgmapi_LDFLAGS = @ndb_bin_am_ldflags@
$(top_builddir)
/ndb/src/libndbclient.la
#
$(top_builddir)/ndb/src/libndbclient.la
# Don't update the files from bitkeeper
# Don't update the files from bitkeeper
%
::
SCCS/s.%
%
::
SCCS/s.%
sql/sql_show.cc
View file @
9ae2a1bd
...
@@ -651,6 +651,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
...
@@ -651,6 +651,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
TABLE
*
table
;
TABLE
*
table
;
handler
*
file
;
handler
*
file
;
char
tmp
[
MAX_FIELD_WIDTH
];
char
tmp
[
MAX_FIELD_WIDTH
];
char
tmp1
[
MAX_FIELD_WIDTH
];
Item
*
item
;
Item
*
item
;
Protocol
*
protocol
=
thd
->
protocol
;
Protocol
*
protocol
=
thd
->
protocol
;
DBUG_ENTER
(
"mysqld_show_fields"
);
DBUG_ENTER
(
"mysqld_show_fields"
);
...
@@ -735,9 +736,24 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
...
@@ -735,9 +736,24 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
else
if
(
field
->
unireg_check
!=
Field
::
NEXT_NUMBER
&&
else
if
(
field
->
unireg_check
!=
Field
::
NEXT_NUMBER
&&
!
field
->
is_null
())
!
field
->
is_null
())
{
// Not null by default
{
// Not null by default
/*
Note: we have to convert the default value into
system_charset_info before sending.
This is necessary for "SET NAMES binary":
If the client character set is binary, we want to
send metadata in UTF8 rather than in the column's
character set.
This conversion also makes "SHOW COLUMNS" and
"SHOW CREATE TABLE" output consistent. Without
this conversion the default values were displayed
differently.
*/
String
def
(
tmp1
,
sizeof
(
tmp1
),
system_charset_info
);
type
.
set
(
tmp
,
sizeof
(
tmp
),
field
->
charset
());
type
.
set
(
tmp
,
sizeof
(
tmp
),
field
->
charset
());
field
->
val_str
(
&
type
);
field
->
val_str
(
&
type
);
protocol
->
store
(
type
.
ptr
(),
type
.
length
(),
type
.
charset
());
def
.
copy
(
type
.
ptr
(),
type
.
length
(),
type
.
charset
(),
system_charset_info
);
protocol
->
store
(
def
.
ptr
(),
def
.
length
(),
def
.
charset
());
}
}
else
if
(
field
->
unireg_check
==
Field
::
NEXT_NUMBER
||
else
if
(
field
->
unireg_check
==
Field
::
NEXT_NUMBER
||
field
->
maybe_null
())
field
->
maybe_null
())
...
...
sql/sql_yacc.yy
View file @
9ae2a1bd
...
@@ -3533,12 +3533,15 @@ interval:
...
@@ -3533,12 +3533,15 @@ interval:
| SECOND_MICROSECOND_SYM { $$=INTERVAL_SECOND_MICROSECOND; }
| SECOND_MICROSECOND_SYM { $$=INTERVAL_SECOND_MICROSECOND; }
| SECOND_SYM { $$=INTERVAL_SECOND; }
| SECOND_SYM { $$=INTERVAL_SECOND; }
| YEAR_MONTH_SYM { $$=INTERVAL_YEAR_MONTH; }
| YEAR_MONTH_SYM { $$=INTERVAL_YEAR_MONTH; }
| YEAR_SYM { $$=INTERVAL_YEAR; };
| YEAR_SYM { $$=INTERVAL_YEAR; }
;
date_time_type:
date_time_type:
DATE_SYM {$$=MYSQL_TIMESTAMP_DATE;}
DATE_SYM {$$=MYSQL_TIMESTAMP_DATE;}
| TIME_SYM {$$=MYSQL_TIMESTAMP_TIME;}
| TIME_SYM {$$=MYSQL_TIMESTAMP_TIME;}
| DATETIME {$$=MYSQL_TIMESTAMP_DATETIME;};
| DATETIME {$$=MYSQL_TIMESTAMP_DATETIME;}
| TIMESTAMP {$$=MYSQL_TIMESTAMP_DATETIME;}
;
table_alias:
table_alias:
/* empty */
/* empty */
...
...
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