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
02566232
Commit
02566232
authored
Oct 31, 2002
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/my/mysql-4.0 into mashka.mysql.fi:/home/my/mysql-4.0
mysql-test/r/innodb.result: Auto merged
parents
0eae83a6
7f389b34
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
18 deletions
+70
-18
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/func_test.result
mysql-test/r/func_test.result
+14
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+1
-1
mysql-test/t/func_test.test
mysql-test/t/func_test.test
+10
-0
sql-bench/bench-init.pl.sh
sql-bench/bench-init.pl.sh
+8
-4
sql-bench/server-cfg.sh
sql-bench/server-cfg.sh
+4
-3
sql/field.h
sql/field.h
+1
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+23
-8
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-0
sql/sql_acl.cc
sql/sql_acl.cc
+7
-2
No files found.
BitKeeper/etc/logging_ok
View file @
02566232
...
...
@@ -14,6 +14,7 @@ bar@bar.udmsearch.izhnet.ru
bell@sanja.is.com.ua
bk@admin.bk
davida@isil.mysql.com
gluh@gluh.(none)
heikki@donna.mysql.fi
heikki@hundin.mysql.fi
heikki@rescue.
...
...
mysql-test/r/func_test.result
View file @
02566232
...
...
@@ -46,6 +46,20 @@ select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1;
select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL;
1 XOR 1 1 XOR 0 0 XOR 1 0 XOR 0 NULL XOR 1 1 XOR NULL 0 XOR NULL
0 1 1 0 NULL NULL NULL
drop table if exists t1,t2;
CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM;
INSERT INTO t1 VALUES ('2002-10-21 00:00:00');
INSERT INTO t1 VALUES ('2002-10-28 00:00:00');
INSERT INTO t1 VALUES ('2002-11-04 00:00:00');
CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM;
INSERT INTO t2 VALUES (20021029165106,20021105164731);
select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2;
start ctime1 ctime2
2002-11-04 00:00:00 20021029165106 20021105164731
select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2;
start ctime1 ctime2
2002-11-04 00:00:00 20021029165106 20021105164731
drop table if exists t1,t2;
select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1
0 1
...
...
mysql-test/r/innodb.result
View file @
02566232
...
...
@@ -988,7 +988,7 @@ BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SELECT @@tx_isolation,@@global.tx_isolation;
@@tx_isolation @@global.tx_isolation
SERIALIZABLE RE
AD-COMMITTE
D
SERIALIZABLE RE
PEATABLE-REA
D
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
select id, code, name from t1 order by id;
id code name
...
...
mysql-test/t/func_test.test
View file @
02566232
...
...
@@ -17,6 +17,16 @@ select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,
select
-
1.49
or
-
1.49
,
0.6
or
0.6
;
select
3
^
11
,
1
^
1
,
1
^
0
,
1
^
NULL
,
NULL
^
1
;
select
1
XOR
1
,
1
XOR
0
,
0
XOR
1
,
0
XOR
0
,
NULL
XOR
1
,
1
XOR
NULL
,
0
XOR
NULL
;
drop
table
if
exists
t1
,
t2
;
CREATE
TABLE
t1
(
start
datetime
default
NULL
)
TYPE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
'2002-10-21 00:00:00'
);
INSERT
INTO
t1
VALUES
(
'2002-10-28 00:00:00'
);
INSERT
INTO
t1
VALUES
(
'2002-11-04 00:00:00'
);
CREATE
TABLE
t2
(
ctime1
timestamp
(
14
)
NOT
NULL
,
ctime2
timestamp
(
14
)
NOT
NULL
)
TYPE
=
MyISAM
;
INSERT
INTO
t2
VALUES
(
20021029165106
,
20021105164731
);
select
*
from
t1
,
t2
where
t1
.
start
between
t2
.
ctime1
and
t2
.
ctime2
;
select
*
from
t1
,
t2
where
t1
.
start
>=
t2
.
ctime1
and
t1
.
start
<=
t2
.
ctime2
;
drop
table
if
exists
t1
,
t2
;
#
# Wrong usage of functions
...
...
sql-bench/bench-init.pl.sh
View file @
02566232
...
...
@@ -39,7 +39,7 @@ require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
$|
=
1
;
# Output data immediately
$opt_skip_test
=
$opt_skip_create
=
$opt_skip_delete
=
$opt_verbose
=
$opt_fast_insert
=
$opt_lock_tables
=
$opt_debug
=
$opt_skip_delete
=
$opt_fast
=
$opt_force
=
$opt_log
=
$opt_use_old_results
=
$opt_help
=
$opt_odbc
=
$opt_small_test
=
$opt_small_tables
=
$opt_samll_key_tables
=
$opt_stage
=
$opt_old_headers
=
$opt_die_on_errors
=
$opt_tcpip
=
$opt_random
=
0
;
$opt_cmp
=
$opt_user
=
$opt_password
=
""
;
$opt_cmp
=
$opt_user
=
$opt_password
=
$opt_connect_options
=
""
;
$opt_server
=
"mysql"
;
$opt_dir
=
"output"
;
$opt_host
=
"localhost"
;
$opt_database
=
"test"
;
$opt_machine
=
""
;
$opt_suffix
=
""
;
...
...
@@ -55,11 +55,11 @@ $log_prog_args=join(" ", skip_arguments(\@ARGV,"comments","cmp","server",
"use-old-results"
,
"skip-test"
,
"optimization"
,
"hw"
,
"machine"
,
"dir"
,
"suffix"
,
"log"
))
;
GetOptions
(
"skip-test=s"
,
"comments=s"
,
"cmp=s"
,
"server=s"
,
"user=s"
,
"host=s"
,
"database=s"
,
"password=s"
,
"loop-count=i"
,
"row-count=i"
,
"skip-create"
,
"skip-delete"
,
"verbose"
,
"fast-insert"
,
"lock-tables"
,
"debug"
,
"fast"
,
"force"
,
"field-count=i"
,
"regions=i"
,
"groups=i"
,
"time-limit=i"
,
"log"
,
"use-old-results"
,
"machine=s"
,
"dir=s"
,
"suffix=s"
,
"help"
,
"odbc"
,
"small-test"
,
"small-tables"
,
"small-key-tables"
,
"stage=i"
,
"threads=i"
,
"random"
,
"old-headers"
,
"die-on-errors"
,
"create-options=s"
,
"hires"
,
"tcpip"
,
"silent"
,
"optimization=s"
,
"hw=s"
,
"socket=s"
)
||
usage
()
;
GetOptions
(
"skip-test=s"
,
"comments=s"
,
"cmp=s"
,
"server=s"
,
"user=s"
,
"host=s"
,
"database=s"
,
"password=s"
,
"loop-count=i"
,
"row-count=i"
,
"skip-create"
,
"skip-delete"
,
"verbose"
,
"fast-insert"
,
"lock-tables"
,
"debug"
,
"fast"
,
"force"
,
"field-count=i"
,
"regions=i"
,
"groups=i"
,
"time-limit=i"
,
"log"
,
"use-old-results"
,
"machine=s"
,
"dir=s"
,
"suffix=s"
,
"help"
,
"odbc"
,
"small-test"
,
"small-tables"
,
"small-key-tables"
,
"stage=i"
,
"threads=i"
,
"random"
,
"old-headers"
,
"die-on-errors"
,
"create-options=s"
,
"hires"
,
"tcpip"
,
"silent"
,
"optimization=s"
,
"hw=s"
,
"socket=s"
,
"connect-options=s"
)
||
usage
()
;
usage
()
if
(
$opt_help
)
;
$server
=
get_server
(
$opt_server
,
$opt_host
,
$opt_database
,
$opt_odbc
,
machine_part
()
,
$opt_socket
)
;
machine_part
()
,
$opt_socket
,
$opt_connect_options
)
;
$limits
=
merge_limits
(
$server
,
$opt_cmp
)
;
$date
=
date
()
;
@estimated
=(
0.0,0.0,0.0
)
;
# For estimated time support
...
...
@@ -593,7 +593,11 @@ All benchmarks takes the following options:
--hw='some comments'
Add coments about hardware used for this test.
--connect-options='some connect options'
Add options, which uses at DBI connect.
For example --connect-options=mysql_read_default_file=/etc/my.cnf.
EOF
exit
(
0
)
;
}
...
...
sql-bench/server-cfg.sh
View file @
02566232
...
...
@@ -33,10 +33,10 @@
sub get_server
{
my
(
$name
,
$host
,
$database
,
$odbc
,
$machine
,
$socket
)=
@_
;
my
(
$name
,
$host
,
$database
,
$odbc
,
$machine
,
$socket
,
$connect_options
)=
@_
;
my
(
$server
)
;
if
(
$name
=
~ /mysql/i
)
{
$server
=
new db_MySQL
(
$host
,
$database
,
$machine
,
$socket
)
;
}
{
$server
=
new db_MySQL
(
$host
,
$database
,
$machine
,
$socket
,
$connect_options
)
;
}
elsif
(
$name
=
~ /pg/i
)
{
$server
=
new db_Pg
(
$host
,
$database
)
;
}
elsif
(
$name
=
~ /msql/i
)
...
...
@@ -106,7 +106,7 @@ package db_MySQL;
sub new
{
my
(
$type
,
$host
,
$database
,
$machine
,
$socket
)=
@_
;
my
(
$type
,
$host
,
$database
,
$machine
,
$socket
,
$connect_options
)=
@_
;
my
$self
=
{}
;
my %limits
;
bless
$self
;
...
...
@@ -114,6 +114,7 @@ sub new
$self
->
{
'cmp_name'
}
=
"mysql"
;
$self
->
{
'data_source'
}
=
"DBI:mysql:database=
$database
;host=
$host
"
;
$self
->
{
'data_source'
}
.
=
";mysql_socket=
$socket
"
if
(
$socket
)
;
$self
->
{
'data_source'
}
.
=
";
$connect_options
"
if
(
$connect_options
)
;
$self
->
{
'limits'
}
=
\%
limits
;
$self
->
{
'smds'
}
=
\%
smds
;
$self
->
{
'blob'
}
=
"blob"
;
...
...
sql/field.h
View file @
02566232
...
...
@@ -544,6 +544,7 @@ class Field_timestamp :public Field_num {
enum
Item_result
result_type
()
const
{
return
field_length
==
8
||
field_length
==
14
?
INT_RESULT
:
STRING_RESULT
;
}
enum_field_types
type
()
const
{
return
FIELD_TYPE_TIMESTAMP
;}
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_ULONG_INT
;
}
enum
Item_result
cmp_type
()
const
{
return
INT_RESULT
;
}
void
store
(
const
char
*
to
,
uint
length
);
void
store
(
double
nr
);
void
store
(
longlong
nr
);
...
...
sql/ha_innodb.cc
View file @
02566232
...
...
@@ -1171,7 +1171,10 @@ how you can resolve the problem.\n",
((
row_prebuilt_t
*
)
innobase_prebuilt
)
->
mysql_row_len
=
table
->
reclength
;
primary_key
=
MAX_KEY
;
/* Looks like MySQL-3.23 sometimes has primary key number != 0 */
primary_key
=
table
->
primary_key
;
key_used_on_scan
=
primary_key
;
/* Allocate a buffer for a 'row reference'. A row reference is
a string of bytes of length ref_length which uniquely specifies
...
...
@@ -1180,13 +1183,14 @@ how you can resolve the problem.\n",
of length ref_length! */
if
(
!
row_table_got_default_clust_index
(
ib_table
))
{
if
(
primary_key
>=
MAX_KEY
)
{
fprintf
(
stderr
,
"InnoDB: Error: table %s has a primary key in InnoDB
\n
"
"InnoDB: data dictionary, but not in MySQL!
\n
"
,
name
);
}
((
row_prebuilt_t
*
)
innobase_prebuilt
)
->
clust_index_was_generated
=
FALSE
;
primary_key
=
0
;
key_used_on_scan
=
0
;
/*
MySQL allocates the buffer for ref. key_info->key_length
includes space for all key columns + one byte for each column
...
...
@@ -1195,8 +1199,14 @@ how you can resolve the problem.\n",
based on ref_length.
*/
ref_length
=
table
->
key_info
->
key_length
;
ref_length
=
table
->
key_info
[
primary_key
].
key_length
;
}
else
{
if
(
primary_key
!=
MAX_KEY
)
{
fprintf
(
stderr
,
"InnoDB: Error: table %s has no primary key in InnoDB
\n
"
"InnoDB: data dictionary, but has one in MySQL!
\n
"
,
name
);
}
((
row_prebuilt_t
*
)
innobase_prebuilt
)
->
clust_index_was_generated
=
TRUE
;
...
...
@@ -1501,7 +1511,8 @@ ha_innobase::store_key_val_for_row(
are equal
*/
bzero
(
buff
,
(
ref_length
-
(
uint
)
(
buff
-
buff_start
)));
DBUG_RETURN
(
ref_length
);
DBUG_RETURN
((
uint
)(
buff
-
buff_start
));
}
/******************************************************************
...
...
@@ -2759,7 +2770,11 @@ ha_innobase::position(
that len is always fixed for this table. The following assertion
checks this. */
ut_a
(
len
==
ref_length
);
if
(
len
!=
ref_length
)
{
fprintf
(
stderr
,
"InnoDB: Error: stored ref len is %lu, but table ref len is %lu
\n
"
,
(
ulint
)
len
,
(
ulint
)
ref_length
);
}
}
...
...
sql/item_cmpfunc.cc
View file @
02566232
...
...
@@ -360,6 +360,7 @@ void Item_func_between::fix_length_and_dec()
if
(
args
[
0
]
->
type
()
==
FIELD_ITEM
)
{
Field
*
field
=
((
Item_field
*
)
args
[
0
])
->
field
;
cmp_type
=
field
->
cmp_type
();
if
(
field
->
store_for_compare
())
{
if
(
convert_constant_item
(
field
,
&
args
[
1
]))
...
...
sql/sql_acl.cc
View file @
02566232
...
...
@@ -1348,8 +1348,13 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
strlen
(
thd
->
lex
.
x509_subject
));
break
;
case
SSL_TYPE_NOT_SPECIFIED
:
case
SSL_TYPE_NONE
:
// Impossible
break
;
// Nothing to do
break
;
case
SSL_TYPE_NONE
:
table
->
field
[
24
]
->
store
(
""
,
0
);
table
->
field
[
25
]
->
store
(
""
,
0
);
table
->
field
[
26
]
->
store
(
""
,
0
);
table
->
field
[
27
]
->
store
(
""
,
0
);
break
;
}
USER_RESOURCES
mqh
=
thd
->
lex
.
mqh
;
...
...
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