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
a4654ecc
Commit
a4654ecc
authored
Aug 29, 2024
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.5' into 10.6
parents
0e76c1ba
03a5455c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
138 additions
and
1 deletion
+138
-1
client/mysql.cc
client/mysql.cc
+6
-1
mysql-test/main/client.result
mysql-test/main/client.result
+62
-0
mysql-test/main/client.test
mysql-test/main/client.test
+46
-0
mysql-test/main/item_types.result
mysql-test/main/item_types.result
+10
-0
mysql-test/main/item_types.test
mysql-test/main/item_types.test
+12
-0
sql/item.h
sql/item.h
+2
-0
No files found.
client/mysql.cc
View file @
a4654ecc
...
...
@@ -165,6 +165,7 @@ static my_bool column_types_flag;
static
my_bool
preserve_comments
=
0
;
static
my_bool
in_com_source
,
aborted
=
0
;
static
ulong
opt_max_allowed_packet
,
opt_net_buffer_length
;
unsigned
long
quick_max_column_width
=
LONG_MAX
;
static
uint
verbose
=
0
,
opt_silent
=
0
,
opt_mysql_port
=
0
,
opt_local_infile
=
0
;
static
uint
my_end_arg
;
static
char
*
opt_mysql_unix_port
=
0
;
...
...
@@ -1682,6 +1683,10 @@ static struct my_option my_long_options[] =
"Don't cache result, print it row by row. This may slow down the server "
"if the output is suspended. Doesn't use history file."
,
&
quick
,
&
quick
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"quick-max-column-width"
,
0
,
"Maximal field length limit in case of --qick"
,
&
quick_max_column_width
,
&
quick_max_column_width
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
LONG_MAX
,
0
,
ULONG_MAX
,
0
,
1
,
0
},
{
"raw"
,
'r'
,
"Write fields without conversion. Used with --batch."
,
&
opt_raw_data
,
&
opt_raw_data
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"reconnect"
,
0
,
"Reconnect if the connection is lost."
,
...
...
@@ -3742,7 +3747,7 @@ print_table_data(MYSQL_RES *result)
{
uint
length
=
column_names
?
field
->
name_length
:
0
;
if
(
quick
)
length
=
MY_MAX
(
length
,
field
->
length
);
length
=
MY_MAX
(
length
,
MY_MIN
(
field
->
length
,
quick_max_column_width
)
);
else
length
=
MY_MAX
(
length
,
field
->
max_length
);
if
(
length
<
4
&&
!
IS_NOT_NULL
(
field
->
flags
))
...
...
mysql-test/main/client.result
0 → 100644
View file @
a4654ecc
#
# MDEV-34704: Quick mode produces the bug for mariadb client
#
create table t1 (aaaaaaaaa char (5), aaaaa char (10), a char (127), b char(1));
insert into t1 values ("X", "X", "X", "X");
# --table --quick
+-----------+------------+---------------------------------------------------------------------------------------------------------------------------------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+------------+---------------------------------------------------------------------------------------------------------------------------------+------+
| X | X | X | X |
+-----------+------------+---------------------------------------------------------------------------------------------------------------------------------+------+
# --table --quick --quick-max-column-width=0
+-----------+-------+------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+-------+------+------+
| X | X | X | X |
+-----------+-------+------+------+
# --table --quick --quick-max-column-width=10
+-----------+------------+------------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+------------+------------+------+
| X | X | X | X |
+-----------+------------+------------+------+
# --table --quick --quick-max-column-width=20
+-----------+------------+----------------------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+------------+----------------------+------+
| X | X | X | X |
+-----------+------------+----------------------+------+
insert into t1 values ("01234", "0123456789", "01234567890123456789", "1");
# --table --quick
+-----------+------------+---------------------------------------------------------------------------------------------------------------------------------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+------------+---------------------------------------------------------------------------------------------------------------------------------+------+
| X | X | X | X |
| 01234 | 0123456789 | 01234567890123456789 | 1 |
+-----------+------------+---------------------------------------------------------------------------------------------------------------------------------+------+
# --table --quick --quick-max-column-width=0
+-----------+-------+------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+-------+------+------+
| X | X | X | X |
| 01234 | 0123456789 | 01234567890123456789 | 1 |
+-----------+-------+------+------+
# --table --quick --quick-max-column-width=10
+-----------+------------+------------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+------------+------------+------+
| X | X | X | X |
| 01234 | 0123456789 | 01234567890123456789 | 1 |
+-----------+------------+------------+------+
# --table --quick --quick-max-column-width=20
+-----------+------------+----------------------+------+
| aaaaaaaaa | aaaaa | a | b |
+-----------+------------+----------------------+------+
| X | X | X | X |
| 01234 | 0123456789 | 01234567890123456789 | 1 |
+-----------+------------+----------------------+------+
drop table t1;
#
# End of 10.7 tests
#
mysql-test/main/client.test
0 → 100644
View file @
a4654ecc
--
source
include
/
not_embedded
.
inc
--
echo
#
--
echo
# MDEV-34704: Quick mode produces the bug for mariadb client
--
echo
#
create
table
t1
(
aaaaaaaaa
char
(
5
),
aaaaa
char
(
10
),
a
char
(
127
),
b
char
(
1
));
insert
into
t1
values
(
"X"
,
"X"
,
"X"
,
"X"
);
--
echo
# --table --quick
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
2
>&
1
--
echo
# --table --quick --quick-max-column-width=0
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
--
quick
-
max
-
column
-
width
=
0
2
>&
1
--
echo
# --table --quick --quick-max-column-width=10
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
--
quick
-
max
-
column
-
width
=
10
2
>&
1
--
echo
# --table --quick --quick-max-column-width=20
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
--
quick
-
max
-
column
-
width
=
20
2
>&
1
insert
into
t1
values
(
"01234"
,
"0123456789"
,
"01234567890123456789"
,
"1"
);
--
echo
# --table --quick
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
2
>&
1
--
echo
# --table --quick --quick-max-column-width=0
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
--
quick
-
max
-
column
-
width
=
0
2
>&
1
--
echo
# --table --quick --quick-max-column-width=10
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
--
quick
-
max
-
column
-
width
=
10
2
>&
1
--
echo
# --table --quick --quick-max-column-width=20
--
exec
echo
"select * from test.t1;"
|
$MYSQL
--
table
--
quick
--
quick
-
max
-
column
-
width
=
20
2
>&
1
drop
table
t1
;
--
echo
#
--
echo
# End of 10.7 tests
--
echo
#
mysql-test/main/item_types.result
View file @
a4654ecc
...
...
@@ -51,5 +51,15 @@ a
0
DROP VIEW t;
#
# MDEV-34833: Assertion failure in Item_float::do_build_clone
# (Item_static_float_func)
#
CREATE VIEW v1 (f,f2) AS SELECT connection_id(),pi();
CREATE TABLE t1 AS SELECT 1;
SELECT * FROM v1 JOIN t1 ON f=f2;
f f2 1
DROP VIEW v1;
DROP TABLE t1;
#
# End of 10.5 tests
#
mysql-test/main/item_types.test
View file @
a4654ecc
...
...
@@ -55,6 +55,18 @@ CREATE VIEW t AS SELECT 0 AS a;
SELECT
*
FROM
t
WHERE
a
=
ALL
(
SELECT
0
);
DROP
VIEW
t
;
--
echo
#
--
echo
# MDEV-34833: Assertion failure in Item_float::do_build_clone
--
echo
# (Item_static_float_func)
--
echo
#
CREATE
VIEW
v1
(
f
,
f2
)
AS
SELECT
connection_id
(),
pi
();
CREATE
TABLE
t1
AS
SELECT
1
;
SELECT
*
FROM
v1
JOIN
t1
ON
f
=
f2
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.5 tests
--
echo
#
sql/item.h
View file @
a4654ecc
...
...
@@ -4720,6 +4720,8 @@ class Item_static_float_func :public Item_float
{
return
const_charset_converter
(
thd
,
tocs
,
true
,
func_name
);
}
Item
*
do_get_copy
(
THD
*
thd
)
const
override
{
return
get_item_copy
<
Item_static_float_func
>
(
thd
,
this
);
}
};
...
...
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