You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2023/04/24 02:24:50 UTC

[Bug 66577] New: Column with null value does not collect in lua table.

https://bz.apache.org/bugzilla/show_bug.cgi?id=66577

            Bug ID: 66577
           Summary: Column with null value does not collect in lua table.
           Product: Apache httpd-2
           Version: 2.4.54
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_lua
          Assignee: bugs@httpd.apache.org
          Reporter: flash_ang@hotmail.com
  Target Milestone: ---

Created attachment 38545
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38545&action=edit
lua file for connect to db, query and output results.

Column with null value does not collect in lua table.

To reproduce the result :

1. Create a testlua database, create a test table.
2. Insert few rows, some contains null values.
3. Compare output with mysql, lua.

Tested with :

System 1 : 
Package: apache2, Version: 2.4.54-1~deb11u1

System 2 : 
Server version: Apache/2.4.55 (Win64)
Server built:   Jan 15 2023 10:24:46
Distributed by: The Apache Haus
Compiled with:  Visual Studio 2022 (VS17)


Details in attachment.

Regards,
TC Ang

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 66577] Column with null value does not collect in lua table.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66577

--- Comment #2 from TC ANG <fl...@hotmail.com> ---
MariaDB [testlua]> select * from tasks;
+---------+---------------------------------------------------+------------+------------+----------+-------------+
| task_id | title                                             | start_date |
due_date   | priority | description |
+---------+---------------------------------------------------+------------+------------+----------+-------------+
|       1 | Learn MySQL INSERT Statement                      | NULL       |
NULL       |        9 | NULL        |
|       2 | Understanding DEFAULT keyword in INSERT statement | NULL       |
NULL       |        3 | NULL        |
|       3 | Insert date into table                            | 2018-01-09 |
2018-09-15 |        8 | NULL        |
|       4 | Use current date for the task                     | 2023-04-20 |
2023-12-31 |        7 | NULL        |
|       5 | My first task                                     | NULL       |
NULL       |        1 | NULL        |
|       6 | It is the second task                             | NULL       |
NULL       |        2 | NULL        |
|       7 | This is the third task of the week                | NULL       |
NULL       |        3 | NULL        |
+---------+---------------------------------------------------+------------+------------+----------+-------------+
7 rows in set (0.001 sec)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 66577] Column with null value does not collect in lua table.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66577

--- Comment #1 from TC ANG <fl...@hotmail.com> ---
text/plain; charset=utf-8 result : 

test_DBSelect0 : 
---------- 
row 1 : 
1 : 3
2 : Insert date into table
3 : 2018-01-09
4 : 2018-09-15
5 : 8
---------- 
row 2 : 
1 : 4
2 : Use current date for the task
3 : 2023-04-20
4 : 2023-12-31
5 : 7
---------- 
row 3 : 
1 : 5
2 : My first task
5 : 1
---------- 
row 4 : 
1 : 6
2 : It is the second task
5 : 2
---------- 
row 5 : 
1 : 7
2 : This is the third task of the week
5 : 3
========== ========== 
test_DBSelect1 : 
---------- 
row 1 : 
task_id : 4
priority : 7
title : Use current date for the task
start_date : 2023-04-20
due_date : 2023-12-31
---------- 
row 2 : 
task_id : 5
priority : 1
title : My first task
---------- 
row 3 : 
task_id : 6
priority : 2
title : It is the second task
---------- 
row 4 : 
task_id : 7
priority : 3
title : This is the third task of the week
========== ========== 
test_PrepareSelect : 
---------- 
row 1 : 
1 : 1 = 1
1 : 2 = Learn MySQL INSERT Statement
1 : 5 = 9
---------- 
row 2 : 
2 : 1 = 2
2 : 2 = Understanding DEFAULT keyword in INSERT statement
2 : 5 = 3
---------- 
row 3 : 
3 : 1 = 3
3 : 2 = Insert date into table
3 : 3 = 2018-01-09
3 : 4 = 2018-09-15
3 : 5 = 8
---------- 
row 4 : 
4 : 1 = 4
4 : 2 = Use current date for the task
4 : 3 = 2023-04-20
4 : 4 = 2023-12-31
4 : 5 = 7
---------- 
row 5 : 
5 : 1 = 5
5 : 2 = My first task
5 : 5 = 1
---------- 
row 6 : 
6 : 1 = 6
6 : 2 = It is the second task
6 : 5 = 2
---------- 
row 7 : 
7 : 1 = 7
7 : 2 = This is the third task of the week
7 : 5 = 3
========== ========== 
test_PrepareSelectN : 
statement:select() table, err nil
---------- 
row 1 : 
1 : 1 = 3
1 : 2 = Insert date into table
1 : 3 = 2018-01-09
1 : 4 = 2018-09-15
1 : 5 = 8
---------- 
row 2 : 
2 : 1 = 4
2 : 2 = Use current date for the task
2 : 3 = 2023-04-20
2 : 4 = 2023-12-31
2 : 5 = 7
---------- 
row 3 : 
3 : 1 = 5
3 : 2 = My first task
3 : 5 = 1
---------- 
row 4 : 
4 : 1 = 6
4 : 2 = It is the second task
4 : 5 = 2
---------- 
row 5 : 
5 : 1 = 7
5 : 2 = This is the third task of the week
5 : 5 = 3
========== ==========

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 66577] Column with null value does not collect in lua table.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66577

TC ANG <fl...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |flash_ang@hotmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org